diff --git a/.changelog/32965b341d1a4174b9c5dfbfed7f374e.json b/.changelog/32965b341d1a4174b9c5dfbfed7f374e.json new file mode 100644 index 00000000000..f547309022a --- /dev/null +++ b/.changelog/32965b341d1a4174b9c5dfbfed7f374e.json @@ -0,0 +1,168 @@ +{ + "id": "32965b34-1d1a-4174-b9c5-dfbfed7f374e", + "type": "announcement", + "description": "[BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service.", + "modules": [ + "service/accessanalyzer", + "service/acm", + "service/amplify", + "service/apigatewaymanagementapi", + "service/appconfig", + "service/appconfigdata", + "service/appfabric", + "service/appintegrations", + "service/applicationcostprofiler", + "service/appmesh", + "service/arczonalshift", + "service/autoscalingplans", + "service/backupgateway", + "service/backupstorage", + "service/braket", + "service/chimesdkvoice", + "service/clouddirectory", + "service/cloudhsmv2", + "service/cloudsearch", + "service/cloudsearchdomain", + "service/cloudtraildata", + "service/codebuild", + "service/codedeploy", + "service/codeguruprofiler", + "service/codegurureviewer", + "service/codegurusecurity", + "service/codestar", + "service/codestarnotifications", + "service/cognitoidentity", + "service/cognitosync", + "service/connectcases", + "service/connectcontactlens", + "service/controltower", + "service/databrew", + "service/dataexchange", + "service/datapipeline", + "service/dax", + "service/devicefarm", + "service/docdbelastic", + "service/ec2instanceconnect", + "service/ecrpublic", + "service/elasticbeanstalk", + "service/elasticloadbalancing", + "service/elastictranscoder", + "service/evidently", + "service/finspacedata", + "service/fis", + "service/forecast", + "service/forecastquery", + "service/gamesparks", + "service/glacier", + "service/greengrass", + "service/greengrassv2", + "service/honeycode", + "service/inspector", + "service/iot1clickdevicesservice", + "service/iot1clickprojects", + "service/iotanalytics", + "service/iotevents", + "service/ioteventsdata", + "service/iotfleethub", + "service/iotjobsdataplane", + "service/iotroborunner", + "service/iotsecuretunneling", + "service/iotthingsgraph", + "service/ivschat", + "service/kendraranking", + "service/kinesis", + "service/kinesisanalytics", + "service/kinesisvideoarchivedmedia", + "service/kinesisvideomedia", + "service/kinesisvideosignaling", + "service/kinesisvideowebrtcstorage", + "service/lexmodelbuildingservice", + "service/lexruntimeservice", + "service/lexruntimev2", + "service/licensemanager", + "service/licensemanagerlinuxsubscriptions", + "service/licensemanagerusersubscriptions", + "service/lookoutmetrics", + "service/lookoutvision", + "service/machinelearning", + "service/macie", + "service/marketplacecommerceanalytics", + "service/marketplaceentitlementservice", + "service/marketplacemetering", + "service/mediapackagev2", + "service/mediapackagevod", + "service/mediastore", + "service/mediastoredata", + "service/medicalimaging", + "service/migrationhub", + "service/migrationhubconfig", + "service/migrationhuborchestrator", + "service/migrationhubstrategy", + "service/mobile", + "service/mturk", + "service/neptune", + "service/networkmanager", + "service/nimble", + "service/oam", + "service/opensearchserverless", + "service/opsworks", + "service/opsworkscm", + "service/osis", + "service/panorama", + "service/paymentcryptography", + "service/personalizeevents", + "service/personalizeruntime", + "service/pinpointemail", + "service/pinpointsmsvoice", + "service/pinpointsmsvoicev2", + "service/pipes", + "service/qldbsession", + "service/rbin", + "service/rdsdata", + "service/redshiftserverless", + "service/resourceexplorer2", + "service/resourcegroups", + "service/resourcegroupstaggingapi", + "service/robomaker", + "service/route53recoverycluster", + "service/route53recoverycontrolconfig", + "service/route53recoveryreadiness", + "service/route53resolver", + "service/rum", + "service/s3outposts", + "service/sagemakera2iruntime", + "service/sagemakeredge", + "service/sagemakergeospatial", + "service/sagemakermetrics", + "service/scheduler", + "service/schemas", + "service/serverlessapplicationrepository", + "service/servicecatalogappregistry", + "service/servicediscovery", + "service/shield", + "service/sms", + "service/snowdevicemanagement", + "service/sns", + "service/ssmcontacts", + "service/ssmincidents", + "service/ssmsap", + "service/sso", + "service/ssooidc", + "service/storagegateway", + "service/sts", + "service/supportapp", + "service/synthetics", + "service/textract", + "service/timestreamquery", + "service/timestreamwrite", + "service/tnb", + "service/transcribestreaming", + "service/voiceid", + "service/waf", + "service/wafregional", + "service/workdocs", + "service/worklink", + "service/workmail", + "service/workmailmessageflow" + ] +} \ No newline at end of file diff --git a/.changelog/fde5d941436a47b99fab533c5bf178e4.json b/.changelog/fde5d941436a47b99fab533c5bf178e4.json new file mode 100644 index 00000000000..261b5c3bf6f --- /dev/null +++ b/.changelog/fde5d941436a47b99fab533c5bf178e4.json @@ -0,0 +1,169 @@ +{ + "id": "fde5d941-436a-47b9-9fab-533c5bf178e4", + "type": "feature", + "collapse": true, + "description": "Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field.", + "modules": [ + "service/accessanalyzer", + "service/acm", + "service/amplify", + "service/apigatewaymanagementapi", + "service/appconfig", + "service/appconfigdata", + "service/appfabric", + "service/appintegrations", + "service/applicationcostprofiler", + "service/appmesh", + "service/arczonalshift", + "service/autoscalingplans", + "service/backupgateway", + "service/backupstorage", + "service/braket", + "service/chimesdkvoice", + "service/clouddirectory", + "service/cloudhsmv2", + "service/cloudsearch", + "service/cloudsearchdomain", + "service/cloudtraildata", + "service/codebuild", + "service/codedeploy", + "service/codeguruprofiler", + "service/codegurureviewer", + "service/codegurusecurity", + "service/codestar", + "service/codestarnotifications", + "service/cognitoidentity", + "service/cognitosync", + "service/connectcases", + "service/connectcontactlens", + "service/controltower", + "service/databrew", + "service/dataexchange", + "service/datapipeline", + "service/dax", + "service/devicefarm", + "service/docdbelastic", + "service/ec2instanceconnect", + "service/ecrpublic", + "service/elasticbeanstalk", + "service/elasticloadbalancing", + "service/elastictranscoder", + "service/evidently", + "service/finspacedata", + "service/fis", + "service/forecast", + "service/forecastquery", + "service/gamesparks", + "service/glacier", + "service/greengrass", + "service/greengrassv2", + "service/honeycode", + "service/inspector", + "service/iot1clickdevicesservice", + "service/iot1clickprojects", + "service/iotanalytics", + "service/iotevents", + "service/ioteventsdata", + "service/iotfleethub", + "service/iotjobsdataplane", + "service/iotroborunner", + "service/iotsecuretunneling", + "service/iotthingsgraph", + "service/ivschat", + "service/kendraranking", + "service/kinesis", + "service/kinesisanalytics", + "service/kinesisvideoarchivedmedia", + "service/kinesisvideomedia", + "service/kinesisvideosignaling", + "service/kinesisvideowebrtcstorage", + "service/lexmodelbuildingservice", + "service/lexruntimeservice", + "service/lexruntimev2", + "service/licensemanager", + "service/licensemanagerlinuxsubscriptions", + "service/licensemanagerusersubscriptions", + "service/lookoutmetrics", + "service/lookoutvision", + "service/machinelearning", + "service/macie", + "service/marketplacecommerceanalytics", + "service/marketplaceentitlementservice", + "service/marketplacemetering", + "service/mediapackagev2", + "service/mediapackagevod", + "service/mediastore", + "service/mediastoredata", + "service/medicalimaging", + "service/migrationhub", + "service/migrationhubconfig", + "service/migrationhuborchestrator", + "service/migrationhubstrategy", + "service/mobile", + "service/mturk", + "service/neptune", + "service/networkmanager", + "service/nimble", + "service/oam", + "service/opensearchserverless", + "service/opsworks", + "service/opsworkscm", + "service/osis", + "service/panorama", + "service/paymentcryptography", + "service/personalizeevents", + "service/personalizeruntime", + "service/pinpointemail", + "service/pinpointsmsvoice", + "service/pinpointsmsvoicev2", + "service/pipes", + "service/qldbsession", + "service/rbin", + "service/rdsdata", + "service/redshiftserverless", + "service/resourceexplorer2", + "service/resourcegroups", + "service/resourcegroupstaggingapi", + "service/robomaker", + "service/route53recoverycluster", + "service/route53recoverycontrolconfig", + "service/route53recoveryreadiness", + "service/route53resolver", + "service/rum", + "service/s3outposts", + "service/sagemakera2iruntime", + "service/sagemakeredge", + "service/sagemakergeospatial", + "service/sagemakermetrics", + "service/scheduler", + "service/schemas", + "service/serverlessapplicationrepository", + "service/servicecatalogappregistry", + "service/servicediscovery", + "service/shield", + "service/sms", + "service/snowdevicemanagement", + "service/sns", + "service/ssmcontacts", + "service/ssmincidents", + "service/ssmsap", + "service/sso", + "service/ssooidc", + "service/storagegateway", + "service/sts", + "service/supportapp", + "service/synthetics", + "service/textract", + "service/timestreamquery", + "service/timestreamwrite", + "service/tnb", + "service/transcribestreaming", + "service/voiceid", + "service/waf", + "service/wafregional", + "service/workdocs", + "service/worklink", + "service/workmail", + "service/workmailmessageflow" + ] +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/accessanalyzer.json b/codegen/sdk-codegen/aws-models/accessanalyzer.json index 3ba1ae5cedd..64d9d8f3abb 100644 --- a/codegen/sdk-codegen/aws-models/accessanalyzer.json +++ b/codegen/sdk-codegen/aws-models/accessanalyzer.json @@ -146,52 +146,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -199,13 +203,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -215,175 +228,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://access-analyzer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://access-analyzer.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://access-analyzer-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://access-analyzer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -392,110 +313,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://access-analyzer.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://access-analyzer.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://access-analyzer-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://access-analyzer.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-gov-west-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://access-analyzer.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://access-analyzer.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://access-analyzer.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://access-analyzer.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -510,8 +436,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -523,8 +449,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -536,8 +462,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -549,8 +475,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -562,8 +488,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -575,8 +501,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -588,8 +514,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -601,8 +527,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -614,8 +540,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -627,8 +553,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -640,8 +566,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -653,8 +579,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -666,8 +592,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -679,8 +605,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -692,8 +618,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -705,8 +631,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -718,8 +644,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -731,8 +657,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -744,8 +670,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -757,8 +683,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -770,8 +696,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -783,8 +709,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -796,8 +722,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -809,8 +735,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -822,8 +748,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -835,8 +761,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -848,8 +774,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -861,8 +787,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -874,8 +800,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -887,8 +813,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -900,8 +826,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -913,8 +839,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -926,8 +852,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -939,8 +865,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -952,8 +878,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -965,8 +891,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -978,8 +904,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -991,8 +917,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1004,8 +930,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1017,8 +943,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1030,8 +967,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1043,8 +991,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1056,8 +1015,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1069,8 +1039,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1082,8 +1052,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1095,8 +1065,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1107,8 +1077,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1119,10 +1089,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -6217,4 +6193,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/account.json b/codegen/sdk-codegen/aws-models/account.json index 79c1639b8f2..814604516d5 100644 --- a/codegen/sdk-codegen/aws-models/account.json +++ b/codegen/sdk-codegen/aws-models/account.json @@ -112,52 +112,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -165,342 +169,302 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://account.us-east-1.amazonaws.com", + "properties": { + "authSchemes": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "name": "sigv4", + "signingName": "account", + "signingRegion": "us-east-1" } - ], - "endpoint": { - "url": "https://account.us-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "account", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-cn" + "name" ] }, + "aws-cn" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://account.cn-northwest-1.amazonaws.com.cn", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "account", + "signingRegion": "cn-northwest-1" } - ], - "endpoint": { - "url": "https://account.cn-northwest-1.amazonaws.com.cn", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "account", - "signingRegion": "cn-northwest-1" - } - ] + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" }, - "headers": {} - }, - "type": "endpoint" + true + ] }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://account-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://account-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://account-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://account-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://account.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://account.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://account.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://account.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/acm-pca.json b/codegen/sdk-codegen/aws-models/acm-pca.json index 5fce384663b..a5caaadcbc9 100644 --- a/codegen/sdk-codegen/aws-models/acm-pca.json +++ b/codegen/sdk-codegen/aws-models/acm-pca.json @@ -177,52 +177,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -230,13 +234,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -246,92 +259,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://acm-pca-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://acm-pca-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -340,155 +344,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://acm-pca.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://acm-pca-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://acm-pca.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://acm-pca-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://acm-pca.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://acm-pca.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://acm-pca.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://acm-pca.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/acm.json b/codegen/sdk-codegen/aws-models/acm.json index 2fe4a676891..43a1fffc0d4 100644 --- a/codegen/sdk-codegen/aws-models/acm.json +++ b/codegen/sdk-codegen/aws-models/acm.json @@ -98,6 +98,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#Arn": { @@ -439,52 +442,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -492,13 +499,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -508,175 +524,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://acm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://acm.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://acm-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://acm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -685,110 +609,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://acm.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://acm.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://acm-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://acm.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-gov-west-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://acm.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://acm.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://acm.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://acm.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -803,8 +732,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -816,8 +745,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -829,8 +758,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -842,8 +771,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -855,8 +784,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -868,8 +797,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -881,8 +810,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -894,8 +823,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -907,8 +836,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -920,8 +849,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -933,8 +862,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -946,8 +875,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -959,8 +888,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -972,8 +901,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -985,8 +914,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -998,8 +927,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1011,8 +940,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1024,8 +953,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1037,8 +966,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1050,8 +979,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1063,8 +992,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1076,8 +1005,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1089,8 +1018,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1102,8 +1031,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1115,8 +1044,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1128,8 +1057,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1141,8 +1070,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1154,8 +1083,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1167,8 +1096,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1180,8 +1109,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1193,8 +1122,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1206,8 +1135,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1219,8 +1148,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1232,8 +1161,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1245,8 +1174,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1258,8 +1187,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1271,8 +1200,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1284,8 +1213,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1297,8 +1226,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1310,8 +1250,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1323,8 +1274,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1336,8 +1298,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1349,8 +1322,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1362,8 +1335,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1375,8 +1348,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1387,8 +1360,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1399,10 +1372,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1692,6 +1671,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#DescribeCertificate": { @@ -1767,6 +1749,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#DescribeCertificateResponse": { @@ -1778,6 +1763,9 @@ "smithy.api#documentation": "

Metadata about an ACM certificate.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.acm#DomainList": { @@ -1970,6 +1958,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#ExportCertificateResponse": { @@ -1993,6 +1984,9 @@ "smithy.api#documentation": "

The encrypted private key associated with the public key in the certificate. The key is\n output in PKCS #8 format and is base64 PEM-encoded.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.acm#ExtendedKeyUsage": { @@ -2272,6 +2266,9 @@ "smithy.api#documentation": "

Expiration events configuration options associated with the Amazon Web Services account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.acm#GetCertificate": { @@ -2307,6 +2304,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#GetCertificateResponse": { @@ -2324,6 +2324,9 @@ "smithy.api#documentation": "

Certificates forming the requested certificate's chain of trust. The chain consists of the\n certificate of the issuing CA and the intermediate certificates of any other subordinate CAs.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.acm#IdempotencyToken": { @@ -2406,6 +2409,9 @@ "smithy.api#documentation": "

One or more resource tags to associate with the imported certificate.

\n

Note: You cannot apply tags when reimporting a certificate.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#ImportCertificateResponse": { @@ -2417,6 +2423,9 @@ "smithy.api#documentation": "

The Amazon Resource Name\n (ARN) of the imported certificate.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.acm#InUseList": { @@ -2730,6 +2739,9 @@ "smithy.api#documentation": "

Specifies the order of sorted results. If you specify SortOrder, you must\n also specify SortBy.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#ListCertificatesResponse": { @@ -2747,6 +2759,9 @@ "smithy.api#documentation": "

A list of ACM certificates.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.acm#ListTagsForCertificate": { @@ -2779,6 +2794,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#ListTagsForCertificateResponse": { @@ -2790,6 +2808,9 @@ "smithy.api#documentation": "

The key-value pairs that define the applied tags.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.acm#MaxItems": { @@ -2905,6 +2926,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#RecordType": { @@ -2967,6 +2991,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#RenewCertificate": { @@ -2999,6 +3026,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#RenewalEligibility": { @@ -3175,6 +3205,9 @@ "smithy.api#documentation": "

Specifies the algorithm of the public and private key pair that your certificate uses to\n encrypt data. RSA is the default key algorithm for ACM certificates. Elliptic Curve Digital\n Signature Algorithm (ECDSA) keys are smaller, offering security comparable to RSA keys but\n with greater computing efficiency. However, ECDSA is not supported by all network clients.\n Some AWS services may require RSA keys, or only support ECDSA keys of a particular size, while\n others allow the use of either RSA and ECDSA keys to ensure that compatibility is not broken.\n Check the requirements for the AWS service where you plan to deploy your certificate.

\n

Default: RSA_2048

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#RequestCertificateResponse": { @@ -3186,6 +3219,9 @@ "smithy.api#documentation": "

String that contains the ARN of the issued certificate. This must be of the form:

\n

\n arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.acm#RequestInProgressException": { @@ -3250,6 +3286,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#ResourceInUseException": { @@ -3544,6 +3583,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.acm#ValidationEmailList": { diff --git a/codegen/sdk-codegen/aws-models/alexa-for-business.json b/codegen/sdk-codegen/aws-models/alexa-for-business.json index c4873543427..f5a63dd43d1 100644 --- a/codegen/sdk-codegen/aws-models/alexa-for-business.json +++ b/codegen/sdk-codegen/aws-models/alexa-for-business.json @@ -406,6 +406,7 @@ "arnNamespace": "a4b", "cloudFormationName": "AlexaForBusiness", "cloudTrailEventSource": "alexaforbusiness.amazonaws.com", + "docId": "alexaforbusiness-2017-11-09", "endpointPrefix": "a4b" }, "aws.auth#sigv4": { @@ -477,52 +478,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -530,13 +535,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -546,224 +560,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://a4b-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://a4b-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://a4b-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://a4b-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://a4b.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://a4b.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://a4b.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://a4b.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/amp.json b/codegen/sdk-codegen/aws-models/amp.json index 51fa7379346..c08e681ff37 100644 --- a/codegen/sdk-codegen/aws-models/amp.json +++ b/codegen/sdk-codegen/aws-models/amp.json @@ -259,52 +259,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -312,13 +316,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -328,224 +341,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://aps-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://aps-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://aps-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://aps-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://aps.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://aps.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://aps.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://aps.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/amplify.json b/codegen/sdk-codegen/aws-models/amplify.json index 4ada9867fc0..4348ff4ba93 100644 --- a/codegen/sdk-codegen/aws-models/amplify.json +++ b/codegen/sdk-codegen/aws-models/amplify.json @@ -242,52 +242,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -295,13 +299,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -311,224 +324,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://amplify-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://amplify-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://amplify-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://amplify-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://amplify.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://amplify.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://amplify.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://amplify.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -543,8 +507,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -556,8 +520,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -569,8 +533,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -582,8 +546,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -595,8 +559,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -608,8 +572,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -621,8 +585,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -634,8 +598,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -647,8 +611,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -660,8 +624,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -673,8 +637,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -686,8 +650,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -699,8 +663,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -712,8 +676,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -725,8 +689,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -738,8 +702,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -751,8 +715,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -764,8 +728,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -777,8 +741,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -790,8 +754,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -803,8 +767,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -816,8 +780,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -829,8 +793,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -842,8 +806,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -855,8 +819,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -868,8 +832,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -881,8 +845,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -894,8 +858,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -907,8 +871,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -920,8 +884,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -933,8 +908,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -946,8 +932,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -959,8 +956,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -972,8 +980,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -985,8 +993,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -998,8 +1006,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1010,8 +1018,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1022,10 +1030,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1188,7 +1202,7 @@ "repositoryCloneMethod": { "target": "com.amazonaws.amplify#RepositoryCloneMethod", "traits": { - "smithy.api#documentation": "\n

This is for internal use.

\n
\n

The Amplify service uses this parameter to specify the authentication protocol to use to access\n the Git repository for an Amplify app. Amplify specifies TOKEN for a GitHub\n repository, SIGV4 for an Amazon Web Services CodeCommit repository, and\n SSH for GitLab and Bitbucket repositories.

" + "smithy.api#documentation": "\n

This is for internal use.

\n
\n

The Amplify service uses this parameter to specify the authentication protocol to use to access\n the Git repository for an Amplify app. Amplify specifies TOKEN for a GitHub\n repository, SIGV4 for an Amazon Web Services CodeCommit repository, and\n SSH for GitLab and Bitbucket repositories.

" } } }, @@ -1343,7 +1357,7 @@ "enablePerformanceMode": { "target": "com.amazonaws.amplify#EnablePerformanceMode", "traits": { - "smithy.api#documentation": "

Enables performance mode for the branch.

\n

Performance mode optimizes for faster hosting performance by keeping content cached at\n the edge for a longer interval. When performance mode is enabled, hosting configuration\n or code changes can take up to 10 minutes to roll out.

" + "smithy.api#documentation": "

Enables performance mode for the branch.

\n

Performance mode optimizes for faster hosting performance by keeping content cached at\n the edge for a longer interval. When performance mode is enabled, hosting configuration\n or code changes can take up to 10 minutes to roll out.

" } }, "buildSpec": { @@ -1616,7 +1630,7 @@ "enablePerformanceMode": { "target": "com.amazonaws.amplify#EnablePerformanceMode", "traits": { - "smithy.api#documentation": "

Enables performance mode for the branch.

\n

Performance mode optimizes for faster hosting performance by keeping content cached at\n the edge for a longer interval. When performance mode is enabled, hosting configuration\n or code changes can take up to 10 minutes to roll out.

" + "smithy.api#documentation": "

Enables performance mode for the branch.

\n

Performance mode optimizes for faster hosting performance by keeping content cached at\n the edge for a longer interval. When performance mode is enabled, hosting configuration\n or code changes can take up to 10 minutes to roll out.

" } }, "thumbnailUrl": { @@ -1849,13 +1863,13 @@ "oauthToken": { "target": "com.amazonaws.amplify#OauthToken", "traits": { - "smithy.api#documentation": "

The OAuth token for a third-party source control system for an Amplify app. The OAuth\n token is used to create a webhook and a read-only deploy key using SSH cloning. The\n OAuth token is not stored.

\n

Use oauthToken for repository providers other than GitHub, such as\n Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use\n accessToken.

\n

You must specify either oauthToken or accessToken when you\n create a new app.

\n

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work\n with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub\n App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the\n Amplify User Guide .

" + "smithy.api#documentation": "

The OAuth token for a third-party source control system for an Amplify app. The OAuth\n token is used to create a webhook and a read-only deploy key using SSH cloning. The\n OAuth token is not stored.

\n

Use oauthToken for repository providers other than GitHub, such as\n Bitbucket or CodeCommit. To authorize access to GitHub as your repository provider, use\n accessToken.

\n

You must specify either oauthToken or accessToken when you\n create a new app.

\n

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work\n with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub\n App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the\n Amplify User Guide .

" } }, "accessToken": { "target": "com.amazonaws.amplify#AccessToken", "traits": { - "smithy.api#documentation": "

The personal access token for a GitHub repository for an Amplify app. The personal\n access token is used to authorize access to a GitHub repository using the Amplify GitHub\n App. The token is not stored.

\n

Use accessToken for GitHub repositories only. To authorize access to a\n repository provider such as Bitbucket or CodeCommit, use oauthToken.

\n

You must specify either accessToken or oauthToken when you\n create a new app.

\n

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work\n with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub\n App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the\n Amplify User Guide .

" + "smithy.api#documentation": "

The personal access token for a GitHub repository for an Amplify app. The personal\n access token is used to authorize access to a GitHub repository using the Amplify GitHub\n App. The token is not stored.

\n

Use accessToken for GitHub repositories only. To authorize access to a\n repository provider such as Bitbucket or CodeCommit, use oauthToken.

\n

You must specify either accessToken or oauthToken when you\n create a new app.

\n

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work\n with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub\n App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the\n Amplify User Guide .

" } }, "environmentVariables": { @@ -1932,7 +1946,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure used to create apps in Amplify.

" + "smithy.api#documentation": "

The request structure used to create apps in Amplify.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#CreateAppResult": { @@ -1944,6 +1959,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.amplify#CreateBackendEnvironment": { @@ -2012,7 +2030,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the backend environment create request.

" + "smithy.api#documentation": "

The request structure for the backend environment create request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#CreateBackendEnvironmentResult": { @@ -2027,7 +2046,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the create backend environment request.

" + "smithy.api#documentation": "

The result structure for the create backend environment request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#CreateBranch": { @@ -2136,7 +2156,7 @@ "enablePerformanceMode": { "target": "com.amazonaws.amplify#EnablePerformanceMode", "traits": { - "smithy.api#documentation": "

Enables performance mode for the branch.

\n

Performance mode optimizes for faster hosting performance by keeping content cached at\n the edge for a longer interval. When performance mode is enabled, hosting configuration\n or code changes can take up to 10 minutes to roll out.

" + "smithy.api#documentation": "

Enables performance mode for the branch.

\n

Performance mode optimizes for faster hosting performance by keeping content cached at\n the edge for a longer interval. When performance mode is enabled, hosting configuration\n or code changes can take up to 10 minutes to roll out.

" } }, "tags": { @@ -2183,7 +2203,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the create branch request.

" + "smithy.api#documentation": "

The request structure for the create branch request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#CreateBranchResult": { @@ -2198,7 +2219,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for create branch request.

" + "smithy.api#documentation": "

The result structure for create branch request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#CreateDeployment": { @@ -2259,7 +2281,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the create a new deployment request.

" + "smithy.api#documentation": "

The request structure for the create a new deployment request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#CreateDeploymentResult": { @@ -2287,7 +2310,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the create a new deployment request.

" + "smithy.api#documentation": "

The result structure for the create a new deployment request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#CreateDomainAssociation": { @@ -2372,7 +2396,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the create domain association request.

" + "smithy.api#documentation": "

The request structure for the create domain association request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#CreateDomainAssociationResult": { @@ -2387,7 +2412,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the create domain association request.

" + "smithy.api#documentation": "

The result structure for the create domain association request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#CreateTime": { @@ -2456,7 +2482,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the create webhook request.

" + "smithy.api#documentation": "

The request structure for the create webhook request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#CreateWebhookResult": { @@ -2471,7 +2498,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the create webhook request.

" + "smithy.api#documentation": "

The result structure for the create webhook request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#CustomDomain": { @@ -2525,7 +2553,7 @@ "status": { "target": "com.amazonaws.amplify#Status", "traits": { - "smithy.api#documentation": "

The status code for a URL rewrite or redirect rule.

\n\n
\n
200
\n
\n

Represents a 200 rewrite rule.

\n
\n
301
\n
\n

Represents a 301 (moved pemanently) redirect rule. This and all future\n requests should be directed to the target URL.

\n
\n
302
\n
\n

Represents a 302 temporary redirect rule.

\n
\n
404
\n
\n

Represents a 404 redirect rule.

\n
\n
404-200
\n
\n

Represents a 404 rewrite rule.

\n
\n
" + "smithy.api#documentation": "

The status code for a URL rewrite or redirect rule.

\n
\n
200
\n
\n

Represents a 200 rewrite rule.

\n
\n
301
\n
\n

Represents a 301 (moved pemanently) redirect rule. This and all future\n requests should be directed to the target URL.

\n
\n
302
\n
\n

Represents a 302 temporary redirect rule.

\n
\n
404
\n
\n

Represents a 404 redirect rule.

\n
\n
404-200
\n
\n

Represents a 404 rewrite rule.

\n
\n
" } }, "condition": { @@ -2610,7 +2638,8 @@ } }, "traits": { - "smithy.api#documentation": "

Describes the request structure for the delete app request.

" + "smithy.api#documentation": "

Describes the request structure for the delete app request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#DeleteAppResult": { @@ -2624,7 +2653,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the delete app request.

" + "smithy.api#documentation": "

The result structure for the delete app request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#DeleteBackendEnvironment": { @@ -2682,7 +2712,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the delete backend environment request.

" + "smithy.api#documentation": "

The request structure for the delete backend environment request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#DeleteBackendEnvironmentResult": { @@ -2697,7 +2728,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure of the delete backend environment result.

" + "smithy.api#documentation": "

The result structure of the delete backend environment result.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#DeleteBranch": { @@ -2755,7 +2787,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the delete branch request.

" + "smithy.api#documentation": "

The request structure for the delete branch request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#DeleteBranchResult": { @@ -2770,7 +2803,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the delete branch request.

" + "smithy.api#documentation": "

The result structure for the delete branch request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#DeleteDomainAssociation": { @@ -2828,7 +2862,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the delete domain association request.

" + "smithy.api#documentation": "

The request structure for the delete domain association request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#DeleteDomainAssociationResult": { @@ -2840,6 +2875,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.amplify#DeleteJob": { @@ -2905,7 +2943,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the delete job request.

" + "smithy.api#documentation": "

The request structure for the delete job request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#DeleteJobResult": { @@ -2919,7 +2958,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the delete job request.

" + "smithy.api#documentation": "

The result structure for the delete job request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#DeleteWebhook": { @@ -2969,7 +3009,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the delete webhook request.

" + "smithy.api#documentation": "

The request structure for the delete webhook request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#DeleteWebhookResult": { @@ -2984,7 +3025,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the delete webhook request.

" + "smithy.api#documentation": "

The result structure for the delete webhook request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#DependentServiceFailureException": { @@ -3371,7 +3413,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the generate access logs request.

" + "smithy.api#documentation": "

The request structure for the generate access logs request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#GenerateAccessLogsResult": { @@ -3385,7 +3428,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the generate access logs request.

" + "smithy.api#documentation": "

The result structure for the generate access logs request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#GetApp": { @@ -3432,7 +3476,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the get app request.

" + "smithy.api#documentation": "

The request structure for the get app request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#GetAppResult": { @@ -3444,6 +3489,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.amplify#GetArtifactUrl": { @@ -3493,7 +3541,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returns the request structure for the get artifact request.

" + "smithy.api#documentation": "

Returns the request structure for the get artifact request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#GetArtifactUrlResult": { @@ -3515,7 +3564,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returns the result structure for the get artifact request.

" + "smithy.api#documentation": "

Returns the result structure for the get artifact request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#GetBackendEnvironment": { @@ -3570,7 +3620,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the get backend environment request.

" + "smithy.api#documentation": "

The request structure for the get backend environment request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#GetBackendEnvironmentResult": { @@ -3585,7 +3636,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the get backend environment result.

" + "smithy.api#documentation": "

The result structure for the get backend environment result.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#GetBranch": { @@ -3640,7 +3692,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the get branch request.

" + "smithy.api#documentation": "

The request structure for the get branch request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#GetBranchResult": { @@ -3652,6 +3705,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.amplify#GetDomainAssociation": { @@ -3706,7 +3762,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the get domain association request.

" + "smithy.api#documentation": "

The request structure for the get domain association request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#GetDomainAssociationResult": { @@ -3721,7 +3778,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the get domain association request.

" + "smithy.api#documentation": "

The result structure for the get domain association request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#GetJob": { @@ -3787,7 +3845,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the get job request.

" + "smithy.api#documentation": "

The request structure for the get job request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#GetJobResult": { @@ -3799,6 +3858,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.amplify#GetWebhook": { @@ -3848,7 +3910,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the get webhook request.

" + "smithy.api#documentation": "

The request structure for the get webhook request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#GetWebhookResult": { @@ -3863,7 +3926,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the get webhook request.

" + "smithy.api#documentation": "

The result structure for the get webhook request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#InternalFailureException": { @@ -4152,7 +4216,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the list apps request.

" + "smithy.api#documentation": "

The request structure for the list apps request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#ListAppsResult": { @@ -4173,7 +4238,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for an Amplify app list request.

" + "smithy.api#documentation": "

The result structure for an Amplify app list request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#ListArtifacts": { @@ -4251,7 +4317,8 @@ } }, "traits": { - "smithy.api#documentation": "

Describes the request structure for the list artifacts request.

" + "smithy.api#documentation": "

Describes the request structure for the list artifacts request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#ListArtifactsResult": { @@ -4272,7 +4339,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the list artifacts request.

" + "smithy.api#documentation": "

The result structure for the list artifacts request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#ListBackendEnvironments": { @@ -4338,7 +4406,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the list backend environments request.

" + "smithy.api#documentation": "

The request structure for the list backend environments request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#ListBackendEnvironmentsResult": { @@ -4359,7 +4428,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the list backend environments result.

" + "smithy.api#documentation": "

The result structure for the list backend environments result.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#ListBranches": { @@ -4418,7 +4488,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the list branches request.

" + "smithy.api#documentation": "

The request structure for the list branches request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#ListBranchesResult": { @@ -4439,7 +4510,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the list branches request.

" + "smithy.api#documentation": "

The result structure for the list branches request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#ListDomainAssociations": { @@ -4498,7 +4570,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the list domain associations request.

" + "smithy.api#documentation": "

The request structure for the list domain associations request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#ListDomainAssociationsResult": { @@ -4519,7 +4592,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the list domain association request.

" + "smithy.api#documentation": "

The result structure for the list domain association request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#ListJobs": { @@ -4589,7 +4663,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the list jobs request.

" + "smithy.api#documentation": "

The request structure for the list jobs request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#ListJobsResult": { @@ -4610,7 +4685,8 @@ } }, "traits": { - "smithy.api#documentation": "

The maximum number of records to list in a single response.

" + "smithy.api#documentation": "

The maximum number of records to list in a single response.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#ListTagsForResource": { @@ -4654,7 +4730,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure to use to list tags for a resource.

" + "smithy.api#documentation": "

The request structure to use to list tags for a resource.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#ListTagsForResourceResponse": { @@ -4668,7 +4745,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response for the list tags for resource request.

" + "smithy.api#documentation": "

The response for the list tags for resource request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#ListWebhooks": { @@ -4730,7 +4808,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the list webhooks request.

" + "smithy.api#documentation": "

The request structure for the list webhooks request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#ListWebhooksResult": { @@ -4751,7 +4830,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the list webhooks request.

" + "smithy.api#documentation": "

The result structure for the list webhooks request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#LogUrl": { @@ -5108,7 +5188,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the start a deployment request.

" + "smithy.api#documentation": "

The request structure for the start a deployment request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#StartDeploymentResult": { @@ -5123,7 +5204,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the start a deployment request.

" + "smithy.api#documentation": "

The result structure for the start a deployment request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#StartJob": { @@ -5218,7 +5300,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the start job request.

" + "smithy.api#documentation": "

The request structure for the start job request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#StartJobResult": { @@ -5233,7 +5316,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the run job request.

" + "smithy.api#documentation": "

The result structure for the run job request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#StartTime": { @@ -5414,7 +5498,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the stop job request.

" + "smithy.api#documentation": "

The request structure for the stop job request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#StopJobResult": { @@ -5429,7 +5514,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the stop job request.

" + "smithy.api#documentation": "

The result structure for the stop job request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#SubDomain": { @@ -5603,14 +5689,16 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure to tag a resource with a tag key and value.

" + "smithy.api#documentation": "

The request structure to tag a resource with a tag key and value.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#TagResourceResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The response for the tag resource request.

" + "smithy.api#documentation": "

The response for the tag resource request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#TagValue": { @@ -5740,14 +5828,16 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the untag resource request.

" + "smithy.api#documentation": "

The request structure for the untag resource request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#UntagResourceResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The response for the untag resource request.

" + "smithy.api#documentation": "

The response for the untag resource request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#UpdateApp": { @@ -5891,18 +5981,19 @@ "oauthToken": { "target": "com.amazonaws.amplify#OauthToken", "traits": { - "smithy.api#documentation": "

The OAuth token for a third-party source control system for an Amplify app. The OAuth\n token is used to create a webhook and a read-only deploy key using SSH cloning. The\n OAuth token is not stored.

\n

Use oauthToken for repository providers other than GitHub, such as\n Bitbucket or CodeCommit.

\n

To authorize access to GitHub as your repository provider, use\n accessToken.

\n

You must specify either oauthToken or accessToken when you\n update an app.

\n

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work\n with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub\n App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the\n Amplify User Guide .

" + "smithy.api#documentation": "

The OAuth token for a third-party source control system for an Amplify app. The OAuth\n token is used to create a webhook and a read-only deploy key using SSH cloning. The\n OAuth token is not stored.

\n

Use oauthToken for repository providers other than GitHub, such as\n Bitbucket or CodeCommit.

\n

To authorize access to GitHub as your repository provider, use\n accessToken.

\n

You must specify either oauthToken or accessToken when you\n update an app.

\n

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work\n with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub\n App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the\n Amplify User Guide .

" } }, "accessToken": { "target": "com.amazonaws.amplify#AccessToken", "traits": { - "smithy.api#documentation": "

The personal access token for a GitHub repository for an Amplify app. The personal\n access token is used to authorize access to a GitHub repository using the Amplify GitHub\n App. The token is not stored.

\n

Use accessToken for GitHub repositories only. To authorize access to a\n repository provider such as Bitbucket or CodeCommit, use oauthToken.

\n

You must specify either accessToken or oauthToken when you\n update an app.

\n

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work\n with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub\n App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the\n Amplify User Guide .

" + "smithy.api#documentation": "

The personal access token for a GitHub repository for an Amplify app. The personal\n access token is used to authorize access to a GitHub repository using the Amplify GitHub\n App. The token is not stored.

\n

Use accessToken for GitHub repositories only. To authorize access to a\n repository provider such as Bitbucket or CodeCommit, use oauthToken.

\n

You must specify either accessToken or oauthToken when you\n update an app.

\n

Existing Amplify apps deployed from a GitHub repository using OAuth continue to work\n with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub\n App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the\n Amplify User Guide .

" } } }, "traits": { - "smithy.api#documentation": "

The request structure for the update app request.

" + "smithy.api#documentation": "

The request structure for the update app request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#UpdateAppResult": { @@ -5917,7 +6008,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for an Amplify app update request.

" + "smithy.api#documentation": "

The result structure for an Amplify app update request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#UpdateBranch": { @@ -6024,7 +6116,7 @@ "enablePerformanceMode": { "target": "com.amazonaws.amplify#EnablePerformanceMode", "traits": { - "smithy.api#documentation": "

Enables performance mode for the branch.

\n

Performance mode optimizes for faster hosting performance by keeping content cached at\n the edge for a longer interval. When performance mode is enabled, hosting configuration\n or code changes can take up to 10 minutes to roll out.

" + "smithy.api#documentation": "

Enables performance mode for the branch.

\n

Performance mode optimizes for faster hosting performance by keeping content cached at\n the edge for a longer interval. When performance mode is enabled, hosting configuration\n or code changes can take up to 10 minutes to roll out.

" } }, "buildSpec": { @@ -6065,7 +6157,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the update branch request.

" + "smithy.api#documentation": "

The request structure for the update branch request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#UpdateBranchResult": { @@ -6080,7 +6173,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the update branch request.

" + "smithy.api#documentation": "

The result structure for the update branch request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#UpdateDomainAssociation": { @@ -6162,7 +6256,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the update domain association request.

" + "smithy.api#documentation": "

The request structure for the update domain association request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#UpdateDomainAssociationResult": { @@ -6177,7 +6272,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the update domain association request.

" + "smithy.api#documentation": "

The result structure for the update domain association request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#UpdateTime": { @@ -6242,7 +6338,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request structure for the update webhook request.

" + "smithy.api#documentation": "

The request structure for the update webhook request.

", + "smithy.api#input": {} } }, "com.amazonaws.amplify#UpdateWebhookResult": { @@ -6257,7 +6354,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result structure for the update webhook request.

" + "smithy.api#documentation": "

The result structure for the update webhook request.

", + "smithy.api#output": {} } }, "com.amazonaws.amplify#UploadUrl": { diff --git a/codegen/sdk-codegen/aws-models/api-gateway.json b/codegen/sdk-codegen/aws-models/api-gateway.json index 2cecabc523a..944d6b808e1 100644 --- a/codegen/sdk-codegen/aws-models/api-gateway.json +++ b/codegen/sdk-codegen/aws-models/api-gateway.json @@ -739,6 +739,7 @@ "arnNamespace": "apigateway", "cloudFormationName": "ApiGateway", "cloudTrailEventSource": "apigateway.amazonaws.com", + "docId": "apigateway-2015-07-09", "endpointPrefix": "apigateway" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/apigatewaymanagementapi.json b/codegen/sdk-codegen/aws-models/apigatewaymanagementapi.json index b2f9fb22660..02e62e34c39 100644 --- a/codegen/sdk-codegen/aws-models/apigatewaymanagementapi.json +++ b/codegen/sdk-codegen/aws-models/apigatewaymanagementapi.json @@ -117,52 +117,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -170,13 +174,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -186,224 +199,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://execute-api-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://execute-api-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://execute-api-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://execute-api-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://execute-api.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://execute-api.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://execute-api.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://execute-api.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -418,8 +382,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -431,8 +395,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -444,8 +408,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -457,8 +421,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -470,8 +434,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -483,8 +447,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -496,8 +460,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -509,8 +473,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -522,8 +486,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -535,8 +499,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -548,8 +512,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -561,8 +525,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -574,8 +549,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -587,8 +573,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -600,8 +597,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -613,8 +621,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -626,8 +634,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -639,8 +647,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -651,8 +659,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -663,10 +671,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -721,6 +735,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.apigatewaymanagementapi#ForbiddenException": { @@ -770,6 +787,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.apigatewaymanagementapi#GetConnectionResponse": { @@ -795,6 +815,9 @@ "smithy.api#jsonName": "lastActiveAt" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.apigatewaymanagementapi#GoneException": { @@ -902,6 +925,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.apigatewaymanagementapi#__string": { diff --git a/codegen/sdk-codegen/aws-models/apigatewayv2.json b/codegen/sdk-codegen/aws-models/apigatewayv2.json index 69324333bed..d1949818061 100644 --- a/codegen/sdk-codegen/aws-models/apigatewayv2.json +++ b/codegen/sdk-codegen/aws-models/apigatewayv2.json @@ -484,52 +484,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -537,13 +541,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -553,224 +566,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://apigateway-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://apigateway-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://apigateway-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://apigateway-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://apigateway.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://apigateway.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://apigateway.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://apigateway.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/app-mesh.json b/codegen/sdk-codegen/aws-models/app-mesh.json index 301e46618a1..0f90d11fa5d 100644 --- a/codegen/sdk-codegen/aws-models/app-mesh.json +++ b/codegen/sdk-codegen/aws-models/app-mesh.json @@ -118,52 +118,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -171,13 +175,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -187,224 +200,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://appmesh-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://appmesh-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://appmesh-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://appmesh-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://appmesh.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://appmesh.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://appmesh.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://appmesh.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -419,8 +383,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -432,8 +396,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -445,8 +409,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -458,8 +422,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -471,8 +435,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -484,8 +448,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -497,8 +461,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -510,8 +474,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -523,8 +487,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -536,8 +500,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -549,8 +513,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -562,8 +526,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -575,8 +539,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -588,8 +552,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -601,8 +565,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -614,8 +578,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -627,8 +591,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -640,8 +604,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -653,8 +617,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -666,8 +630,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -679,8 +643,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -692,8 +656,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -705,8 +669,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -718,8 +682,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -731,8 +695,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -744,8 +708,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -757,8 +721,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -770,8 +734,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -783,8 +747,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -796,8 +760,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -809,8 +773,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -822,8 +786,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -835,8 +799,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -848,8 +812,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -861,8 +825,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -874,8 +838,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -887,8 +851,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -900,8 +864,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -913,8 +877,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -926,8 +890,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -939,8 +903,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -952,8 +916,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -965,8 +929,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -978,8 +942,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -991,8 +955,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1004,8 +968,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1017,8 +981,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1030,8 +994,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1043,8 +1007,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1056,8 +1020,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1069,8 +1033,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1082,8 +1046,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1095,8 +1070,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1108,8 +1094,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1121,8 +1118,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1134,8 +1142,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1147,8 +1155,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1160,8 +1168,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1172,8 +1180,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1184,10 +1192,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -10002,4 +10016,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/appconfig.json b/codegen/sdk-codegen/aws-models/appconfig.json index dd8a0f4ba7c..d5a67001b2e 100644 --- a/codegen/sdk-codegen/aws-models/appconfig.json +++ b/codegen/sdk-codegen/aws-models/appconfig.json @@ -399,52 +399,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -452,13 +456,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -468,92 +481,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://appconfig-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://appconfig-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -562,168 +566,128 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "Region" + }, + "us-gov-east-1" ] } ], - "type": "tree", - "rules": [ + "endpoint": { + "url": "https://appconfig.us-gov-east-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://appconfig.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + "fn": "stringEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://appconfig.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "Region" }, - { - "conditions": [], - "endpoint": { - "url": "https://appconfig-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "us-gov-west-1" ] } - ] + ], + "endpoint": { + "url": "https://appconfig.us-gov-west-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://appconfig-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://appconfig.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://appconfig.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://appconfig.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://appconfig.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -738,8 +702,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -751,8 +715,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -764,8 +728,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -777,8 +741,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -790,8 +754,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -803,8 +767,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -816,8 +780,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -829,8 +793,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -842,8 +806,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -855,8 +819,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -868,8 +832,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -881,8 +845,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -894,8 +858,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -907,8 +871,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -920,8 +884,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -933,8 +897,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -946,8 +910,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -959,8 +923,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -972,8 +936,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -985,8 +949,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -998,8 +962,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1011,8 +975,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1024,8 +988,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1037,8 +1001,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1050,8 +1014,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1063,8 +1027,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1076,8 +1040,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1089,8 +1053,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1102,8 +1066,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1115,8 +1079,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1128,8 +1092,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1141,8 +1105,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1154,8 +1118,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1167,8 +1131,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1180,8 +1144,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1193,8 +1157,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1206,8 +1170,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1219,8 +1183,19 @@ }, "params": { "Region": "us-iso-west-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1232,8 +1207,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1245,8 +1231,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1258,8 +1255,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1271,8 +1279,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1284,8 +1292,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1296,8 +1304,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1308,10 +1316,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1663,6 +1677,21 @@ ], "traits": { "smithy.api#documentation": "

Creates an application. In AppConfig, an application is simply an\n organizational construct like a folder. This organizational construct has a relationship\n with some unit of executable code. For example, you could create an application called\n MyMobileApp to organize and manage configuration data for a mobile application installed by\n your users.

", + "smithy.api#examples": [ + { + "title": "To create an application", + "documentation": "The following create-application example creates an application in AWS AppConfig.", + "input": { + "Name": "example-application", + "Description": "An application used for creating an example." + }, + "output": { + "Id": "339ohji", + "Name": "example-application", + "Description": "An application used for creating an example." + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/applications", @@ -1718,6 +1747,25 @@ ], "traits": { "smithy.api#documentation": "

Creates a configuration profile, which is information that enables AppConfig\n to access the configuration source. Valid configuration sources include the\n following:

\n \n

A configuration profile includes the following information:

\n \n

For more information, see Create a\n Configuration and a Configuration Profile in the AppConfig\n User Guide.

", + "smithy.api#examples": [ + { + "title": "To create a configuration profile", + "documentation": "The following create-configuration-profile example creates a configuration profile using a configuration stored in Parameter Store, a capability of Systems Manager.", + "input": { + "ApplicationId": "339ohji", + "Name": "Example-Configuration-Profile", + "LocationUri": "ssm-parameter://Example-Parameter", + "RetrievalRoleArn": "arn:aws:iam::111122223333:role/Example-App-Config-Role" + }, + "output": { + "ApplicationId": "339ohji", + "Id": "ur8hx2f", + "Name": "Example-Configuration-Profile", + "LocationUri": "ssm-parameter://Example-Parameter", + "RetrievalRoleArn": "arn:aws:iam::111122223333:role/Example-App-Config-Role" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/applications/{ApplicationId}/configurationprofiles", @@ -1803,6 +1851,27 @@ ], "traits": { "smithy.api#documentation": "

Creates a deployment strategy that defines important criteria for rolling out your\n configuration to the designated targets. A deployment strategy includes the overall\n duration required, a percentage of targets to receive the deployment during each interval,\n an algorithm that defines how percentage grows, and bake time.

", + "smithy.api#examples": [ + { + "title": "To create a deployment strategy", + "documentation": "The following create-deployment-strategy example creates a deployment strategy called Example-Deployment that takes 15 minutes and deploys the configuration to 25% of the application at a time. The strategy is also copied to an SSM Document.", + "input": { + "Name": "Example-Deployment", + "DeploymentDurationInMinutes": 15, + "GrowthFactor": 25, + "ReplicateTo": "SSM_DOCUMENT" + }, + "output": { + "Id": "1225qzk", + "Name": "Example-Deployment", + "DeploymentDurationInMinutes": 15, + "GrowthType": "LINEAR", + "GrowthFactor": 25, + "FinalBakeTimeInMinutes": 0, + "ReplicateTo": "SSM_DOCUMENT" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/deploymentstrategies", @@ -1893,6 +1962,22 @@ ], "traits": { "smithy.api#documentation": "

Creates an environment. For each application, you define one or more environments. An\n environment is a deployment group of AppConfig targets, such as applications in a\n Beta or Production environment. You can also define\n environments for application subcomponents such as the Web,\n Mobile and Back-end components for your application. You can\n configure Amazon CloudWatch alarms for each environment. The system monitors alarms during a\n configuration deployment. If an alarm is triggered, the system rolls back the\n configuration.

", + "smithy.api#examples": [ + { + "title": "To create an environment", + "documentation": "The following create-environment example creates an AWS AppConfig environment named Example-Environment using the application you created using create-application", + "input": { + "ApplicationId": "339ohji", + "Name": "Example-Environment" + }, + "output": { + "ApplicationId": "339ohji", + "Id": "54j1r29", + "Name": "Example-Environment", + "State": "READY_FOR_DEPLOYMENT" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/applications/{ApplicationId}/environments", @@ -2122,6 +2207,25 @@ ], "traits": { "smithy.api#documentation": "

Creates a new configuration in the AppConfig hosted configuration\n store.

", + "smithy.api#examples": [ + { + "title": "To create a hosted configuration version", + "documentation": "The following create-hosted-configuration-version example creates a new configuration in the AWS AppConfig configuration store.", + "input": { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f", + "Content": "eyAiTmFtZSI6ICJFeGFtcGxlQXBwbGljYXRpb24iLCAiSWQiOiBFeGFtcGxlSUQsICJSYW5rIjogNyB9", + "ContentType": "text", + "LatestVersionNumber": 1 + }, + "output": { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f", + "VersionNumber": 1, + "ContentType": "text" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions", @@ -2212,6 +2316,15 @@ ], "traits": { "smithy.api#documentation": "

Deletes an application. Deleting an application does not delete a configuration from a\n host.

", + "smithy.api#examples": [ + { + "title": "To delete an application", + "documentation": "The following delete-application example deletes the specified application. \n", + "input": { + "ApplicationId": "339ohji" + } + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/applications/{ApplicationId}", @@ -2259,6 +2372,16 @@ ], "traits": { "smithy.api#documentation": "

Deletes a configuration profile. Deleting a configuration profile does not delete a\n configuration from a host.

", + "smithy.api#examples": [ + { + "title": "To delete a configuration profile", + "documentation": "The following delete-configuration-profile example deletes the specified configuration profile.", + "input": { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f" + } + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}", @@ -2311,6 +2434,15 @@ ], "traits": { "smithy.api#documentation": "

Deletes a deployment strategy. Deleting a deployment strategy does not delete a\n configuration from a host.

", + "smithy.api#examples": [ + { + "title": "To delete a deployment strategy", + "documentation": "The following delete-deployment-strategy example deletes the specified deployment strategy.", + "input": { + "DeploymentStrategyId": "1225qzk" + } + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/deployementstrategies/{DeploymentStrategyId}", @@ -2358,6 +2490,16 @@ ], "traits": { "smithy.api#documentation": "

Deletes an environment. Deleting an environment does not delete a configuration from a\n host.

", + "smithy.api#examples": [ + { + "title": "To delete an environment", + "documentation": "The following delete-environment example deletes the specified application environment.", + "input": { + "ApplicationId": "339ohji", + "EnvironmentId": "54j1r29" + } + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/applications/{ApplicationId}/environments/{EnvironmentId}", @@ -2506,6 +2648,17 @@ ], "traits": { "smithy.api#documentation": "

Deletes a version of a configuration from the AppConfig hosted configuration\n store.

", + "smithy.api#examples": [ + { + "title": "To delete a hosted configuration version", + "documentation": "The following delete-hosted-configuration-version example deletes a configuration version hosted in the AWS AppConfig configuration store.", + "input": { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f", + "VersionNumber": 1 + } + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions/{VersionNumber}", @@ -3325,6 +3478,19 @@ ], "traits": { "smithy.api#documentation": "

Retrieves information about an application.

", + "smithy.api#examples": [ + { + "title": "To list details of an application", + "documentation": "The following get-application example lists the details of the specified application.", + "input": { + "ApplicationId": "339ohji" + }, + "output": { + "Id": "339ohji", + "Name": "example-application" + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/applications/{ApplicationId}", @@ -3372,6 +3538,22 @@ "message": "This API has been deprecated in favor of the GetLatestConfiguration API used in conjunction with StartConfigurationSession." }, "smithy.api#documentation": "

(Deprecated) Retrieves the latest deployed configuration.

\n \n

Note the following important information.

\n \n
", + "smithy.api#examples": [ + { + "title": "To retrieve configuration details", + "documentation": "The following get-configuration example returns the configuration details of the example application. On subsequent calls to get-configuration, use the client-configuration-version parameter to only update the configuration of your application if the version has changed. Only updating the configuration when the version has changed avoids excess charges incurred by calling get-configuration.", + "input": { + "Application": "example-application", + "Environment": "Example-Environment", + "Configuration": "Example-Configuration-Profile", + "ClientId": "example-id" + }, + "output": { + "ConfigurationVersion": "1", + "ContentType": "application/octet-stream" + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/applications/{Application}/environments/{Environment}/configurations/{Configuration}", @@ -3400,6 +3582,23 @@ ], "traits": { "smithy.api#documentation": "

Retrieves information about a configuration profile.

", + "smithy.api#examples": [ + { + "title": "To retrieve configuration profile details", + "documentation": "The following get-configuration-profile example returns the details of the specified configuration profile.", + "input": { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f" + }, + "output": { + "ApplicationId": "339ohji", + "Id": "ur8hx2f", + "Name": "Example-Configuration-Profile", + "LocationUri": "ssm-parameter://Example-Parameter", + "RetrievalRoleArn": "arn:aws:iam::111122223333:role/Example-App-Config-Role" + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}", @@ -3560,6 +3759,24 @@ ], "traits": { "smithy.api#documentation": "

Retrieves information about a deployment strategy. A deployment strategy defines\n important criteria for rolling out your configuration to the designated targets. A\n deployment strategy includes the overall duration required, a percentage of targets to\n receive the deployment during each interval, an algorithm that defines how percentage\n grows, and bake time.

", + "smithy.api#examples": [ + { + "title": "To retrieve details of a deployment strategy", + "documentation": "The following get-deployment-strategy example lists the details of the specified deployment strategy.", + "input": { + "DeploymentStrategyId": "1225qzk" + }, + "output": { + "Id": "1225qzk", + "Name": "Example-Deployment", + "DeploymentDurationInMinutes": 15, + "GrowthType": "LINEAR", + "GrowthFactor": 25, + "FinalBakeTimeInMinutes": 0, + "ReplicateTo": "SSM_DOCUMENT" + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/deploymentstrategies/{DeploymentStrategyId}", @@ -3604,6 +3821,22 @@ ], "traits": { "smithy.api#documentation": "

Retrieves information about an environment. An environment is a deployment group of\n AppConfig applications, such as applications in a Production\n environment or in an EU_Region environment. Each configuration deployment\n targets an environment. You can enable one or more Amazon CloudWatch alarms for an environment. If\n an alarm is triggered during a deployment, AppConfig roles back the\n configuration.

", + "smithy.api#examples": [ + { + "title": "To retrieve environment details", + "documentation": "The following get-environment example returns the details and state of the specified environment.", + "input": { + "ApplicationId": "339ohji", + "EnvironmentId": "54j1r29" + }, + "output": { + "ApplicationId": "339ohji", + "Id": "54j1r29", + "Name": "Example-Environment", + "State": "READY_FOR_DEPLOYMENT" + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/applications/{ApplicationId}/environments/{EnvironmentId}", @@ -3752,6 +3985,23 @@ ], "traits": { "smithy.api#documentation": "

Retrieves information about a specific configuration version.

", + "smithy.api#examples": [ + { + "title": "To retrieve hosted configuration details", + "documentation": "The following get-hosted-configuration-version example retrieves the configuration details of the AWS AppConfig hosted configuration.", + "input": { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f", + "VersionNumber": 1 + }, + "output": { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f", + "VersionNumber": 1, + "ContentType": "application/json" + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions/{VersionNumber}", @@ -4044,6 +4294,25 @@ ], "traits": { "smithy.api#documentation": "

Lists all applications in your Amazon Web Services account.

", + "smithy.api#examples": [ + { + "title": "To list the available applications", + "documentation": "The following list-applications example lists the available applications in your AWS account.", + "output": { + "Items": [ + { + "Id": "339ohji", + "Name": "test-application", + "Description": "An application used for creating an example." + }, + { + "Id": "rwalwu7", + "Name": "Test-Application" + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/applications", @@ -4100,6 +4369,25 @@ ], "traits": { "smithy.api#documentation": "

Lists the configuration profiles for an application.

", + "smithy.api#examples": [ + { + "title": "To list the available configuration profiles", + "documentation": "The following list-configuration-profiles example lists the available configuration profiles for the specified application.", + "input": { + "ApplicationId": "339ohji" + }, + "output": { + "Items": [ + { + "ApplicationId": "339ohji", + "Id": "ur8hx2f", + "Name": "Example-Configuration-Profile", + "LocationUri": "ssm-parameter://Example-Parameter" + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/applications/{ApplicationId}/configurationprofiles", @@ -4168,6 +4456,25 @@ ], "traits": { "smithy.api#documentation": "

Lists deployment strategies.

", + "smithy.api#examples": [ + { + "title": "To list the available deployment strategies", + "documentation": "The following list-deployment-strategies example lists the available deployment strategies in your AWS account.", + "output": { + "Items": [ + { + "Id": "1225qzk", + "Name": "Example-Deployment", + "DeploymentDurationInMinutes": 15, + "GrowthType": "LINEAR", + "GrowthFactor": 25, + "FinalBakeTimeInMinutes": 0, + "ReplicateTo": "SSM_DOCUMENT" + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/deploymentstrategies", @@ -4296,6 +4603,25 @@ ], "traits": { "smithy.api#documentation": "

Lists the environments for an application.

", + "smithy.api#examples": [ + { + "title": "To list the available environments", + "documentation": "The following list-environments example lists the available environments in your AWS account for the specified application.", + "input": { + "ApplicationId": "339ohji" + }, + "output": { + "Items": [ + { + "ApplicationId": "339ohji", + "Id": "54j1r29", + "Name": "Example-Environment", + "State": "READY_FOR_DEPLOYMENT" + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/applications/{ApplicationId}/environments", @@ -4495,6 +4821,26 @@ ], "traits": { "smithy.api#documentation": "

Lists configurations stored in the AppConfig hosted configuration store by\n version.

", + "smithy.api#examples": [ + { + "title": "To list the available hosted configuration versions", + "documentation": "The following list-hosted-configuration-versions example lists the configurations versions hosted in the AWS AppConfig hosted configuration store for the specified application and configuration profile.", + "input": { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f" + }, + "output": { + "Items": [ + { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f", + "VersionNumber": 1, + "ContentType": "application/json" + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/hostedconfigurationversions", @@ -4574,6 +4920,20 @@ ], "traits": { "smithy.api#documentation": "

Retrieves the list of key-value tags assigned to the resource.

", + "smithy.api#examples": [ + { + "title": "To list the tags of an application", + "documentation": "The following list-tags-for-resource example lists the tags of a specified application.", + "input": { + "ResourceArn": "arn:aws:appconfig:us-east-1:111122223333:application/339ohji" + }, + "output": { + "Tags": { + "group1": "1" + } + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/tags/{ResourceArn}", @@ -4957,6 +5317,24 @@ ], "traits": { "smithy.api#documentation": "

Stops a deployment. This API action works only on deployments that have a status of\n DEPLOYING. This action moves the deployment to a status of\n ROLLED_BACK.

", + "smithy.api#examples": [ + { + "title": "To stop configuration deployment", + "documentation": "The following stop-deployment example stops the deployment of an application configuration to the specified environment.", + "input": { + "ApplicationId": "339ohji", + "EnvironmentId": "54j1r29", + "DeploymentNumber": 2 + }, + "output": { + "DeploymentNumber": 2, + "DeploymentDurationInMinutes": 15, + "GrowthFactor": 25.0, + "FinalBakeTimeInMinutes": 0, + "PercentageComplete": 1.0 + } + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/applications/{ApplicationId}/environments/{EnvironmentId}/deployments/{DeploymentNumber}", @@ -5094,6 +5472,18 @@ ], "traits": { "smithy.api#documentation": "

Assigns metadata to an AppConfig resource. Tags help organize and categorize\n your AppConfig resources. Each tag consists of a key and an optional value, both\n of which you define. You can specify a maximum of 50 tags for a resource.

", + "smithy.api#examples": [ + { + "title": "To tag an application", + "documentation": "The following tag-resource example tags an application resource.", + "input": { + "ResourceArn": "arn:aws:appconfig:us-east-1:111122223333:application/339ohji", + "Tags": { + "group1": "1" + } + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/tags/{ResourceArn}", @@ -5183,6 +5573,18 @@ ], "traits": { "smithy.api#documentation": "

Deletes a tag key and value from an AppConfig resource.

", + "smithy.api#examples": [ + { + "title": "To remove a tag from an application", + "documentation": "The following untag-resource example removes the group1 tag from the specified application.", + "input": { + "ResourceArn": "arn:aws:appconfig:us-east-1:111122223333:application/339ohji", + "TagKeys": [ + "group1" + ] + } + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/tags/{ResourceArn}", @@ -5235,6 +5637,22 @@ ], "traits": { "smithy.api#documentation": "

Updates an application.

", + "smithy.api#examples": [ + { + "title": "To update an application", + "documentation": "The following update-application example updates the name of the specified application.", + "input": { + "ApplicationId": "339ohji", + "Name": "Example-Application", + "Description": "" + }, + "output": { + "Id": "339ohji", + "Name": "Example-Application", + "Description": "An application used for creating an example." + } + } + ], "smithy.api#http": { "method": "PATCH", "uri": "/applications/{ApplicationId}", @@ -5291,6 +5709,25 @@ ], "traits": { "smithy.api#documentation": "

Updates a configuration profile.

", + "smithy.api#examples": [ + { + "title": "To update a configuration profile", + "documentation": "The following update-configuration-profile example updates the description of the specified configuration profile.", + "input": { + "ApplicationId": "339ohji", + "ConfigurationProfileId": "ur8hx2f", + "Description": "Configuration profile used for examples." + }, + "output": { + "ApplicationId": "339ohji", + "Id": "ur8hx2f", + "Name": "Example-Configuration-Profile", + "Description": "Configuration profile used for examples.", + "LocationUri": "ssm-parameter://Example-Parameter", + "RetrievalRoleArn": "arn:aws:iam::111122223333:role/Example-App-Config-Role" + } + } + ], "smithy.api#http": { "method": "PATCH", "uri": "/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}", @@ -5367,6 +5804,25 @@ ], "traits": { "smithy.api#documentation": "

Updates a deployment strategy.

", + "smithy.api#examples": [ + { + "title": "To update a deployment strategy", + "documentation": "The following update-deployment-strategy example updates final bake time to 20 minutes in the specified deployment strategy. ::\n", + "input": { + "DeploymentStrategyId": "1225qzk", + "FinalBakeTimeInMinutes": 20 + }, + "output": { + "Id": "1225qzk", + "Name": "Example-Deployment", + "DeploymentDurationInMinutes": 15, + "GrowthType": "LINEAR", + "GrowthFactor": 25, + "FinalBakeTimeInMinutes": 20, + "ReplicateTo": "SSM_DOCUMENT" + } + } + ], "smithy.api#http": { "method": "PATCH", "uri": "/deploymentstrategies/{DeploymentStrategyId}", @@ -5444,6 +5900,24 @@ ], "traits": { "smithy.api#documentation": "

Updates an environment.

", + "smithy.api#examples": [ + { + "title": "To update an environment", + "documentation": "The following update-environment example updates an environment's description.", + "input": { + "ApplicationId": "339ohji", + "EnvironmentId": "54j1r29", + "Description": "An environment for examples." + }, + "output": { + "ApplicationId": "339ohji", + "Id": "54j1r29", + "Name": "Example-Environment", + "Description": "An environment for examples.", + "State": "ROLLED_BACK" + } + } + ], "smithy.api#http": { "method": "PATCH", "uri": "/applications/{ApplicationId}/environments/{EnvironmentId}", @@ -5645,6 +6119,17 @@ ], "traits": { "smithy.api#documentation": "

Uses the validators in a configuration profile to validate a configuration.

", + "smithy.api#examples": [ + { + "title": "To validate a configuration", + "documentation": "The following validate-configuration example uses the validators in a configuration profile to validate a configuration.", + "input": { + "ApplicationId": "abc1234", + "ConfigurationProfileId": "ur8hx2f", + "ConfigurationVersion": "1" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/applications/{ApplicationId}/configurationprofiles/{ConfigurationProfileId}/validators", diff --git a/codegen/sdk-codegen/aws-models/appconfigdata.json b/codegen/sdk-codegen/aws-models/appconfigdata.json index 6b56ffe56fd..86cd8d3eeb0 100644 --- a/codegen/sdk-codegen/aws-models/appconfigdata.json +++ b/codegen/sdk-codegen/aws-models/appconfigdata.json @@ -89,52 +89,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -142,13 +146,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -158,224 +171,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://appconfigdata-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://appconfigdata-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://appconfigdata-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://appconfigdata-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://appconfigdata.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://appconfigdata.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://appconfigdata.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://appconfigdata.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -390,8 +354,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -403,8 +367,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -416,8 +380,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -429,8 +393,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -442,8 +406,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -455,8 +419,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -468,8 +432,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -481,8 +445,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -494,8 +458,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -507,8 +471,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -520,8 +484,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -533,8 +497,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -546,8 +510,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -559,8 +523,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -572,8 +536,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -585,8 +549,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -598,8 +562,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -611,8 +575,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -624,8 +588,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -637,8 +601,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -650,8 +614,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -663,8 +627,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -676,8 +640,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -689,8 +653,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -702,8 +666,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -715,8 +679,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -728,8 +692,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -741,8 +705,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -754,8 +718,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -767,8 +731,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -780,8 +744,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -793,8 +757,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -806,8 +770,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -819,8 +783,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -832,8 +796,19 @@ }, "params": { "Region": "us-iso-west-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -845,8 +820,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -858,8 +844,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -871,8 +868,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -884,8 +892,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -897,8 +905,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -910,8 +918,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -922,8 +930,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -934,10 +942,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/appfabric.json b/codegen/sdk-codegen/aws-models/appfabric.json index b0fe02fb577..f19e531f3df 100644 --- a/codegen/sdk-codegen/aws-models/appfabric.json +++ b/codegen/sdk-codegen/aws-models/appfabric.json @@ -1682,54 +1682,54 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://appfabric-fips.us-gov-east-1.api.aws" + "url": "https://appfabric-fips.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://appfabric-fips.us-gov-east-1.amazonaws.com" + "url": "https://appfabric-fips.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://appfabric.us-gov-east-1.api.aws" + "url": "https://appfabric.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://appfabric.us-gov-east-1.amazonaws.com" + "url": "https://appfabric.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": false } }, @@ -1741,8 +1741,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -1754,8 +1754,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -1767,8 +1767,8 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -1780,108 +1780,108 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://appfabric-fips.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://appfabric-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://appfabric-fips.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://appfabric.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://appfabric.us-iso-east-1.c2s.ic.gov" + "url": "https://appfabric.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://appfabric-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://appfabric-fips.us-east-1.amazonaws.com" + "url": "https://appfabric-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://appfabric.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://appfabric.us-east-1.amazonaws.com" + "url": "https://appfabric.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": false } }, @@ -1891,8 +1891,8 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -1904,8 +1904,8 @@ } }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -1915,8 +1915,8 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -1928,21 +1928,34 @@ } }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -1953,8 +1966,8 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -1965,11 +1978,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/appintegrations.json b/codegen/sdk-codegen/aws-models/appintegrations.json index f36c5b39699..bca0a85f1f4 100644 --- a/codegen/sdk-codegen/aws-models/appintegrations.json +++ b/codegen/sdk-codegen/aws-models/appintegrations.json @@ -166,52 +166,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -219,13 +223,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -235,224 +248,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://app-integrations-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://app-integrations-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://app-integrations-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://app-integrations-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://app-integrations.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://app-integrations.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://app-integrations.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://app-integrations.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -731,6 +695,17 @@ "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": { @@ -744,6 +719,17 @@ "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": { @@ -757,6 +743,17 @@ "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": { @@ -770,6 +767,17 @@ "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": { @@ -833,6 +841,12 @@ "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/application-auto-scaling.json b/codegen/sdk-codegen/aws-models/application-auto-scaling.json index 95695c9b798..10389491008 100644 --- a/codegen/sdk-codegen/aws-models/application-auto-scaling.json +++ b/codegen/sdk-codegen/aws-models/application-auto-scaling.json @@ -140,6 +140,7 @@ "arnNamespace": "application-autoscaling", "cloudFormationName": "ApplicationAutoScaling", "cloudTrailEventSource": "applicationautoscaling.amazonaws.com", + "docId": "application-autoscaling-2016-02-06", "endpointPrefix": "application-autoscaling" }, "aws.auth#sigv4": { @@ -208,52 +209,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -261,13 +266,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -277,92 +291,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://application-autoscaling-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://application-autoscaling-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -371,155 +376,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://application-autoscaling.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://application-autoscaling-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://application-autoscaling.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://application-autoscaling-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://application-autoscaling.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://application-autoscaling.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://application-autoscaling.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://application-autoscaling.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1251,7 +1216,20 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified scaling policy for an Application Auto Scaling scalable target.

\n

Deleting a step scaling policy deletes the underlying alarm action, but does not delete\n the CloudWatch alarm associated with the scaling policy, even if it no longer has an associated\n action.

\n

For more information, see Delete a step scaling policy and Delete a target tracking scaling policy in the\n Application Auto Scaling User Guide.

" + "smithy.api#documentation": "

Deletes the specified scaling policy for an Application Auto Scaling scalable target.

\n

Deleting a step scaling policy deletes the underlying alarm action, but does not delete\n the CloudWatch alarm associated with the scaling policy, even if it no longer has an associated\n action.

\n

For more information, see Delete a step scaling policy and Delete a target tracking scaling policy in the\n Application Auto Scaling User Guide.

", + "smithy.api#examples": [ + { + "title": "To delete a scaling policy", + "documentation": "This example deletes a scaling policy for the Amazon ECS service called web-app, which is running in the default cluster.", + "input": { + "PolicyName": "web-app-cpu-lt-25", + "ServiceNamespace": "ecs", + "ResourceId": "service/default/web-app", + "ScalableDimension": "ecs:service:DesiredCount" + }, + "output": {} + } + ] } }, "com.amazonaws.applicationautoscaling#DeleteScalingPolicyRequest": { @@ -1320,7 +1298,20 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified scheduled action for an Application Auto Scaling scalable target.

\n

For more information, see Delete a scheduled action in the Application Auto Scaling User Guide.

" + "smithy.api#documentation": "

Deletes the specified scheduled action for an Application Auto Scaling scalable target.

\n

For more information, see Delete a scheduled action in the Application Auto Scaling User Guide.

", + "smithy.api#examples": [ + { + "title": "To delete a scheduled action", + "documentation": "This example deletes a scheduled action for the AppStream 2.0 fleet called sample-fleet.", + "input": { + "ServiceNamespace": "appstream", + "ScheduledActionName": "my-recurring-action", + "ResourceId": "fleet/sample-fleet", + "ScalableDimension": "appstream:fleet:DesiredCapacity" + }, + "output": {} + } + ] } }, "com.amazonaws.applicationautoscaling#DeleteScheduledActionRequest": { @@ -1389,7 +1380,19 @@ } ], "traits": { - "smithy.api#documentation": "

Deregisters an Application Auto Scaling scalable target when you have finished using it. To see which\n resources have been registered, use DescribeScalableTargets.

\n \n

Deregistering a scalable target deletes the scaling policies and the scheduled\n actions that are associated with it.

\n
" + "smithy.api#documentation": "

Deregisters an Application Auto Scaling scalable target when you have finished using it. To see which\n resources have been registered, use DescribeScalableTargets.

\n \n

Deregistering a scalable target deletes the scaling policies and the scheduled\n actions that are associated with it.

\n
", + "smithy.api#examples": [ + { + "title": "To deregister a scalable target", + "documentation": "This example deregisters a scalable target for an Amazon ECS service called web-app that is running in the default cluster.", + "input": { + "ServiceNamespace": "ecs", + "ResourceId": "service/default/web-app", + "ScalableDimension": "ecs:service:DesiredCount" + }, + "output": {} + } + ] } }, "com.amazonaws.applicationautoscaling#DeregisterScalableTargetRequest": { @@ -1452,6 +1455,33 @@ ], "traits": { "smithy.api#documentation": "

Gets information about the scalable targets in the specified namespace.

\n

You can filter the results using ResourceIds and\n ScalableDimension.

", + "smithy.api#examples": [ + { + "title": "To describe scalable targets", + "documentation": "This example describes the scalable targets for the ECS service namespace.", + "input": { + "ServiceNamespace": "ecs" + }, + "output": { + "ScalableTargets": [ + { + "ScalableDimension": "ecs:service:DesiredCount", + "ResourceId": "service/default/web-app", + "RoleARN": "arn:aws:iam::012345678910:role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService", + "CreationTime": "2019-05-06T11:21:46.199Z", + "MinCapacity": 1, + "ServiceNamespace": "ecs", + "MaxCapacity": 10, + "SuspendedState": { + "DynamicScalingInSuspended": false, + "DynamicScalingOutSuspended": false, + "ScheduledScalingSuspended": false + } + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1543,6 +1573,33 @@ ], "traits": { "smithy.api#documentation": "

Provides descriptive information about the scaling activities in the specified namespace\n from the previous six weeks.

\n

You can filter the results using ResourceId and\n ScalableDimension.

\n

For information about viewing scaling activities using the Amazon Web Services CLI, see Scaling activities for Application Auto Scaling.

", + "smithy.api#examples": [ + { + "title": "To describe scaling activities for a scalable target", + "documentation": "This example describes the scaling activities for an Amazon ECS service called web-app that is running in the default cluster.", + "input": { + "ServiceNamespace": "ecs", + "ResourceId": "service/default/web-app", + "ScalableDimension": "ecs:service:DesiredCount" + }, + "output": { + "ScalingActivities": [ + { + "ScalableDimension": "ecs:service:DesiredCount", + "Description": "Setting desired count to 1.", + "ResourceId": "service/default/web-app", + "ActivityId": "e6c5f7d1-dbbb-4a3f-89b2-51f33e766399", + "StartTime": "2019-05-06T16:03:58.171Z", + "ServiceNamespace": "ecs", + "EndTime": "2019-05-06T16:04:32.111Z", + "Cause": "monitor alarm web-app-cpu-lt-25 in state ALARM triggered policy web-app-cpu-lt-25", + "StatusMessage": "Successfully set desired count to 1. Change successfully fulfilled by ecs.", + "StatusCode": "Successful" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1643,6 +1700,45 @@ ], "traits": { "smithy.api#documentation": "

Describes the Application Auto Scaling scaling policies for the specified service namespace.

\n

You can filter the results using ResourceId,\n ScalableDimension, and PolicyNames.

\n

For more information, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide.

", + "smithy.api#examples": [ + { + "title": "To describe scaling policies", + "documentation": "This example describes the scaling policies for the ECS service namespace.", + "input": { + "ServiceNamespace": "ecs" + }, + "output": { + "ScalingPolicies": [ + { + "PolicyName": "web-app-cpu-gt-75", + "ScalableDimension": "ecs:service:DesiredCount", + "ResourceId": "service/default/web-app", + "CreationTime": "2019-05-06T12:11:39.230Z", + "StepScalingPolicyConfiguration": { + "Cooldown": 60, + "StepAdjustments": [ + { + "ScalingAdjustment": 200, + "MetricIntervalLowerBound": 0 + } + ], + "AdjustmentType": "PercentChangeInCapacity" + }, + "PolicyARN": "arn:aws:autoscaling:us-west-2:012345678910:scalingPolicy:6d8972f3-efc8-437c-92d1-6270f29a66e7:resource/ecs/service/default/web-app:policyName/web-app-cpu-gt-75", + "PolicyType": "StepScaling", + "Alarms": [ + { + "AlarmName": "web-app-cpu-gt-75", + "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:web-app-cpu-gt-75" + } + ], + "ServiceNamespace": "ecs" + } + ], + "NextToken": "" + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1740,6 +1836,45 @@ ], "traits": { "smithy.api#documentation": "

Describes the Application Auto Scaling scheduled actions for the specified service namespace.

\n

You can filter the results using the ResourceId,\n ScalableDimension, and ScheduledActionNames parameters.

\n

For more information, see Scheduled scaling and Managing scheduled scaling in the\n Application Auto Scaling User Guide.

", + "smithy.api#examples": [ + { + "title": "To describe scheduled actions", + "documentation": "This example describes the scheduled actions for the dynamodb service namespace.", + "input": { + "ServiceNamespace": "dynamodb" + }, + "output": { + "ScheduledActions": [ + { + "ScalableDimension": "dynamodb:table:WriteCapacityUnits", + "Schedule": "at(2019-05-20T18:35:00)", + "ResourceId": "table/my-table", + "CreationTime": 1.561571888361E9, + "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledAction:2d36aa3b-cdf9-4565-b290-81db519b227d:resource/dynamodb/table/my-table:scheduledActionName/my-first-scheduled-action", + "ScalableTargetAction": { + "MinCapacity": 15, + "MaxCapacity": 20 + }, + "ScheduledActionName": "my-first-scheduled-action", + "ServiceNamespace": "dynamodb" + }, + { + "ScalableDimension": "dynamodb:table:WriteCapacityUnits", + "Schedule": "at(2019-05-20T18:40:00)", + "ResourceId": "table/my-table", + "CreationTime": 1.561571946021E9, + "ScheduledActionARN": "arn:aws:autoscaling:us-west-2:123456789012:scheduledAction:2d36aa3b-cdf9-4565-b290-81db519b227d:resource/dynamodb/table/my-table:scheduledActionName/my-second-scheduled-action", + "ScalableTargetAction": { + "MinCapacity": 5, + "MaxCapacity": 10 + }, + "ScheduledActionName": "my-second-scheduled-action", + "ServiceNamespace": "dynamodb" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1927,7 +2062,21 @@ } ], "traits": { - "smithy.api#documentation": "

Returns all the tags on the specified Application Auto Scaling scalable target.

\n

For general information about tags, including the format and syntax, see Tagging Amazon Web Services\n resources in the Amazon Web Services General Reference.

" + "smithy.api#documentation": "

Returns all the tags on the specified Application Auto Scaling scalable target.

\n

For general information about tags, including the format and syntax, see Tagging Amazon Web Services\n resources in the Amazon Web Services General Reference.

", + "smithy.api#examples": [ + { + "title": "To list tags for a scalable target", + "documentation": "This example lists the tag key names and values that are attached to the scalable target specified by its ARN.", + "input": { + "ResourceARN": "arn:aws:application-autoscaling:us-west-2:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123" + }, + "output": { + "Tags": { + "environment": "production" + } + } + } + ] } }, "com.amazonaws.applicationautoscaling#ListTagsForResourceRequest": { @@ -2345,7 +2494,41 @@ } ], "traits": { - "smithy.api#documentation": "

Creates or updates a scaling policy for an Application Auto Scaling scalable target.

\n

Each scalable target is identified by a service namespace, resource ID, and scalable\n dimension. A scaling policy applies to the scalable target identified by those three\n attributes. You cannot create a scaling policy until you have registered the resource as a\n scalable target.

\n

Multiple scaling policies can be in force at the same time for the same scalable target.\n You can have one or more target tracking scaling policies, one or more step scaling\n policies, or both. However, there is a chance that multiple policies could conflict,\n instructing the scalable target to scale out or in at the same time. Application Auto Scaling gives\n precedence to the policy that provides the largest capacity for both scale out and scale\n in. For example, if one policy increases capacity by 3, another policy increases capacity\n by 200 percent, and the current capacity is 10, Application Auto Scaling uses the policy with the highest\n calculated capacity (200% of 10 = 20) and scales out to 30.

\n

We recommend caution, however, when using target tracking scaling policies with step\n scaling policies because conflicts between these policies can cause undesirable behavior.\n For example, if the step scaling policy initiates a scale-in activity before the target\n tracking policy is ready to scale in, the scale-in activity will not be blocked. After the\n scale-in activity completes, the target tracking policy could instruct the scalable target\n to scale out again.

\n

For more information, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide.

\n \n

If a scalable target is deregistered, the scalable target is no longer available to\n use scaling policies. Any scaling policies that were specified for the scalable target\n are deleted.

\n
" + "smithy.api#documentation": "

Creates or updates a scaling policy for an Application Auto Scaling scalable target.

\n

Each scalable target is identified by a service namespace, resource ID, and scalable\n dimension. A scaling policy applies to the scalable target identified by those three\n attributes. You cannot create a scaling policy until you have registered the resource as a\n scalable target.

\n

Multiple scaling policies can be in force at the same time for the same scalable target.\n You can have one or more target tracking scaling policies, one or more step scaling\n policies, or both. However, there is a chance that multiple policies could conflict,\n instructing the scalable target to scale out or in at the same time. Application Auto Scaling gives\n precedence to the policy that provides the largest capacity for both scale out and scale\n in. For example, if one policy increases capacity by 3, another policy increases capacity\n by 200 percent, and the current capacity is 10, Application Auto Scaling uses the policy with the highest\n calculated capacity (200% of 10 = 20) and scales out to 30.

\n

We recommend caution, however, when using target tracking scaling policies with step\n scaling policies because conflicts between these policies can cause undesirable behavior.\n For example, if the step scaling policy initiates a scale-in activity before the target\n tracking policy is ready to scale in, the scale-in activity will not be blocked. After the\n scale-in activity completes, the target tracking policy could instruct the scalable target\n to scale out again.

\n

For more information, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide.

\n \n

If a scalable target is deregistered, the scalable target is no longer available to\n use scaling policies. Any scaling policies that were specified for the scalable target\n are deleted.

\n
", + "smithy.api#examples": [ + { + "title": "To apply a target tracking scaling policy with a predefined metric specification", + "documentation": "The following example applies a target tracking scaling policy with a predefined metric specification to an Amazon ECS service called web-app in the default cluster. The policy keeps the average CPU utilization of the service at 75 percent, with scale-out and scale-in cooldown periods of 60 seconds.", + "input": { + "PolicyName": "cpu75-target-tracking-scaling-policy", + "ServiceNamespace": "ecs", + "ResourceId": "service/default/web-app", + "ScalableDimension": "ecs:service:DesiredCount", + "PolicyType": "TargetTrackingScaling", + "TargetTrackingScalingPolicyConfiguration": { + "TargetValue": 75, + "PredefinedMetricSpecification": { + "PredefinedMetricType": "ECSServiceAverageCPUUtilization" + }, + "ScaleOutCooldown": 60, + "ScaleInCooldown": 60 + } + }, + "output": { + "PolicyARN": "arn:aws:autoscaling:us-west-2:012345678910:scalingPolicy:6d8972f3-efc8-437c-92d1-6270f29a66e7:resource/ecs/service/default/web-app:policyName/cpu75-target-tracking-scaling-policy", + "Alarms": [ + { + "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca", + "AlarmName": "TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a-a60f-3b36d653feca" + }, + { + "AlarmARN": "arn:aws:cloudwatch:us-west-2:012345678910:alarm:TargetTracking-service/default/web-app-AlarmLow-1b437334-d19b-4a63-a812-6c67aaf2910d", + "AlarmName": "TargetTracking-service/default/web-app-AlarmLow-1b437334-d19b-4a63-a812-6c67aaf2910d" + } + ] + } + } + ] } }, "com.amazonaws.applicationautoscaling#PutScalingPolicyRequest": { @@ -2449,7 +2632,24 @@ } ], "traits": { - "smithy.api#documentation": "

Creates or updates a scheduled action for an Application Auto Scaling scalable target.

\n

Each scalable target is identified by a service namespace, resource ID, and scalable\n dimension. A scheduled action applies to the scalable target identified by those three\n attributes. You cannot create a scheduled action until you have registered the resource as\n a scalable target.

\n

When you specify start and end times with a recurring schedule using a cron expression\n or rates, they form the boundaries for when the recurring action starts and stops.

\n

To update a scheduled action, specify the parameters that you want to change. If you\n don't specify start and end times, the old values are deleted.

\n

For more information, see Scheduled scaling in the Application Auto Scaling User Guide.

\n \n

If a scalable target is deregistered, the scalable target is no longer available to\n run scheduled actions. Any scheduled actions that were specified for the scalable target\n are deleted.

\n
" + "smithy.api#documentation": "

Creates or updates a scheduled action for an Application Auto Scaling scalable target.

\n

Each scalable target is identified by a service namespace, resource ID, and scalable\n dimension. A scheduled action applies to the scalable target identified by those three\n attributes. You cannot create a scheduled action until you have registered the resource as\n a scalable target.

\n

When you specify start and end times with a recurring schedule using a cron expression\n or rates, they form the boundaries for when the recurring action starts and stops.

\n

To update a scheduled action, specify the parameters that you want to change. If you\n don't specify start and end times, the old values are deleted.

\n

For more information, see Scheduled scaling in the Application Auto Scaling User Guide.

\n \n

If a scalable target is deregistered, the scalable target is no longer available to\n run scheduled actions. Any scheduled actions that were specified for the scalable target\n are deleted.

\n
", + "smithy.api#examples": [ + { + "title": "To create a recurring scheduled action", + "documentation": "This example adds a scheduled action to a DynamoDB table called TestTable to scale out on a recurring schedule. On the specified schedule (every day at 12:15pm UTC), if the current capacity is below the value specified for MinCapacity, Application Auto Scaling scales out to the value specified by MinCapacity.", + "input": { + "ServiceNamespace": "dynamodb", + "Schedule": "cron(15 12 * * ? *)", + "ScheduledActionName": "my-recurring-action", + "ResourceId": "table/TestTable", + "ScalableDimension": "dynamodb:table:WriteCapacityUnits", + "ScalableTargetAction": { + "MinCapacity": 6 + } + }, + "output": {} + } + ] } }, "com.amazonaws.applicationautoscaling#PutScheduledActionRequest": { @@ -2548,7 +2748,23 @@ } ], "traits": { - "smithy.api#documentation": "

Registers or updates a scalable target, which is the resource that you want to\n scale.

\n

Scalable targets are uniquely identified by the combination of resource ID, scalable\n dimension, and namespace, which represents some capacity dimension of the underlying\n service.

\n

When you register a new scalable target, you must specify values for the minimum and\n maximum capacity. If the specified resource is not active in the target service, this\n operation does not change the resource's current capacity. Otherwise, it changes the\n resource's current capacity to a value that is inside of this range.

\n

If you add a scaling policy, current capacity is adjustable within the specified range\n when scaling starts. Application Auto Scaling scaling policies will not scale capacity to values that are\n outside of the minimum and maximum range.

\n

After you register a scalable target, you do not need to register it again to use other\n Application Auto Scaling operations. To see which resources have been registered, use DescribeScalableTargets. You can also view the scaling policies for a service\n namespace by using DescribeScalableTargets. If you no longer need a scalable target, you can\n deregister it by using DeregisterScalableTarget.

\n

To update a scalable target, specify the parameters that you want to change. Include the\n parameters that identify the scalable target: resource ID, scalable dimension, and\n namespace. Any parameters that you don't specify are not changed by this update request.

\n \n

If you call the RegisterScalableTarget API operation to create a\n scalable target, there might be a brief delay until the operation achieves eventual\n consistency. You might become aware of this brief delay if you get unexpected\n errors when performing sequential operations. The typical strategy is to retry the\n request, and some Amazon Web Services SDKs include automatic backoff and retry logic.

\n

If you call the RegisterScalableTarget API operation to update an\n existing scalable target, Application Auto Scaling retrieves the current capacity of the resource. If\n it's below the minimum capacity or above the maximum capacity, Application Auto Scaling adjusts the\n capacity of the scalable target to place it within these bounds, even if you don't\n include the MinCapacity or MaxCapacity request\n parameters.

\n
" + "smithy.api#documentation": "

Registers or updates a scalable target, which is the resource that you want to\n scale.

\n

Scalable targets are uniquely identified by the combination of resource ID, scalable\n dimension, and namespace, which represents some capacity dimension of the underlying\n service.

\n

When you register a new scalable target, you must specify values for the minimum and\n maximum capacity. If the specified resource is not active in the target service, this\n operation does not change the resource's current capacity. Otherwise, it changes the\n resource's current capacity to a value that is inside of this range.

\n

If you add a scaling policy, current capacity is adjustable within the specified range\n when scaling starts. Application Auto Scaling scaling policies will not scale capacity to values that are\n outside of the minimum and maximum range.

\n

After you register a scalable target, you do not need to register it again to use other\n Application Auto Scaling operations. To see which resources have been registered, use DescribeScalableTargets. You can also view the scaling policies for a service\n namespace by using DescribeScalableTargets. If you no longer need a scalable target, you can\n deregister it by using DeregisterScalableTarget.

\n

To update a scalable target, specify the parameters that you want to change. Include the\n parameters that identify the scalable target: resource ID, scalable dimension, and\n namespace. Any parameters that you don't specify are not changed by this update request.

\n \n

If you call the RegisterScalableTarget API operation to create a\n scalable target, there might be a brief delay until the operation achieves eventual\n consistency. You might become aware of this brief delay if you get unexpected\n errors when performing sequential operations. The typical strategy is to retry the\n request, and some Amazon Web Services SDKs include automatic backoff and retry logic.

\n

If you call the RegisterScalableTarget API operation to update an\n existing scalable target, Application Auto Scaling retrieves the current capacity of the resource. If\n it's below the minimum capacity or above the maximum capacity, Application Auto Scaling adjusts the\n capacity of the scalable target to place it within these bounds, even if you don't\n include the MinCapacity or MaxCapacity request\n parameters.

\n
", + "smithy.api#examples": [ + { + "title": "To register an ECS service as a scalable target", + "documentation": "This example registers a scalable target from an Amazon ECS service called web-app that is running on the default cluster, with a minimum desired count of 1 task and a maximum desired count of 10 tasks.", + "input": { + "ServiceNamespace": "ecs", + "ResourceId": "service/default/web-app", + "ScalableDimension": "ecs:service:DesiredCount", + "MinCapacity": 1, + "MaxCapacity": 10 + }, + "output": { + "ScalableTargetARN": "arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123" + } + } + ] } }, "com.amazonaws.applicationautoscaling#RegisterScalableTargetRequest": { @@ -3466,7 +3682,20 @@ } ], "traits": { - "smithy.api#documentation": "

Adds or edits tags on an Application Auto Scaling scalable target.

\n

Each tag consists of a tag key and a tag value, which are both case-sensitive strings.\n To add a tag, specify a new tag key and a tag value. To edit a tag, specify an existing tag\n key and a new tag value.

\n

You can use this operation to tag an Application Auto Scaling scalable target, but you cannot tag a\n scaling policy or scheduled action.

\n

You can also add tags to an Application Auto Scaling scalable target while creating it\n (RegisterScalableTarget).

\n

For general information about tags, including the format and syntax, see Tagging Amazon Web Services\n resources in the Amazon Web Services General Reference.

\n

Use tags to control access to a scalable target. For more information, see Tagging support\n for Application Auto Scaling in the Application Auto Scaling User Guide.

" + "smithy.api#documentation": "

Adds or edits tags on an Application Auto Scaling scalable target.

\n

Each tag consists of a tag key and a tag value, which are both case-sensitive strings.\n To add a tag, specify a new tag key and a tag value. To edit a tag, specify an existing tag\n key and a new tag value.

\n

You can use this operation to tag an Application Auto Scaling scalable target, but you cannot tag a\n scaling policy or scheduled action.

\n

You can also add tags to an Application Auto Scaling scalable target while creating it\n (RegisterScalableTarget).

\n

For general information about tags, including the format and syntax, see Tagging Amazon Web Services\n resources in the Amazon Web Services General Reference.

\n

Use tags to control access to a scalable target. For more information, see Tagging support\n for Application Auto Scaling in the Application Auto Scaling User Guide.

", + "smithy.api#examples": [ + { + "title": "To add a tag to a scalable target", + "documentation": "This example adds a tag with the key name \"environment\" and the value \"production\" to the scalable target specified by its ARN.", + "input": { + "ResourceARN": "arn:aws:application-autoscaling:us-west-2:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123", + "Tags": { + "environment": "production" + } + }, + "output": {} + } + ] } }, "com.amazonaws.applicationautoscaling#TagResourceRequest": { @@ -3768,7 +3997,20 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes tags from an Application Auto Scaling scalable target. To delete a tag, specify the tag key and\n the Application Auto Scaling scalable target.

" + "smithy.api#documentation": "

Deletes tags from an Application Auto Scaling scalable target. To delete a tag, specify the tag key and\n the Application Auto Scaling scalable target.

", + "smithy.api#examples": [ + { + "title": "To remove a tag from a scalable target", + "documentation": "This example removes the tag pair with the key name \"environment\" from the scalable target specified by its ARN.", + "input": { + "ResourceARN": "arn:aws:application-autoscaling:us-west-2:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123", + "TagKeys": [ + "environment" + ] + }, + "output": {} + } + ] } }, "com.amazonaws.applicationautoscaling#UntagResourceRequest": { diff --git a/codegen/sdk-codegen/aws-models/application-discovery-service.json b/codegen/sdk-codegen/aws-models/application-discovery-service.json index f36828d784d..be6ea71ed5a 100644 --- a/codegen/sdk-codegen/aws-models/application-discovery-service.json +++ b/codegen/sdk-codegen/aws-models/application-discovery-service.json @@ -115,6 +115,7 @@ "arnNamespace": "discovery", "cloudFormationName": "ApplicationDiscoveryService", "cloudTrailEventSource": "applicationdiscoveryservice.amazonaws.com", + "docId": "discovery-2015-11-01", "endpointPrefix": "discovery" }, "aws.auth#sigv4": { @@ -186,52 +187,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -239,13 +244,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -255,224 +269,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://discovery-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://discovery-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://discovery-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://discovery-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://discovery.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://discovery.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://discovery.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://discovery.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/application-insights.json b/codegen/sdk-codegen/aws-models/application-insights.json index 34dba829948..85ab0046bed 100644 --- a/codegen/sdk-codegen/aws-models/application-insights.json +++ b/codegen/sdk-codegen/aws-models/application-insights.json @@ -1737,52 +1737,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1790,13 +1794,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1806,224 +1819,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://applicationinsights-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://applicationinsights-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://applicationinsights-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://applicationinsights-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://applicationinsights.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://applicationinsights.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://applicationinsights.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://applicationinsights.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/applicationcostprofiler.json b/codegen/sdk-codegen/aws-models/applicationcostprofiler.json index ea350c64142..206abb7a5e4 100644 --- a/codegen/sdk-codegen/aws-models/applicationcostprofiler.json +++ b/codegen/sdk-codegen/aws-models/applicationcostprofiler.json @@ -58,6 +58,7 @@ "arnNamespace": "application-cost-profiler", "cloudFormationName": "ApplicationCostProfiler", "cloudTrailEventSource": "applicationcostprofiler.amazonaws.com", + "docId": "AWSApplicationCostProfiler-2020-09-10", "endpointPrefix": "application-cost-profiler" }, "aws.auth#sigv4": { @@ -126,52 +127,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -179,13 +184,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -195,224 +209,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://application-cost-profiler-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://application-cost-profiler-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://application-cost-profiler-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://application-cost-profiler-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://application-cost-profiler.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://application-cost-profiler.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://application-cost-profiler.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://application-cost-profiler.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -427,8 +392,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -440,8 +405,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -453,8 +418,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -466,8 +431,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -479,8 +444,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -492,8 +457,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -505,8 +470,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -518,8 +483,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -531,8 +496,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -544,8 +509,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -557,8 +522,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -570,8 +535,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -583,8 +559,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -596,8 +583,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -609,8 +607,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -622,8 +631,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -635,8 +644,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -648,8 +657,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -660,8 +669,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -672,10 +681,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -737,6 +752,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.applicationcostprofiler#DeleteReportDefinitionResult": { @@ -748,24 +766,29 @@ "smithy.api#documentation": "

ID of the report that was deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.applicationcostprofiler#ErrorMessage": { "type": "string" }, "com.amazonaws.applicationcostprofiler#Format": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CSV", - "name": "CSV" - }, - { - "value": "PARQUET", - "name": "PARQUET" + "type": "enum", + "members": { + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CSV" } - ] + }, + "PARQUET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARQUET" + } + } } }, "com.amazonaws.applicationcostprofiler#GetReportDefinition": { @@ -810,6 +833,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.applicationcostprofiler#GetReportDefinitionResult": { @@ -864,6 +890,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.applicationcostprofiler#ImportApplicationUsage": { @@ -907,6 +936,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.applicationcostprofiler#ImportApplicationUsageResult": { @@ -919,6 +951,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.applicationcostprofiler#ImportId": { @@ -928,7 +963,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[0-9A-Za-z\\.\\-_]*" + "smithy.api#pattern": "^[0-9A-Za-z\\.\\-_]*$" } }, "com.amazonaws.applicationcostprofiler#Integer": { @@ -985,6 +1020,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "reportDefinitions", "pageSize": "maxResults" } } @@ -1006,6 +1042,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.applicationcostprofiler#ListReportDefinitionsResult": { @@ -1023,6 +1062,9 @@ "smithy.api#documentation": "

The value of the next token, if it exists. Null if there are no more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.applicationcostprofiler#PutReportDefinition": { @@ -1097,6 +1139,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.applicationcostprofiler#PutReportDefinitionResult": { @@ -1108,6 +1153,9 @@ "smithy.api#documentation": "

ID of the report.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.applicationcostprofiler#ReportDefinition": { @@ -1173,26 +1221,30 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.applicationcostprofiler#ReportFrequency": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "MONTHLY", - "name": "MONTHLY" - }, - { - "value": "DAILY", - "name": "DAILY" - }, - { - "value": "ALL", - "name": "ALL" + "type": "enum", + "members": { + "MONTHLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MONTHLY" + } + }, + "DAILY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DAILY" } - ] + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL" + } + } } }, "com.amazonaws.applicationcostprofiler#ReportId": { @@ -1212,30 +1264,36 @@ "min": 3, "max": 63 }, - "smithy.api#pattern": "(?=^.{3,63}$)(?!^(\\d+\\.)+\\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])$)" + "smithy.api#pattern": "^(?=^.{3,63}$)(?!^(\\d+\\.)+\\d+$)(^(([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])\\.)*([a-z0-9]|[a-z0-9][a-z0-9\\-]*[a-z0-9])$)$" } }, "com.amazonaws.applicationcostprofiler#S3BucketRegion": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ap-east-1", - "name": "AP_EAST_1" - }, - { - "value": "me-south-1", - "name": "ME_SOUTH_1" - }, - { - "value": "eu-south-1", - "name": "EU_SOUTH_1" - }, - { - "value": "af-south-1", - "name": "AF_SOUTH_1" + "type": "enum", + "members": { + "AP_EAST_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ap-east-1" + } + }, + "ME_SOUTH_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "me-south-1" + } + }, + "EU_SOUTH_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu-south-1" + } + }, + "AF_SOUTH_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "af-south-1" } - ] + } } }, "com.amazonaws.applicationcostprofiler#S3Key": { @@ -1245,7 +1303,7 @@ "min": 1, "max": 512 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.applicationcostprofiler#S3Location": { @@ -1277,7 +1335,7 @@ "min": 1, "max": 512 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.applicationcostprofiler#ServiceQuotaExceededException": { @@ -1417,6 +1475,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.applicationcostprofiler#UpdateReportDefinitionResult": { @@ -1428,6 +1489,9 @@ "smithy.api#documentation": "

ID of the report.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.applicationcostprofiler#ValidationException": { diff --git a/codegen/sdk-codegen/aws-models/appsync.json b/codegen/sdk-codegen/aws-models/appsync.json index 7691bfc6989..2c5f5736d66 100644 --- a/codegen/sdk-codegen/aws-models/appsync.json +++ b/codegen/sdk-codegen/aws-models/appsync.json @@ -291,52 +291,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -344,13 +348,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -360,224 +373,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://appsync-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://appsync-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://appsync-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://appsync-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://appsync.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://appsync.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://appsync.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://appsync.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/arc-zonal-shift.json b/codegen/sdk-codegen/aws-models/arc-zonal-shift.json index 3f5fae7581e..0bf75c7cafc 100644 --- a/codegen/sdk-codegen/aws-models/arc-zonal-shift.json +++ b/codegen/sdk-codegen/aws-models/arc-zonal-shift.json @@ -900,55 +900,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://arc-zonal-shift-fips.us-gov-east-1.api.aws" + "url": "https://arc-zonal-shift-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://arc-zonal-shift-fips.us-gov-east-1.amazonaws.com" + "url": "https://arc-zonal-shift-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://arc-zonal-shift.us-gov-east-1.api.aws" + "url": "https://arc-zonal-shift.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://arc-zonal-shift.us-gov-east-1.amazonaws.com" + "url": "https://arc-zonal-shift.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -959,9 +959,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -972,9 +972,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -985,9 +985,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -998,109 +998,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://arc-zonal-shift-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://arc-zonal-shift-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://arc-zonal-shift-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://arc-zonal-shift.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://arc-zonal-shift.us-iso-east-1.c2s.ic.gov" + "url": "https://arc-zonal-shift.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://arc-zonal-shift-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://arc-zonal-shift-fips.us-east-1.amazonaws.com" + "url": "https://arc-zonal-shift-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://arc-zonal-shift.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://arc-zonal-shift.us-east-1.amazonaws.com" + "url": "https://arc-zonal-shift.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -1109,9 +1109,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1122,9 +1122,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1133,9 +1133,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1146,22 +1146,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1171,9 +1184,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1183,11 +1196,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1723,4 +1742,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/athena.json b/codegen/sdk-codegen/aws-models/athena.json index 31093485142..7cc99e10f88 100644 --- a/codegen/sdk-codegen/aws-models/athena.json +++ b/codegen/sdk-codegen/aws-models/athena.json @@ -344,52 +344,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -397,13 +401,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -413,224 +426,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://athena-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://athena-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://athena-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://athena-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://athena.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://athena.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://athena.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://athena.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/auto-scaling-plans.json b/codegen/sdk-codegen/aws-models/auto-scaling-plans.json index 021ce81655f..a110d23dde9 100644 --- a/codegen/sdk-codegen/aws-models/auto-scaling-plans.json +++ b/codegen/sdk-codegen/aws-models/auto-scaling-plans.json @@ -58,6 +58,7 @@ "arnNamespace": "autoscaling-plans", "cloudFormationName": "AutoScalingPlans", "cloudTrailEventSource": "autoscalingplans.amazonaws.com", + "docId": "autoscaling-plans-2018-01-06", "endpointPrefix": "autoscaling-plans" }, "aws.auth#sigv4": { @@ -126,52 +127,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -179,13 +184,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -195,224 +209,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://autoscaling-plans-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://autoscaling-plans-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://autoscaling-plans-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://autoscaling-plans-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://autoscaling-plans.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://autoscaling-plans.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://autoscaling-plans.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://autoscaling-plans.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -427,8 +392,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -440,8 +405,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -453,8 +418,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -466,8 +431,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -479,8 +444,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -492,8 +457,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -505,8 +470,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -518,8 +483,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -531,8 +496,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -544,8 +509,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -557,8 +522,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -570,8 +535,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -583,8 +548,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -596,8 +561,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -609,8 +574,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -622,8 +587,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -635,8 +600,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -648,8 +613,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -661,8 +626,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -674,8 +639,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -687,8 +652,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -700,8 +665,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -713,8 +678,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -726,8 +691,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -739,8 +704,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -752,8 +717,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -765,8 +730,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -778,8 +743,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -791,8 +756,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -804,8 +769,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -817,8 +782,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -830,8 +795,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -843,8 +808,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -856,8 +821,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -869,8 +834,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -882,8 +858,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -895,8 +882,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -908,8 +906,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -921,8 +930,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -934,8 +943,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -947,8 +956,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -959,8 +968,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -971,10 +980,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1015,6 +1030,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ConcurrentUpdateException", + "httpResponseCode": 500 + }, "smithy.api#documentation": "

Concurrent updates caused an exception, for example, if you request an update to a\n scaling plan that already has a pending update.

", "smithy.api#error": "server", "smithy.api#httpError": 500 @@ -1073,6 +1092,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.autoscalingplans#CreateScalingPlanResponse": { @@ -1085,6 +1107,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.autoscalingplans#CustomizedLoadMetricSpecification": { @@ -1238,11 +1263,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.autoscalingplans#DeleteScalingPlanResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.autoscalingplans#DescribeScalingPlanResources": { "type": "operation", @@ -1299,6 +1330,9 @@ "smithy.api#documentation": "

The token for the next set of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.autoscalingplans#DescribeScalingPlanResourcesResponse": { @@ -1316,6 +1350,9 @@ "smithy.api#documentation": "

The token required to get the next set of results. This value is null if\n there are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.autoscalingplans#DescribeScalingPlans": { @@ -1377,6 +1414,9 @@ "smithy.api#documentation": "

The token for the next set of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.autoscalingplans#DescribeScalingPlansResponse": { @@ -1394,6 +1434,9 @@ "smithy.api#documentation": "

The token required to get the next set of results. This value is null if\n there are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.autoscalingplans#DisableDynamicScaling": { @@ -1402,30 +1445,36 @@ "com.amazonaws.autoscalingplans#DisableScaleIn": { "type": "boolean" }, - "com.amazonaws.autoscalingplans#ErrorMessage": { - "type": "string" - }, - "com.amazonaws.autoscalingplans#ForecastDataType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CapacityForecast", - "name": "CapacityForecast" - }, - { - "value": "LoadForecast", - "name": "LoadForecast" - }, - { - "value": "ScheduledActionMinCapacity", - "name": "ScheduledActionMinCapacity" - }, - { - "value": "ScheduledActionMaxCapacity", - "name": "ScheduledActionMaxCapacity" + "com.amazonaws.autoscalingplans#ErrorMessage": { + "type": "string" + }, + "com.amazonaws.autoscalingplans#ForecastDataType": { + "type": "enum", + "members": { + "CapacityForecast": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CapacityForecast" + } + }, + "LoadForecast": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LoadForecast" + } + }, + "ScheduledActionMinCapacity": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ScheduledActionMinCapacity" } - ] + }, + "ScheduledActionMaxCapacity": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ScheduledActionMaxCapacity" + } + } } }, "com.amazonaws.autoscalingplans#GetScalingPlanResourceForecastData": { @@ -1507,6 +1556,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.autoscalingplans#GetScalingPlanResourceForecastDataResponse": { @@ -1519,6 +1571,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.autoscalingplans#InternalServiceException": { @@ -1529,6 +1584,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InternalServiceException", + "httpResponseCode": 500 + }, "smithy.api#documentation": "

The service encountered an internal error.

", "smithy.api#error": "server", "smithy.api#httpError": 500 @@ -1542,6 +1601,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidNextTokenException", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The token provided is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1555,32 +1618,42 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "LimitExceededException", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

Your account exceeded a limit. This exception is thrown when a per-account resource\n limit is exceeded.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, "com.amazonaws.autoscalingplans#LoadMetricType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ASGTotalCPUUtilization", - "name": "ASGTotalCPUUtilization" - }, - { - "value": "ASGTotalNetworkIn", - "name": "ASGTotalNetworkIn" - }, - { - "value": "ASGTotalNetworkOut", - "name": "ASGTotalNetworkOut" - }, - { - "value": "ALBTargetGroupRequestCount", - "name": "ALBTargetGroupRequestCount" + "type": "enum", + "members": { + "ASGTotalCPUUtilization": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASGTotalCPUUtilization" + } + }, + "ASGTotalNetworkIn": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASGTotalNetworkIn" + } + }, + "ASGTotalNetworkOut": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASGTotalNetworkOut" } - ] + }, + "ALBTargetGroupRequestCount": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALBTargetGroupRequestCount" + } + } } }, "com.amazonaws.autoscalingplans#MaxResults": { @@ -1630,30 +1703,38 @@ "type": "double" }, "com.amazonaws.autoscalingplans#MetricStatistic": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Average", - "name": "Average" - }, - { - "value": "Minimum", - "name": "Minimum" - }, - { - "value": "Maximum", - "name": "Maximum" - }, - { - "value": "SampleCount", - "name": "SampleCount" - }, - { - "value": "Sum", - "name": "Sum" + "type": "enum", + "members": { + "Average": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Average" } - ] + }, + "Minimum": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Minimum" + } + }, + "Maximum": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Maximum" + } + }, + "SampleCount": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SampleCount" + } + }, + "Sum": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Sum" + } + } } }, "com.amazonaws.autoscalingplans#MetricUnit": { @@ -1670,6 +1751,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ObjectNotFoundException", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The specified object could not be found.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1682,18 +1767,18 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "\\p{Print}+" + "smithy.api#pattern": "^\\p{Print}+$" } }, "com.amazonaws.autoscalingplans#PolicyType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "TargetTrackingScaling", - "name": "TargetTrackingScaling" + "type": "enum", + "members": { + "TargetTrackingScaling": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TargetTrackingScaling" } - ] + } } }, "com.amazonaws.autoscalingplans#PredefinedLoadMetricSpecification": { @@ -1739,37 +1824,43 @@ } }, "com.amazonaws.autoscalingplans#PredictiveScalingMaxCapacityBehavior": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SetForecastCapacityToMaxCapacity", - "name": "SetForecastCapacityToMaxCapacity" - }, - { - "value": "SetMaxCapacityToForecastCapacity", - "name": "SetMaxCapacityToForecastCapacity" - }, - { - "value": "SetMaxCapacityAboveForecastCapacity", - "name": "SetMaxCapacityAboveForecastCapacity" + "type": "enum", + "members": { + "SetForecastCapacityToMaxCapacity": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SetForecastCapacityToMaxCapacity" + } + }, + "SetMaxCapacityToForecastCapacity": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SetMaxCapacityToForecastCapacity" } - ] + }, + "SetMaxCapacityAboveForecastCapacity": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SetMaxCapacityAboveForecastCapacity" + } + } } }, "com.amazonaws.autoscalingplans#PredictiveScalingMode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ForecastAndScale", - "name": "ForecastAndScale" - }, - { - "value": "ForecastOnly", - "name": "ForecastOnly" + "type": "enum", + "members": { + "ForecastAndScale": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ForecastAndScale" + } + }, + "ForecastOnly": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ForecastOnly" } - ] + } } }, "com.amazonaws.autoscalingplans#ResourceCapacity": { @@ -1782,7 +1873,7 @@ "min": 1, "max": 1600 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.autoscalingplans#ResourceLabel": { @@ -1795,42 +1886,56 @@ } }, "com.amazonaws.autoscalingplans#ScalableDimension": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "autoscaling:autoScalingGroup:DesiredCapacity", - "name": "AutoScalingGroupDesiredCapacity" - }, - { - "value": "ecs:service:DesiredCount", - "name": "ECSServiceDesiredCount" - }, - { - "value": "ec2:spot-fleet-request:TargetCapacity", - "name": "EC2SpotFleetRequestTargetCapacity" - }, - { - "value": "rds:cluster:ReadReplicaCount", - "name": "RDSClusterReadReplicaCount" - }, - { - "value": "dynamodb:table:ReadCapacityUnits", - "name": "DynamoDBTableReadCapacityUnits" - }, - { - "value": "dynamodb:table:WriteCapacityUnits", - "name": "DynamoDBTableWriteCapacityUnits" - }, - { - "value": "dynamodb:index:ReadCapacityUnits", - "name": "DynamoDBIndexReadCapacityUnits" - }, - { - "value": "dynamodb:index:WriteCapacityUnits", - "name": "DynamoDBIndexWriteCapacityUnits" + "type": "enum", + "members": { + "AutoScalingGroupDesiredCapacity": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "autoscaling:autoScalingGroup:DesiredCapacity" + } + }, + "ECSServiceDesiredCount": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ecs:service:DesiredCount" + } + }, + "EC2SpotFleetRequestTargetCapacity": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ec2:spot-fleet-request:TargetCapacity" + } + }, + "RDSClusterReadReplicaCount": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rds:cluster:ReadReplicaCount" + } + }, + "DynamoDBTableReadCapacityUnits": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamodb:table:ReadCapacityUnits" } - ] + }, + "DynamoDBTableWriteCapacityUnits": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamodb:table:WriteCapacityUnits" + } + }, + "DynamoDBIndexReadCapacityUnits": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamodb:index:ReadCapacityUnits" + } + }, + "DynamoDBIndexWriteCapacityUnits": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamodb:index:WriteCapacityUnits" + } + } } }, "com.amazonaws.autoscalingplans#ScalingInstruction": { @@ -1938,62 +2043,86 @@ } }, "com.amazonaws.autoscalingplans#ScalingMetricType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ASGAverageCPUUtilization", - "name": "ASGAverageCPUUtilization" - }, - { - "value": "ASGAverageNetworkIn", - "name": "ASGAverageNetworkIn" - }, - { - "value": "ASGAverageNetworkOut", - "name": "ASGAverageNetworkOut" - }, - { - "value": "DynamoDBReadCapacityUtilization", - "name": "DynamoDBReadCapacityUtilization" - }, - { - "value": "DynamoDBWriteCapacityUtilization", - "name": "DynamoDBWriteCapacityUtilization" - }, - { - "value": "ECSServiceAverageCPUUtilization", - "name": "ECSServiceAverageCPUUtilization" - }, - { - "value": "ECSServiceAverageMemoryUtilization", - "name": "ECSServiceAverageMemoryUtilization" - }, - { - "value": "ALBRequestCountPerTarget", - "name": "ALBRequestCountPerTarget" - }, - { - "value": "RDSReaderAverageCPUUtilization", - "name": "RDSReaderAverageCPUUtilization" - }, - { - "value": "RDSReaderAverageDatabaseConnections", - "name": "RDSReaderAverageDatabaseConnections" - }, - { - "value": "EC2SpotFleetRequestAverageCPUUtilization", - "name": "EC2SpotFleetRequestAverageCPUUtilization" - }, - { - "value": "EC2SpotFleetRequestAverageNetworkIn", - "name": "EC2SpotFleetRequestAverageNetworkIn" - }, - { - "value": "EC2SpotFleetRequestAverageNetworkOut", - "name": "EC2SpotFleetRequestAverageNetworkOut" + "type": "enum", + "members": { + "ASGAverageCPUUtilization": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASGAverageCPUUtilization" + } + }, + "ASGAverageNetworkIn": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASGAverageNetworkIn" + } + }, + "ASGAverageNetworkOut": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASGAverageNetworkOut" + } + }, + "DynamoDBReadCapacityUtilization": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DynamoDBReadCapacityUtilization" + } + }, + "DynamoDBWriteCapacityUtilization": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DynamoDBWriteCapacityUtilization" + } + }, + "ECSServiceAverageCPUUtilization": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ECSServiceAverageCPUUtilization" + } + }, + "ECSServiceAverageMemoryUtilization": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ECSServiceAverageMemoryUtilization" + } + }, + "ALBRequestCountPerTarget": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALBRequestCountPerTarget" + } + }, + "RDSReaderAverageCPUUtilization": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RDSReaderAverageCPUUtilization" + } + }, + "RDSReaderAverageDatabaseConnections": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RDSReaderAverageDatabaseConnections" + } + }, + "EC2SpotFleetRequestAverageCPUUtilization": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EC2SpotFleetRequestAverageCPUUtilization" } - ] + }, + "EC2SpotFleetRequestAverageNetworkIn": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EC2SpotFleetRequestAverageNetworkIn" + } + }, + "EC2SpotFleetRequestAverageNetworkOut": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EC2SpotFleetRequestAverageNetworkOut" + } + } } }, "com.amazonaws.autoscalingplans#ScalingPlan": { @@ -2064,7 +2193,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\p{Print}&&[^|:/]]+" + "smithy.api#pattern": "^[\\p{Print}&&[^|:/]]+$" } }, "com.amazonaws.autoscalingplans#ScalingPlanNames": { @@ -2142,42 +2271,56 @@ } }, "com.amazonaws.autoscalingplans#ScalingPlanStatusCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Active", - "name": "Active" - }, - { - "value": "ActiveWithProblems", - "name": "ActiveWithProblems" - }, - { - "value": "CreationInProgress", - "name": "CreationInProgress" - }, - { - "value": "CreationFailed", - "name": "CreationFailed" - }, - { - "value": "DeletionInProgress", - "name": "DeletionInProgress" - }, - { - "value": "DeletionFailed", - "name": "DeletionFailed" - }, - { - "value": "UpdateInProgress", - "name": "UpdateInProgress" - }, - { - "value": "UpdateFailed", - "name": "UpdateFailed" + "type": "enum", + "members": { + "Active": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Active" + } + }, + "ActiveWithProblems": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ActiveWithProblems" + } + }, + "CreationInProgress": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreationInProgress" } - ] + }, + "CreationFailed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreationFailed" + } + }, + "DeletionInProgress": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DeletionInProgress" + } + }, + "DeletionFailed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DeletionFailed" + } + }, + "UpdateInProgress": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UpdateInProgress" + } + }, + "UpdateFailed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UpdateFailed" + } + } } }, "com.amazonaws.autoscalingplans#ScalingPlanVersion": { @@ -2224,37 +2367,43 @@ } }, "com.amazonaws.autoscalingplans#ScalingPolicyUpdateBehavior": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "KeepExternalPolicies", - "name": "KeepExternalPolicies" - }, - { - "value": "ReplaceExternalPolicies", - "name": "ReplaceExternalPolicies" + "type": "enum", + "members": { + "KeepExternalPolicies": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KeepExternalPolicies" + } + }, + "ReplaceExternalPolicies": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReplaceExternalPolicies" } - ] + } } }, "com.amazonaws.autoscalingplans#ScalingStatusCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Inactive", - "name": "Inactive" - }, - { - "value": "PartiallyActive", - "name": "PartiallyActive" - }, - { - "value": "Active", - "name": "Active" + "type": "enum", + "members": { + "Inactive": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Inactive" + } + }, + "PartiallyActive": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PartiallyActive" + } + }, + "Active": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Active" } - ] + } } }, "com.amazonaws.autoscalingplans#ScheduledActionBufferTime": { @@ -2266,30 +2415,38 @@ } }, "com.amazonaws.autoscalingplans#ServiceNamespace": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "autoscaling", - "name": "AUTOSCALING" - }, - { - "value": "ecs", - "name": "ECS" - }, - { - "value": "ec2", - "name": "EC2" - }, - { - "value": "rds", - "name": "RDS" - }, - { - "value": "dynamodb", - "name": "DYNAMODB" + "type": "enum", + "members": { + "AUTOSCALING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "autoscaling" + } + }, + "ECS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ecs" + } + }, + "EC2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ec2" + } + }, + "RDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rds" + } + }, + "DYNAMODB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dynamodb" } - ] + } } }, "com.amazonaws.autoscalingplans#TagFilter": { @@ -2439,11 +2596,17 @@ "smithy.api#documentation": "

The scaling instructions.

\n

For more information, see ScalingInstruction in the AWS Auto Scaling API Reference.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.autoscalingplans#UpdateScalingPlanResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.autoscalingplans#ValidationException": { "type": "structure", @@ -2453,6 +2616,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ValidationException", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

An exception was thrown for a validation issue. Review the parameters provided.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2461,7 +2628,7 @@ "com.amazonaws.autoscalingplans#XmlString": { "type": "string", "traits": { - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.autoscalingplans#XmlStringMaxLen128": { @@ -2471,7 +2638,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.autoscalingplans#XmlStringMaxLen256": { @@ -2481,7 +2648,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } } } diff --git a/codegen/sdk-codegen/aws-models/auto-scaling.json b/codegen/sdk-codegen/aws-models/auto-scaling.json index 014424840bc..8d867b1718b 100644 --- a/codegen/sdk-codegen/aws-models/auto-scaling.json +++ b/codegen/sdk-codegen/aws-models/auto-scaling.json @@ -1281,6 +1281,7 @@ "arnNamespace": "autoscaling", "cloudFormationName": "AutoScaling", "cloudTrailEventSource": "autoscaling.amazonaws.com", + "docId": "autoscaling-2011-01-01", "endpointPrefix": "autoscaling" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/backup-gateway.json b/codegen/sdk-codegen/aws-models/backup-gateway.json index c6988b43ede..5fe633d4825 100644 --- a/codegen/sdk-codegen/aws-models/backup-gateway.json +++ b/codegen/sdk-codegen/aws-models/backup-gateway.json @@ -202,52 +202,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -255,13 +259,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -271,224 +284,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://backup-gateway-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://backup-gateway-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://backup-gateway-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://backup-gateway-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://backup-gateway.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://backup-gateway.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://backup-gateway.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://backup-gateway.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -503,8 +467,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -516,8 +480,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -529,8 +493,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -542,8 +506,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -555,8 +519,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -568,8 +532,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -581,8 +545,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -594,8 +558,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -607,8 +571,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -620,8 +584,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -633,8 +597,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -646,8 +610,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -659,8 +623,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -672,8 +636,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -685,8 +649,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -698,8 +662,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -711,8 +675,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -724,8 +688,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -737,8 +701,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -750,8 +714,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -763,8 +727,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -776,8 +740,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -789,8 +753,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -802,8 +766,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -815,8 +779,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -828,8 +792,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -841,8 +805,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -854,8 +818,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -867,8 +831,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -880,8 +844,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -893,8 +857,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -906,8 +870,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -919,8 +883,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -932,8 +907,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -945,8 +931,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -958,8 +955,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -971,8 +979,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -984,8 +992,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -997,8 +1005,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1009,8 +1017,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1021,10 +1029,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3294,4 +3308,4 @@ "type": "string" } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/backupstorage.json b/codegen/sdk-codegen/aws-models/backupstorage.json index b4278df05a3..c88de48d21a 100644 --- a/codegen/sdk-codegen/aws-models/backupstorage.json +++ b/codegen/sdk-codegen/aws-models/backupstorage.json @@ -250,52 +250,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -303,13 +307,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -319,224 +332,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://backupstorage-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://backupstorage-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://backupstorage-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://backupstorage-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://backupstorage.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://backupstorage.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://backupstorage.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://backupstorage.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -551,8 +515,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -564,8 +528,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -577,8 +541,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -590,8 +554,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -603,8 +567,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -616,8 +580,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -629,8 +593,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -642,8 +606,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -655,8 +619,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -668,8 +632,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -681,8 +645,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -694,8 +658,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -707,8 +682,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -720,8 +706,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -733,8 +730,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -746,8 +754,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -759,8 +767,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -772,8 +780,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -784,8 +792,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -796,10 +804,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -832,14 +846,14 @@ } }, "com.amazonaws.backupstorage#DataChecksumAlgorithm": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SHA256", - "name": "SHA256" + "type": "enum", + "members": { + "SHA256": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHA256" } - ] + } } }, "com.amazonaws.backupstorage#DeleteObject": { @@ -901,6 +915,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.backupstorage#GetChunk": { @@ -962,6 +979,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.backupstorage#GetChunkOutput": { @@ -1000,6 +1020,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.backupstorage#GetObjectMetadata": { @@ -1064,6 +1087,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.backupstorage#GetObjectMetadataOutput": { @@ -1106,6 +1132,9 @@ "smithy.api#httpHeader": "x-amz-checksum-algorithm" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.backupstorage#IllegalArgumentException": { @@ -1210,6 +1239,9 @@ "smithy.api#httpQuery": "next-token" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.backupstorage#ListChunksOutput": { @@ -1228,6 +1260,9 @@ "smithy.api#documentation": "Pagination token" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.backupstorage#ListObjects": { @@ -1332,6 +1367,9 @@ "smithy.api#httpQuery": "created-after" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.backupstorage#ListObjectsOutput": { @@ -1350,6 +1388,9 @@ "smithy.api#documentation": "Pagination token" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.backupstorage#MaxResults": { @@ -1500,6 +1541,9 @@ "smithy.api#httpQuery": "metadata-checksum-algorithm" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.backupstorage#NotifyObjectCompleteOutput": { @@ -1519,6 +1563,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.backupstorage#ObjectList": { @@ -1644,6 +1691,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.backupstorage#PutChunkOutput": { @@ -1663,6 +1713,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.backupstorage#PutObject": { @@ -1790,6 +1843,9 @@ "smithy.api#httpQuery": "throwOnDuplicate" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.backupstorage#PutObjectOutput": { @@ -1823,6 +1879,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.backupstorage#ResourceNotFoundException": { @@ -1949,6 +2008,9 @@ "smithy.api#documentation": "Throw an exception if Object name is already exist." } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.backupstorage#StartObjectOutput": { @@ -1961,17 +2023,20 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.backupstorage#SummaryChecksumAlgorithm": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUMMARY", - "name": "SUMMARY" + "type": "enum", + "members": { + "SUMMARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUMMARY" } - ] + } } }, "com.amazonaws.backupstorage#ThrottlingException": { diff --git a/codegen/sdk-codegen/aws-models/batch.json b/codegen/sdk-codegen/aws-models/batch.json index bf3755b26af..fab355ccc65 100644 --- a/codegen/sdk-codegen/aws-models/batch.json +++ b/codegen/sdk-codegen/aws-models/batch.json @@ -183,52 +183,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -236,13 +240,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -252,92 +265,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://batch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://batch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -346,180 +350,140 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://fips.batch.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://batch.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://batch-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://fips.batch.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://batch.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://batch.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://batch-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "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://batch.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://batch.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://batch.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1552,6 +1516,17 @@ ], "traits": { "smithy.api#documentation": "

Cancels a job in an Batch job queue. Jobs that are in the\n SUBMITTED\n or\n PENDING\n are\n canceled. A job\n inRUNNABLE remains in RUNNABLE until it reaches the head of the\n job queue. Then the job status is updated to\n FAILED.

\n \n

A PENDING job is canceled after all dependency jobs are completed.\n Therefore, it may take longer than expected to cancel a job in PENDING\n status.

\n

When you try to cancel an array parent job in PENDING, Batch attempts to\n cancel all child jobs. The array parent job is canceled when all child jobs are\n completed.

\n
\n

Jobs that progressed to the STARTING or\n RUNNING state aren't canceled. However, the API operation still succeeds, even\n if no job is canceled. These jobs must be terminated with the TerminateJob\n operation.

", + "smithy.api#examples": [ + { + "title": "To cancel a job", + "documentation": "This example cancels a job with the specified job ID.", + "input": { + "reason": "Cancelling job.", + "jobId": "1d828f65-7a4d-42e8-996d-3b900ed59dc4" + }, + "output": {} + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/canceljob", @@ -2366,6 +2341,48 @@ ], "traits": { "smithy.api#documentation": "

Creates an Batch compute environment. You can create MANAGED or UNMANAGED compute\n environments. MANAGED compute environments can use Amazon EC2 or Fargate resources.\n UNMANAGED compute environments can only use EC2 resources.

\n

In a managed compute environment, Batch manages the capacity and instance types of the compute resources\n within the environment. This is based on the compute resource specification that you define or the launch template that you\n specify when you create the compute environment. Either, you can choose to use EC2 On-Demand Instances and EC2 Spot\n Instances. Or, you can use Fargate and Fargate Spot capacity in your managed compute environment. You can\n optionally set a maximum price so that Spot Instances only launch when the Spot Instance price is less than a\n specified percentage of the On-Demand price.

\n \n

Multi-node parallel jobs aren't supported on Spot Instances.

\n
\n

In an unmanaged compute environment, you can manage your own EC2 compute resources and have flexibility with how\n you configure your compute resources. For example, you can use custom AMIs. However, you must verify that each of\n your AMIs meet the Amazon ECS container instance AMI specification. For more information, see container instance AMIs in the\n Amazon Elastic Container Service Developer Guide. After you created your unmanaged compute environment, you can use the DescribeComputeEnvironments operation to find the Amazon ECS cluster that's associated with it. Then, launch\n your container instances into that Amazon ECS cluster. For more information, see Launching an Amazon ECS container instance in the\n Amazon Elastic Container Service Developer Guide.

\n \n

To create a compute environment that uses EKS resources, the caller must have permissions to call\n eks:DescribeCluster.

\n
\n \n

Batch doesn't automatically upgrade the AMIs in a compute environment after it's created. For example, it\n also doesn't update the AMIs in your compute environment when a newer version of the Amazon ECS optimized AMI is\n available. You're responsible for the management of the guest operating system. This includes any updates and\n security patches. You're also responsible for any additional application software or utilities that you install on\n the compute resources. There are two ways to use a new AMI for your Batch jobs. The original method is to complete\n these steps:

\n
    \n
  1. \n

    Create a new compute environment with the new AMI.

    \n
  2. \n
  3. \n

    Add the compute environment to an existing job queue.

    \n
  4. \n
  5. \n

    Remove the earlier compute environment from your job queue.

    \n
  6. \n
  7. \n

    Delete the earlier compute environment.

    \n
  8. \n
\n

In April 2022, Batch added enhanced support for updating compute environments. For more information, see\n Updating compute\n environments. To use the enhanced updating of compute environments to update AMIs, follow these\n rules:

\n \n

If these rules are followed, any update that starts an infrastructure update causes the AMI ID to be\n re-selected. If the version setting in the launch template (launchTemplate) is set to\n $Latest or $Default, the latest or default version of the launch template is evaluated up\n at the time of the infrastructure update, even if the launchTemplate wasn't updated.

\n
", + "smithy.api#examples": [ + { + "title": "To create a managed EC2 compute environment", + "documentation": "This example creates a managed compute environment with specific C4 instance types that are launched on demand. The compute environment is called C4OnDemand.", + "input": { + "computeEnvironmentName": "C4OnDemand", + "state": "ENABLED", + "type": "MANAGED", + "computeResources": { + "subnets": [ + "subnet-220c0e0a", + "subnet-1a95556d", + "subnet-978f6dce" + ], + "tags": { + "Name": "Batch Instance - C4OnDemand" + }, + "desiredvCpus": 48, + "minvCpus": 0, + "instanceTypes": [ + "c4.large", + "c4.xlarge", + "c4.2xlarge", + "c4.4xlarge", + "c4.8xlarge" + ], + "securityGroupIds": [ + "sg-cf5093b2" + ], + "instanceRole": "ecsInstanceRole", + "maxvCpus": 128, + "type": "EC2", + "ec2KeyPair": "id_rsa" + }, + "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole" + }, + "output": { + "computeEnvironmentName": "C4OnDemand", + "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/C4OnDemand" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/createcomputeenvironment", @@ -2470,6 +2487,27 @@ ], "traits": { "smithy.api#documentation": "

Creates an Batch job queue. When you create a job queue, you associate one or more compute environments to the\n queue and assign an order of preference for the compute environments.

\n

You also set a priority to the job queue that determines the order that the Batch scheduler places jobs onto\n its associated compute environments. For example, if a compute environment is associated with more than one job\n queue, the job queue with a higher priority is given preference for scheduling jobs to that compute\n environment.

", + "smithy.api#examples": [ + { + "title": "To create a job queue with a single compute environment", + "documentation": "This example creates a job queue called LowPriority that uses the M4Spot compute environment.", + "input": { + "priority": 1, + "state": "ENABLED", + "computeEnvironmentOrder": [ + { + "computeEnvironment": "M4Spot", + "order": 1 + } + ], + "jobQueueName": "LowPriority" + }, + "output": { + "jobQueueName": "LowPriority", + "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/LowPriority" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/createjobqueue", @@ -2640,6 +2678,16 @@ ], "traits": { "smithy.api#documentation": "

Deletes an Batch compute environment.

\n

Before you can delete a compute environment, you must set its state to DISABLED with the UpdateComputeEnvironment API operation and disassociate it from any job queues with the UpdateJobQueue API operation. Compute environments that use Fargate resources must terminate all\n active jobs on that compute environment before deleting the compute environment. If this isn't done, the compute\n environment enters an invalid state.

", + "smithy.api#examples": [ + { + "title": "To delete a compute environment", + "documentation": "This example deletes the P2OnDemand compute environment.", + "input": { + "computeEnvironment": "P2OnDemand" + }, + "output": {} + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/deletecomputeenvironment", @@ -2688,6 +2736,16 @@ ], "traits": { "smithy.api#documentation": "

Deletes the specified job queue. You must first disable submissions for a queue with the UpdateJobQueue operation. All jobs in the queue are eventually terminated when you delete a job queue.\n The jobs are terminated at a rate of about 16 jobs each second.

\n

It's not necessary to disassociate compute environments from a queue before submitting a\n DeleteJobQueue request.

", + "smithy.api#examples": [ + { + "title": "To delete a job queue", + "documentation": "This example deletes the GPGPU job queue.", + "input": { + "jobQueue": "GPGPU" + }, + "output": {} + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/deletejobqueue", @@ -2784,6 +2842,16 @@ ], "traits": { "smithy.api#documentation": "

Deregisters an Batch job definition. Job definitions are permanently deleted after 180 days.

", + "smithy.api#examples": [ + { + "title": "To deregister a job definition", + "documentation": "This example deregisters a job definition called sleep10.", + "input": { + "jobDefinition": "sleep10" + }, + "output": {} + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/deregisterjobdefinition", @@ -2831,6 +2899,53 @@ ], "traits": { "smithy.api#documentation": "

Describes one or more of your compute environments.

\n

If you're using an unmanaged compute environment, you can use the DescribeComputeEnvironment\n operation to determine the ecsClusterArn that you launch your Amazon ECS container instances\n into.

", + "smithy.api#examples": [ + { + "title": "To describe a compute environment", + "documentation": "This example describes the P2OnDemand compute environment.", + "input": { + "computeEnvironments": [ + "P2OnDemand" + ] + }, + "output": { + "computeEnvironments": [ + { + "computeEnvironmentName": "P2OnDemand", + "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/P2OnDemand", + "ecsClusterArn": "arn:aws:ecs:us-east-1:012345678910:cluster/P2OnDemand_Batch_2c06f29d-d1fe-3a49-879d-42394c86effc", + "type": "MANAGED", + "state": "ENABLED", + "status": "VALID", + "statusReason": "ComputeEnvironment Healthy", + "computeResources": { + "type": "EC2", + "minvCpus": 0, + "maxvCpus": 128, + "desiredvCpus": 48, + "instanceTypes": [ + "p2" + ], + "subnets": [ + "subnet-220c0e0a", + "subnet-1a95556d", + "subnet-978f6dce" + ], + "securityGroupIds": [ + "sg-cf5093b2" + ], + "ec2KeyPair": "id_rsa", + "instanceRole": "ecsInstanceRole", + "tags": { + "Name": "Batch Instance - P2OnDemand" + } + }, + "serviceRole": "arn:aws:iam::012345678910:role/AWSBatchServiceRole" + } + ] + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/describecomputeenvironments", @@ -2909,6 +3024,47 @@ ], "traits": { "smithy.api#documentation": "

Describes a list of job definitions. You can specify a status (such as ACTIVE) to only\n return job definitions that match that status.

", + "smithy.api#examples": [ + { + "title": "To describe active job definitions", + "documentation": "This example describes all of your active job definitions.", + "input": { + "status": "ACTIVE" + }, + "output": { + "jobDefinitions": [ + { + "jobDefinitionName": "sleep60", + "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep60:1", + "revision": 1, + "status": "ACTIVE", + "type": "container", + "containerProperties": { + "image": "busybox", + "resourceRequirements": [ + { + "type": "MEMORY", + "value": "128" + }, + { + "type": "VCPU", + "value": "1" + } + ], + "command": [ + "sleep", + "60" + ], + "volumes": [], + "environment": [], + "mountPoints": [], + "ulimits": [] + } + } + ] + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/describejobdefinitions", @@ -2999,6 +3155,35 @@ ], "traits": { "smithy.api#documentation": "

Describes one or more of your job queues.

", + "smithy.api#examples": [ + { + "title": "To describe a job queue", + "documentation": "This example describes the HighPriority job queue.", + "input": { + "jobQueues": [ + "HighPriority" + ] + }, + "output": { + "jobQueues": [ + { + "jobQueueName": "HighPriority", + "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority", + "state": "ENABLED", + "status": "VALID", + "statusReason": "JobQueue Healthy", + "priority": 1, + "computeEnvironmentOrder": [ + { + "order": 1, + "computeEnvironment": "arn:aws:batch:us-east-1:012345678910:compute-environment/C4OnDemand" + } + ] + } + ] + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/describejobqueues", @@ -3077,6 +3262,48 @@ ], "traits": { "smithy.api#documentation": "

Describes a list of Batch jobs.

", + "smithy.api#examples": [ + { + "title": "To describe a specific job", + "documentation": "This example describes a job with the specified job ID.", + "input": { + "jobs": [ + "24fa2d7a-64c4-49d2-8b47-f8da4fbde8e9" + ] + }, + "output": { + "jobs": [ + { + "jobName": "example", + "jobId": "24fa2d7a-64c4-49d2-8b47-f8da4fbde8e9", + "jobQueue": "arn:aws:batch:us-east-1:012345678910:job-queue/HighPriority", + "status": "SUCCEEDED", + "createdAt": 1480460782010, + "startedAt": 1480460816500, + "stoppedAt": 1480460880699, + "dependsOn": [], + "jobDefinition": "sleep60", + "parameters": {}, + "container": { + "image": "busybox", + "vcpus": 1, + "memory": 128, + "command": [ + "sleep", + "60" + ], + "volumes": [], + "environment": [], + "mountPoints": [], + "ulimits": [], + "exitCode": 0, + "containerInstanceArn": "arn:aws:ecs:us-east-1:012345678910:container-instance/5406d7cd-58bd-4b8f-9936-48d7c6b1526c" + } + } + ] + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/describejobs", @@ -4969,6 +5196,23 @@ ], "traits": { "smithy.api#documentation": "

Returns a list of Batch jobs.

\n

You must specify only one of the following items:

\n \n

You can filter the results by job status with the jobStatus parameter. If you don't specify a\n status, only RUNNING jobs are returned.

", + "smithy.api#examples": [ + { + "title": "To list running jobs", + "documentation": "This example lists the running jobs in the HighPriority job queue.", + "input": { + "jobQueue": "HighPriority" + }, + "output": { + "jobSummaryList": [ + { + "jobId": "e66ff5fd-a1ff-4640-b1a2-0b0a142f49bb", + "jobName": "example" + } + ] + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/listjobs", @@ -5150,6 +5394,22 @@ ], "traits": { "smithy.api#documentation": "

Lists the tags for an Batch resource. Batch resources that support tags are compute environments, jobs, job definitions, job queues,\n and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported.

", + "smithy.api#examples": [ + { + "title": "ListTagsForResource Example", + "documentation": "This demonstrates calling the ListTagsForResource action.", + "input": { + "resourceArn": "arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1" + }, + "output": { + "tags": { + "Stage": "Alpha", + "Department": "Engineering", + "User": "JaneDoe" + } + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/v1/tags/{resourceArn}", @@ -5577,6 +5837,38 @@ ], "traits": { "smithy.api#documentation": "

Registers an Batch job definition.

", + "smithy.api#examples": [ + { + "title": "To register a job definition", + "documentation": "This example registers a job definition for a simple container job.", + "input": { + "containerProperties": { + "image": "busybox", + "command": [ + "sleep", + "10" + ], + "resourceRequirements": [ + { + "type": "MEMORY", + "value": "128" + }, + { + "type": "VCPU", + "value": "1" + } + ] + }, + "type": "container", + "jobDefinitionName": "sleep10" + }, + "output": { + "jobDefinitionName": "sleep10", + "jobDefinitionArn": "arn:aws:batch:us-east-1:012345678910:job-definition/sleep10:1", + "revision": 1 + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/registerjobdefinition", @@ -5960,6 +6252,21 @@ ], "traits": { "smithy.api#documentation": "

Submits an Batch job from a job definition. Parameters that are specified during SubmitJob\n override parameters defined in the job definition. vCPU and memory requirements that are specified in the\n resourceRequirements objects in the job definition are the exception. They can't be overridden this way\n using the memory and vcpus parameters. Rather, you must specify updates to job definition\n parameters in a resourceRequirements object that's included in the containerOverrides\n parameter.

\n \n

Job queues with a scheduling policy are limited to 500 active fair share identifiers at a time.

\n
\n \n

Jobs that run on Fargate resources can't be guaranteed to run for more than 14 days. This is because, after 14\n days, Fargate resources might become unavailable and job might be terminated.

\n
", + "smithy.api#examples": [ + { + "title": "To submit a job to a queue", + "documentation": "This example submits a simple container job called example to the HighPriority job queue.", + "input": { + "jobName": "example", + "jobQueue": "HighPriority", + "jobDefinition": "sleep60" + }, + "output": { + "jobName": "example", + "jobId": "876da822-4198-45f2-a252-6cea32512ea8" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/submitjob", @@ -6136,6 +6443,19 @@ ], "traits": { "smithy.api#documentation": "

Associates the specified tags to a resource with the specified resourceArn. If existing tags on a\n resource aren't specified in the request parameters, they aren't changed. When a resource is deleted, the tags that\n are associated with that resource are deleted as well. Batch resources that support tags are compute environments, jobs, job definitions, job queues,\n and scheduling policies. ARNs for child jobs of array and multi-node parallel (MNP) jobs aren't supported.

", + "smithy.api#examples": [ + { + "title": "TagResource Example", + "documentation": "This demonstrates calling the TagResource action.", + "input": { + "resourceArn": "arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1", + "tags": { + "Stage": "Alpha" + } + }, + "output": {} + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/tags/{resourceArn}", @@ -6225,6 +6545,17 @@ ], "traits": { "smithy.api#documentation": "

Terminates a job in a job queue. Jobs that are in the STARTING or RUNNING state are\n terminated, which causes them to transition to FAILED. Jobs that have not progressed to the\n STARTING state are cancelled.

", + "smithy.api#examples": [ + { + "title": "To terminate a job", + "documentation": "This example terminates a job with the specified job ID.", + "input": { + "reason": "Terminating job.", + "jobId": "61e743ed-35e4-48da-b2de-5c8333821c84" + }, + "output": {} + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/terminatejob", @@ -6349,6 +6680,19 @@ ], "traits": { "smithy.api#documentation": "

Deletes specified tags from an Batch resource.

", + "smithy.api#examples": [ + { + "title": "UntagResource Example", + "documentation": "This demonstrates calling the UntagResource action.", + "input": { + "resourceArn": "arn:aws:batch:us-east-1:123456789012:job-definition/sleep30:1", + "tagKeys": [ + "Stage" + ] + }, + "output": {} + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/v1/tags/{resourceArn}", @@ -6406,6 +6750,20 @@ ], "traits": { "smithy.api#documentation": "

Updates an Batch compute environment.

", + "smithy.api#examples": [ + { + "title": "To update a compute environment", + "documentation": "This example disables the P2OnDemand compute environment so it can be deleted.", + "input": { + "computeEnvironment": "P2OnDemand", + "state": "DISABLED" + }, + "output": { + "computeEnvironmentName": "P2OnDemand", + "computeEnvironmentArn": "arn:aws:batch:us-east-1:012345678910:compute-environment/P2OnDemand" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/updatecomputeenvironment", @@ -6497,6 +6855,20 @@ ], "traits": { "smithy.api#documentation": "

Updates a job queue.

", + "smithy.api#examples": [ + { + "title": "To update a job queue", + "documentation": "This example disables a job queue so that it can be deleted.", + "input": { + "state": "DISABLED", + "jobQueue": "GPGPU" + }, + "output": { + "jobQueueName": "GPGPU", + "jobQueueArn": "arn:aws:batch:us-east-1:012345678910:job-queue/GPGPU" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/v1/updatejobqueue", diff --git a/codegen/sdk-codegen/aws-models/braket.json b/codegen/sdk-codegen/aws-models/braket.json index 5b39d8a0d89..de2d981ab5f 100644 --- a/codegen/sdk-codegen/aws-models/braket.json +++ b/codegen/sdk-codegen/aws-models/braket.json @@ -149,52 +149,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -202,13 +206,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -218,224 +231,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://braket-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://braket-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://braket-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://braket-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://braket.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://braket.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://braket.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://braket.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -450,8 +414,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -463,8 +427,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -476,8 +440,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -489,8 +453,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -502,8 +466,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -515,8 +479,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -528,8 +492,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -541,8 +505,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -554,8 +518,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -567,8 +531,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -580,8 +544,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -593,8 +557,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -606,8 +570,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -619,8 +583,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -632,8 +596,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -645,8 +620,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -658,8 +644,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -671,8 +668,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -684,8 +692,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -697,8 +705,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -710,8 +718,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -722,8 +730,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -734,10 +742,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3317,4 +3331,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/chime-sdk-identity.json b/codegen/sdk-codegen/aws-models/chime-sdk-identity.json index 13730f21b19..402ae5acfc5 100644 --- a/codegen/sdk-codegen/aws-models/chime-sdk-identity.json +++ b/codegen/sdk-codegen/aws-models/chime-sdk-identity.json @@ -678,52 +678,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -731,13 +735,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -747,224 +760,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://identity-chime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://identity-chime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://identity-chime-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://identity-chime-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://identity-chime.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://identity-chime.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://identity-chime.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://identity-chime.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/chime-sdk-messaging.json b/codegen/sdk-codegen/aws-models/chime-sdk-messaging.json index c8fc56f0bab..e176a624b4f 100644 --- a/codegen/sdk-codegen/aws-models/chime-sdk-messaging.json +++ b/codegen/sdk-codegen/aws-models/chime-sdk-messaging.json @@ -1598,52 +1598,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1651,13 +1655,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1667,224 +1680,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://messaging-chime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://messaging-chime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://messaging-chime-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://messaging-chime-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://messaging-chime.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://messaging-chime.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://messaging-chime.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://messaging-chime.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/chime-sdk-voice.json b/codegen/sdk-codegen/aws-models/chime-sdk-voice.json index 1b5ccd24ad4..b0adf10beb8 100644 --- a/codegen/sdk-codegen/aws-models/chime-sdk-voice.json +++ b/codegen/sdk-codegen/aws-models/chime-sdk-voice.json @@ -1326,55 +1326,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://voice-chime-fips.us-gov-east-1.api.aws" + "url": "https://voice-chime-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://voice-chime-fips.us-gov-east-1.amazonaws.com" + "url": "https://voice-chime-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://voice-chime.us-gov-east-1.api.aws" + "url": "https://voice-chime.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://voice-chime.us-gov-east-1.amazonaws.com" + "url": "https://voice-chime.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -1385,9 +1385,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1398,9 +1398,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -1411,9 +1411,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1424,109 +1424,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://voice-chime-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://voice-chime-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://voice-chime-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://voice-chime.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://voice-chime.us-iso-east-1.c2s.ic.gov" + "url": "https://voice-chime.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://voice-chime-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://voice-chime-fips.us-east-1.amazonaws.com" + "url": "https://voice-chime-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://voice-chime.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://voice-chime.us-east-1.amazonaws.com" + "url": "https://voice-chime.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -1535,9 +1535,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1548,9 +1548,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1559,9 +1559,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1572,22 +1572,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1597,9 +1610,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1609,11 +1622,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/chime.json b/codegen/sdk-codegen/aws-models/chime.json index d549806b589..a49aeb4c912 100644 --- a/codegen/sdk-codegen/aws-models/chime.json +++ b/codegen/sdk-codegen/aws-models/chime.json @@ -19438,52 +19438,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -19491,291 +19495,251 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://chime.us-east-1.amazonaws.com", + "properties": { + "authSchemes": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "name": "sigv4", + "signingName": "chime", + "signingRegion": "us-east-1" } - ], - "endpoint": { - "url": "https://chime.us-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "chime", - "signingRegion": "us-east-1" - } - ] + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" }, - "headers": {} - }, - "type": "endpoint" + true + ] }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://chime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://chime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://chime-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://chime-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://chime.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://chime.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://chime.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://chime.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/cloudcontrol.json b/codegen/sdk-codegen/aws-models/cloudcontrol.json index 5202ce55190..e479fe67210 100644 --- a/codegen/sdk-codegen/aws-models/cloudcontrol.json +++ b/codegen/sdk-codegen/aws-models/cloudcontrol.json @@ -187,52 +187,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -240,13 +244,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -256,224 +269,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cloudcontrolapi-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://cloudcontrolapi-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://cloudcontrolapi-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://cloudcontrolapi-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cloudcontrolapi.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://cloudcontrolapi.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://cloudcontrolapi.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://cloudcontrolapi.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/clouddirectory.json b/codegen/sdk-codegen/aws-models/clouddirectory.json index 001cf15a531..a7fbd382ace 100644 --- a/codegen/sdk-codegen/aws-models/clouddirectory.json +++ b/codegen/sdk-codegen/aws-models/clouddirectory.json @@ -408,52 +408,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -461,13 +465,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -477,92 +490,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://clouddirectory-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://clouddirectory-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -571,155 +575,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://clouddirectory.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://clouddirectory-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://clouddirectory.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://clouddirectory-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://clouddirectory.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://clouddirectory.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://clouddirectory.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://clouddirectory.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -734,8 +698,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -747,8 +711,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -760,8 +724,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -773,8 +737,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -786,8 +750,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -799,8 +763,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -812,8 +776,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -825,8 +789,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -838,8 +802,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -851,8 +815,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -864,8 +828,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -877,8 +841,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -890,8 +854,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -903,8 +867,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -916,8 +880,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -929,8 +893,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -942,8 +906,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -955,8 +919,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -968,8 +932,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -981,8 +945,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -994,8 +958,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1007,8 +971,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1020,8 +995,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1033,8 +1019,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1046,8 +1043,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1059,8 +1067,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1072,8 +1080,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1085,8 +1093,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1097,8 +1105,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1109,10 +1117,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/cloudfront.json b/codegen/sdk-codegen/aws-models/cloudfront.json index dabc40a6217..61bc81b5b28 100644 --- a/codegen/sdk-codegen/aws-models/cloudfront.json +++ b/codegen/sdk-codegen/aws-models/cloudfront.json @@ -1402,52 +1402,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1455,393 +1459,353 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://cloudfront.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "cloudfront", - "signingRegion": "us-east-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://cloudfront.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "cloudfront", + "signingRegion": "us-east-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] + "ref": "UseFIPS" }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://cloudfront-fips.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "cloudfront", - "signingRegion": "us-east-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://cloudfront-fips.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "cloudfront", + "signingRegion": "us-east-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-cn" + "name" ] }, + "aws-cn" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://cloudfront.cn-northwest-1.amazonaws.com.cn", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "cloudfront", + "signingRegion": "cn-northwest-1" } - ], - "endpoint": { - "url": "https://cloudfront.cn-northwest-1.amazonaws.com.cn", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "cloudfront", - "signingRegion": "cn-northwest-1" - } - ] + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" }, - "headers": {} - }, - "type": "endpoint" + true + ] }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://cloudfront-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://cloudfront-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://cloudfront-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://cloudfront-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://cloudfront.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://cloudfront.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://cloudfront.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://cloudfront.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/cloudhsm-v2.json b/codegen/sdk-codegen/aws-models/cloudhsm-v2.json index ec769107ae6..aa16b18c41d 100644 --- a/codegen/sdk-codegen/aws-models/cloudhsm-v2.json +++ b/codegen/sdk-codegen/aws-models/cloudhsm-v2.json @@ -107,18 +107,18 @@ "com.amazonaws.cloudhsmv2#BackupId": { "type": "string", "traits": { - "smithy.api#pattern": "backup-[2-7a-zA-Z]{11,16}" + "smithy.api#pattern": "^backup-[2-7a-zA-Z]{11,16}$" } }, "com.amazonaws.cloudhsmv2#BackupPolicy": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DEFAULT", - "name": "DEFAULT" + "type": "enum", + "members": { + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEFAULT" } - ] + } } }, "com.amazonaws.cloudhsmv2#BackupRetentionPolicy": { @@ -142,14 +142,14 @@ } }, "com.amazonaws.cloudhsmv2#BackupRetentionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DAYS", - "name": "DAYS" + "type": "enum", + "members": { + "DAYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DAYS" } - ] + } } }, "com.amazonaws.cloudhsmv2#BackupRetentionValue": { @@ -159,30 +159,36 @@ "min": 1, "max": 3 }, - "smithy.api#pattern": "[0-9]+" + "smithy.api#pattern": "^[0-9]+$" } }, "com.amazonaws.cloudhsmv2#BackupState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATE_IN_PROGRESS", - "name": "CREATE_IN_PROGRESS" - }, - { - "value": "READY", - "name": "READY" - }, - { - "value": "DELETED", - "name": "DELETED" - }, - { - "value": "PENDING_DELETION", - "name": "PENDING_DELETION" + "type": "enum", + "members": { + "CREATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_IN_PROGRESS" } - ] + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED" + } + }, + "PENDING_DELETION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_DELETION" + } + } } }, "com.amazonaws.cloudhsmv2#Backups": { @@ -256,6 +262,7 @@ "arnNamespace": "cloudhsm", "cloudFormationName": "CloudHSMV2", "cloudTrailEventSource": "cloudhsmv2.amazonaws.com", + "docId": "cloudhsmv2-2017-04-28", "endpointPrefix": "cloudhsmv2" }, "aws.auth#sigv4": { @@ -324,52 +331,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -377,13 +388,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -393,274 +413,225 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://cloudhsmv2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cloudhsmv2-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://cloudhsmv2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://cloudhsmv2.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://cloudhsmv2.{Region}.amazonaws.com", + "url": "https://cloudhsmv2-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ - "aws-us-gov", { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://cloudhsmv2.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://cloudhsmv2.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://cloudhsmv2.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://cloudhsmv2.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://cloudhsmv2.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://cloudhsmv2.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -675,8 +646,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -688,8 +659,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -701,8 +672,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -714,8 +685,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -727,8 +698,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -740,8 +711,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -753,8 +724,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -766,8 +737,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -779,8 +750,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -792,8 +763,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -805,8 +776,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -818,8 +789,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -831,8 +802,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -844,8 +815,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -857,8 +828,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -870,8 +841,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -883,8 +854,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -896,8 +867,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -909,8 +880,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -922,8 +893,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -935,8 +906,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -948,8 +919,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -961,8 +932,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -974,8 +945,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -987,8 +958,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1000,8 +971,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1013,8 +984,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1026,8 +997,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1039,8 +1010,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1052,8 +1023,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1065,8 +1036,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1078,8 +1049,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1091,8 +1062,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1104,8 +1086,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1117,8 +1110,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1130,8 +1134,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1143,8 +1158,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1156,8 +1171,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1169,8 +1184,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1181,8 +1196,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1193,10 +1208,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1213,7 +1234,7 @@ "min": 0, "max": 5000 }, - "smithy.api#pattern": "[a-zA-Z0-9+-/=\\s]*" + "smithy.api#pattern": "^[a-zA-Z0-9+-/=\\s]*$" } }, "com.amazonaws.cloudhsmv2#Certificates": { @@ -1427,50 +1448,66 @@ "com.amazonaws.cloudhsmv2#ClusterId": { "type": "string", "traits": { - "smithy.api#pattern": "cluster-[2-7a-zA-Z]{11,16}" + "smithy.api#pattern": "^cluster-[2-7a-zA-Z]{11,16}$" } }, "com.amazonaws.cloudhsmv2#ClusterState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATE_IN_PROGRESS", - "name": "CREATE_IN_PROGRESS" - }, - { - "value": "UNINITIALIZED", - "name": "UNINITIALIZED" - }, - { - "value": "INITIALIZE_IN_PROGRESS", - "name": "INITIALIZE_IN_PROGRESS" - }, - { - "value": "INITIALIZED", - "name": "INITIALIZED" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "UPDATE_IN_PROGRESS", - "name": "UPDATE_IN_PROGRESS" - }, - { - "value": "DELETE_IN_PROGRESS", - "name": "DELETE_IN_PROGRESS" - }, - { - "value": "DELETED", - "name": "DELETED" - }, - { - "value": "DEGRADED", - "name": "DEGRADED" + "type": "enum", + "members": { + "CREATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_IN_PROGRESS" + } + }, + "UNINITIALIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNINITIALIZED" + } + }, + "INITIALIZE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INITIALIZE_IN_PROGRESS" + } + }, + "INITIALIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INITIALIZED" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "UPDATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_IN_PROGRESS" + } + }, + "DELETE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_IN_PROGRESS" } - ] + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED" + } + }, + "DEGRADED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEGRADED" + } + } } }, "com.amazonaws.cloudhsmv2#Clusters": { @@ -1543,6 +1580,9 @@ "smithy.api#documentation": "

Tags to apply to the destination backup during creation. If you specify tags, only these tags will be applied to the destination backup. If you do not specify tags, the service copies tags from the source backup to the destination backup.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#CopyBackupToRegionResponse": { @@ -1554,6 +1594,9 @@ "smithy.api#documentation": "

Information on the backup that will be copied to the destination region, including\n CreateTimestamp, SourceBackup, SourceCluster, and Source Region. CreateTimestamp of the\n destination backup will be the same as that of the source backup.

\n

You will need to use the sourceBackupID returned in this operation to use\n the DescribeBackups operation on the backup that will be copied to the\n destination region.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#CreateCluster": { @@ -1623,6 +1666,9 @@ "smithy.api#documentation": "

Tags to apply to the CloudHSM cluster during creation.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#CreateClusterResponse": { @@ -1634,6 +1680,9 @@ "smithy.api#documentation": "

Information about the cluster that was created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#CreateHsm": { @@ -1688,6 +1737,9 @@ "smithy.api#documentation": "

The HSM's IP address. If you specify an IP address, use an available address from the\n subnet that maps to the Availability Zone where you are creating the HSM. If you don't specify\n an IP address, one is chosen for you from that subnet.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#CreateHsmResponse": { @@ -1699,6 +1751,9 @@ "smithy.api#documentation": "

Information about the HSM that was created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#DeleteBackup": { @@ -1740,6 +1795,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#DeleteBackupResponse": { @@ -1751,6 +1809,9 @@ "smithy.api#documentation": "

Information on the Backup object deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#DeleteCluster": { @@ -1795,6 +1856,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#DeleteClusterResponse": { @@ -1806,6 +1870,9 @@ "smithy.api#documentation": "

Information about the cluster that was deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#DeleteHsm": { @@ -1865,6 +1932,9 @@ "smithy.api#documentation": "

The IP address of the elastic network interface (ENI) of the HSM that you are\n deleting.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#DeleteHsmResponse": { @@ -1876,6 +1946,9 @@ "smithy.api#documentation": "

The identifier (ID) of the HSM that was deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#DescribeBackups": { @@ -1942,6 +2015,9 @@ "smithy.api#documentation": "

Designates whether or not to sort the return backups by ascending chronological order\n of generation.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#DescribeBackupsResponse": { @@ -1959,6 +2035,9 @@ "smithy.api#documentation": "

An opaque string that indicates that the response contains only a subset of backups.\n Use this value in a subsequent DescribeBackups request to get more\n backups.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#DescribeClusters": { @@ -2016,6 +2095,9 @@ "smithy.api#documentation": "

The maximum number of clusters to return in the response. When there are more clusters\n than the number you specify, the response contains a NextToken value.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#DescribeClustersResponse": { @@ -2033,6 +2115,9 @@ "smithy.api#documentation": "

An opaque string that indicates that the response contains only a subset of clusters.\n Use this value in a subsequent DescribeClusters request to get more\n clusters.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#DestinationBackup": { @@ -2070,13 +2155,13 @@ "com.amazonaws.cloudhsmv2#EniId": { "type": "string", "traits": { - "smithy.api#pattern": "eni-[0-9a-fA-F]{8,17}" + "smithy.api#pattern": "^eni-[0-9a-fA-F]{8,17}$" } }, "com.amazonaws.cloudhsmv2#ExternalAz": { "type": "string", "traits": { - "smithy.api#pattern": "[a-z]{2}(-(gov))?-(east|west|north|south|central){1,2}-\\d[a-z]" + "smithy.api#pattern": "^[a-z]{2}(-(gov))?-(east|west|north|south|central){1,2}-\\d[a-z]$" } }, "com.amazonaws.cloudhsmv2#ExternalSubnetMapping": { @@ -2091,7 +2176,7 @@ "com.amazonaws.cloudhsmv2#Field": { "type": "string", "traits": { - "smithy.api#pattern": "[a-zA-Z0-9_-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" } }, "com.amazonaws.cloudhsmv2#Filters": { @@ -2163,40 +2248,48 @@ "com.amazonaws.cloudhsmv2#HsmId": { "type": "string", "traits": { - "smithy.api#pattern": "hsm-[2-7a-zA-Z]{11,16}" + "smithy.api#pattern": "^hsm-[2-7a-zA-Z]{11,16}$" } }, "com.amazonaws.cloudhsmv2#HsmState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATE_IN_PROGRESS", - "name": "CREATE_IN_PROGRESS" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "DEGRADED", - "name": "DEGRADED" - }, - { - "value": "DELETE_IN_PROGRESS", - "name": "DELETE_IN_PROGRESS" - }, - { - "value": "DELETED", - "name": "DELETED" + "type": "enum", + "members": { + "CREATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_IN_PROGRESS" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DEGRADED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEGRADED" + } + }, + "DELETE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_IN_PROGRESS" } - ] + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED" + } + } } }, "com.amazonaws.cloudhsmv2#HsmType": { "type": "string", "traits": { - "smithy.api#pattern": "(hsm1\\.medium)" + "smithy.api#pattern": "^(hsm1\\.medium)$" } }, "com.amazonaws.cloudhsmv2#Hsms": { @@ -2258,6 +2351,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#InitializeClusterResponse": { @@ -2275,12 +2371,15 @@ "smithy.api#documentation": "

A description of the cluster's state.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#IpAddress": { "type": "string", "traits": { - "smithy.api#pattern": "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" + "smithy.api#pattern": "^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$" } }, "com.amazonaws.cloudhsmv2#ListTags": { @@ -2342,6 +2441,9 @@ "smithy.api#documentation": "

The maximum number of tags to return in the response. When there are more tags than the\n number you specify, the response contains a NextToken value.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#ListTagsResponse": { @@ -2360,6 +2462,9 @@ "smithy.api#documentation": "

An opaque string that indicates that the response contains only a subset of tags. Use\n this value in a subsequent ListTags request to get more tags.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#MaxSize": { @@ -2417,6 +2522,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#ModifyBackupAttributesResponse": { @@ -2425,6 +2533,9 @@ "Backup": { "target": "com.amazonaws.cloudhsmv2#Backup" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#ModifyCluster": { @@ -2473,6 +2584,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#ModifyClusterResponse": { @@ -2481,6 +2595,9 @@ "Cluster": { "target": "com.amazonaws.cloudhsmv2#Cluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#NextToken": { @@ -2505,13 +2622,13 @@ "com.amazonaws.cloudhsmv2#Region": { "type": "string", "traits": { - "smithy.api#pattern": "[a-z]{2}(-(gov))?-(east|west|north|south|central){1,2}-\\d" + "smithy.api#pattern": "^[a-z]{2}(-(gov))?-(east|west|north|south|central){1,2}-\\d$" } }, "com.amazonaws.cloudhsmv2#ResourceId": { "type": "string", "traits": { - "smithy.api#pattern": "(?:cluster|backup)-[2-7a-zA-Z]{11,16}" + "smithy.api#pattern": "^(?:cluster|backup)-[2-7a-zA-Z]{11,16}$" } }, "com.amazonaws.cloudhsmv2#RestoreBackup": { @@ -2553,6 +2670,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#RestoreBackupResponse": { @@ -2564,12 +2684,15 @@ "smithy.api#documentation": "

Information on the Backup object created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cloudhsmv2#SecurityGroup": { "type": "string", "traits": { - "smithy.api#pattern": "sg-[0-9a-fA-F]{8,17}" + "smithy.api#pattern": "^sg-[0-9a-fA-F]{8,17}$" } }, "com.amazonaws.cloudhsmv2#StateMessage": { @@ -2594,7 +2717,7 @@ "com.amazonaws.cloudhsmv2#SubnetId": { "type": "string", "traits": { - "smithy.api#pattern": "subnet-[0-9a-fA-F]{8,17}" + "smithy.api#pattern": "^subnet-[0-9a-fA-F]{8,17}$" } }, "com.amazonaws.cloudhsmv2#SubnetIds": { @@ -2714,11 +2837,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.cloudhsmv2#TagValue": { "type": "string", @@ -2782,16 +2911,22 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cloudhsmv2#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.cloudhsmv2#VpcId": { "type": "string", "traits": { - "smithy.api#pattern": "vpc-[0-9a-fA-F]" + "smithy.api#pattern": "^vpc-[0-9a-fA-F]$" } }, "com.amazonaws.cloudhsmv2#errorMessage": { diff --git a/codegen/sdk-codegen/aws-models/cloudsearch-domain.json b/codegen/sdk-codegen/aws-models/cloudsearch-domain.json index 85f2fd04702..1eebf671b68 100644 --- a/codegen/sdk-codegen/aws-models/cloudsearch-domain.json +++ b/codegen/sdk-codegen/aws-models/cloudsearch-domain.json @@ -55,6 +55,7 @@ "arnNamespace": "cloudsearch", "cloudFormationName": "CloudSearchDomain", "cloudTrailEventSource": "cloudsearchdomain.amazonaws.com", + "docId": "cloudsearchdomain-2013-01-01", "endpointPrefix": "cloudsearchdomain" }, "aws.auth#sigv4": { @@ -126,52 +127,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -179,13 +184,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -195,224 +209,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cloudsearchdomain-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://cloudsearchdomain-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://cloudsearchdomain-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://cloudsearchdomain-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cloudsearchdomain.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://cloudsearchdomain.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://cloudsearchdomain.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://cloudsearchdomain.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -427,8 +392,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -440,8 +405,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -453,8 +418,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -466,8 +431,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -479,8 +444,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -492,8 +457,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -505,8 +470,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -518,8 +483,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -531,8 +496,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -544,8 +509,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -557,8 +522,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -570,8 +535,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -583,8 +559,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -596,8 +583,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -609,8 +607,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -622,8 +631,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -635,8 +644,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -648,8 +657,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -660,8 +669,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -672,10 +681,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -730,18 +745,20 @@ } }, "com.amazonaws.cloudsearchdomain#ContentType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "application/json", - "name": "application_json" - }, - { - "value": "application/xml", - "name": "application_xml" + "type": "enum", + "members": { + "application_json": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "application/json" + } + }, + "application_xml": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "application/xml" } - ] + } } }, "com.amazonaws.cloudsearchdomain#Cursor": { @@ -1006,26 +1023,32 @@ "type": "string" }, "com.amazonaws.cloudsearchdomain#QueryParser": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "simple", - "name": "simple" - }, - { - "value": "structured", - "name": "structured" - }, - { - "value": "lucene", - "name": "lucene" - }, - { - "value": "dismax", - "name": "dismax" + "type": "enum", + "members": { + "simple": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "simple" } - ] + }, + "structured": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "structured" + } + }, + "lucene": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lucene" + } + }, + "dismax": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dismax" + } + } } }, "com.amazonaws.cloudsearchdomain#Return": { @@ -1175,7 +1198,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the Search request.

" + "smithy.api#documentation": "

Container for the parameters to the Search request.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearchdomain#SearchResponse": { @@ -1207,7 +1231,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a Search request. Contains the documents that match the specified search criteria and any requested fields, highlights, and facet information.

" + "smithy.api#documentation": "

The result of a Search request. Contains the documents that match the specified search criteria and any requested fields, highlights, and facet information.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearchdomain#SearchStatus": { @@ -1342,7 +1367,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the Suggest request.

" + "smithy.api#documentation": "

Container for the parameters to the Suggest request.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearchdomain#SuggestResponse": { @@ -1362,7 +1388,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a Suggest request.

" + "smithy.api#documentation": "

Contains the response to a Suggest request.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearchdomain#SuggestStatus": { @@ -1471,7 +1498,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the UploadDocuments request.

" + "smithy.api#documentation": "

Container for the parameters to the UploadDocuments request.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearchdomain#UploadDocumentsResponse": { @@ -1505,7 +1533,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to an UploadDocuments request.

" + "smithy.api#documentation": "

Contains the response to an UploadDocuments request.

", + "smithy.api#output": {} } } } diff --git a/codegen/sdk-codegen/aws-models/cloudsearch.json b/codegen/sdk-codegen/aws-models/cloudsearch.json index 3c0fa7e3d14..fbc20a695da 100644 --- a/codegen/sdk-codegen/aws-models/cloudsearch.json +++ b/codegen/sdk-codegen/aws-models/cloudsearch.json @@ -189,52 +189,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -242,13 +246,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -258,224 +271,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cloudsearch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://cloudsearch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cloudsearch-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://cloudsearch-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cloudsearch.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://cloudsearch.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://cloudsearch.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://cloudsearch.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -490,8 +454,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -503,8 +467,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -516,8 +480,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -529,8 +493,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -542,8 +506,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -555,8 +519,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -568,8 +532,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -581,8 +545,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -594,8 +558,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -607,8 +571,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -620,8 +584,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -633,8 +597,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -646,8 +610,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -659,8 +623,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -672,8 +636,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -685,8 +649,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -698,8 +662,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -711,8 +675,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -724,8 +688,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -737,8 +701,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -750,8 +714,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -763,8 +738,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -776,8 +762,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -789,8 +786,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -802,8 +810,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -815,8 +823,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -828,8 +836,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -840,8 +848,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -852,10 +860,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -895,235 +909,311 @@ } }, "com.amazonaws.cloudsearch#AlgorithmicStemming": { - "type": "string", + "type": "enum", + "members": { + "none": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "minimal": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "minimal" + } + }, + "light": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "light" + } + }, + "full": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "full" + } + } + } + }, + "com.amazonaws.cloudsearch#AnalysisOptions": { + "type": "structure", + "members": { + "Synonyms": { + "target": "com.amazonaws.cloudsearch#String", + "traits": { + "smithy.api#documentation": "

A JSON object that defines synonym groups and aliases. A synonym group is an array of arrays, where each sub-array is a group of terms where each term in the group is considered a synonym of every other term in the group. The aliases value is an object that contains a collection of string:value pairs where the string specifies a term and the array of values specifies each of the aliases for that term. An alias is considered a synonym of the specified term, but the term is not considered a synonym of the alias. For more information about specifying synonyms, see Synonyms in the Amazon CloudSearch Developer Guide.

" + } + }, + "Stopwords": { + "target": "com.amazonaws.cloudsearch#String", + "traits": { + "smithy.api#documentation": "

A JSON array of terms to ignore during indexing and searching. For example, [\"a\", \"an\", \"the\", \"of\"]. The stopwords dictionary must explicitly list each word you want to ignore. Wildcards and regular expressions are not supported.

" + } + }, + "StemmingDictionary": { + "target": "com.amazonaws.cloudsearch#String", + "traits": { + "smithy.api#documentation": "

A JSON object that contains a collection of string:value pairs that each map a term to its stem. For example, {\"term1\": \"stem1\", \"term2\": \"stem2\", \"term3\": \"stem3\"}. The stemming dictionary is applied in addition to any algorithmic stemming. This enables you to override the results of the algorithmic stemming to correct specific cases of overstemming or understemming. The maximum size of a stemming dictionary is 500 KB.

" + } + }, + "JapaneseTokenizationDictionary": { + "target": "com.amazonaws.cloudsearch#String", + "traits": { + "smithy.api#documentation": "

A JSON array that contains a collection of terms, tokens, readings and part of speech for Japanese Tokenizaiton. The Japanese tokenization dictionary enables you to override the default tokenization for selected terms. This is only valid for Japanese language fields.

" + } + }, + "AlgorithmicStemming": { + "target": "com.amazonaws.cloudsearch#AlgorithmicStemming", + "traits": { + "smithy.api#documentation": "

The level of algorithmic stemming to perform: none, minimal, light, or full. The available levels vary depending on the language. For more information, see Language Specific Text Processing Settings in the Amazon CloudSearch Developer Guide

" + } + } + }, "traits": { - "smithy.api#enum": [ - { - "value": "none", - "name": "none" - }, - { - "value": "minimal", - "name": "minimal" - }, - { - "value": "light", - "name": "light" - }, - { - "value": "full", - "name": "full" + "smithy.api#documentation": "

Synonyms, stopwords, and stemming options for an analysis scheme. Includes tokenization dictionary for Japanese.

" + } + }, + "com.amazonaws.cloudsearch#AnalysisScheme": { + "type": "structure", + "members": { + "AnalysisSchemeName": { + "target": "com.amazonaws.cloudsearch#StandardName", + "traits": { + "smithy.api#required": {} + } + }, + "AnalysisSchemeLanguage": { + "target": "com.amazonaws.cloudsearch#AnalysisSchemeLanguage", + "traits": { + "smithy.api#required": {} + } + }, + "AnalysisOptions": { + "target": "com.amazonaws.cloudsearch#AnalysisOptions" + } + }, + "traits": { + "smithy.api#documentation": "

Configuration information for an analysis scheme. Each analysis scheme has a unique name and specifies the language of the text to be processed. The following options can be configured for an analysis scheme: Synonyms, Stopwords, StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming.

" + } + }, + "com.amazonaws.cloudsearch#AnalysisSchemeLanguage": { + "type": "enum", + "members": { + "ar": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ar" + } + }, + "bg": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bg" + } + }, + "ca": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ca" + } + }, + "cs": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cs" + } + }, + "da": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "da" + } + }, + "de": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "de" + } + }, + "el": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "el" + } + }, + "en": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en" + } + }, + "es": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es" + } + }, + "eu": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "eu" + } + }, + "fa": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fa" + } + }, + "fi": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fi" + } + }, + "fr": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fr" + } + }, + "ga": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ga" + } + }, + "gl": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gl" + } + }, + "he": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "he" + } + }, + "hi": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hi" + } + }, + "hu": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hu" + } + }, + "hy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hy" + } + }, + "id": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "id" + } + }, + "it": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "it" + } + }, + "ja": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ja" + } + }, + "ko": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ko" + } + }, + "lv": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lv" } - ] - } - }, - "com.amazonaws.cloudsearch#AnalysisOptions": { - "type": "structure", - "members": { - "Synonyms": { - "target": "com.amazonaws.cloudsearch#String", + }, + "mul": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A JSON object that defines synonym groups and aliases. A synonym group is an array of arrays, where each sub-array is a group of terms where each term in the group is considered a synonym of every other term in the group. The aliases value is an object that contains a collection of string:value pairs where the string specifies a term and the array of values specifies each of the aliases for that term. An alias is considered a synonym of the specified term, but the term is not considered a synonym of the alias. For more information about specifying synonyms, see Synonyms in the Amazon CloudSearch Developer Guide.

" + "smithy.api#enumValue": "mul" } }, - "Stopwords": { - "target": "com.amazonaws.cloudsearch#String", + "nl": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A JSON array of terms to ignore during indexing and searching. For example, [\"a\", \"an\", \"the\", \"of\"]. The stopwords dictionary must explicitly list each word you want to ignore. Wildcards and regular expressions are not supported.

" + "smithy.api#enumValue": "nl" } }, - "StemmingDictionary": { - "target": "com.amazonaws.cloudsearch#String", + "no": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A JSON object that contains a collection of string:value pairs that each map a term to its stem. For example, {\"term1\": \"stem1\", \"term2\": \"stem2\", \"term3\": \"stem3\"}. The stemming dictionary is applied in addition to any algorithmic stemming. This enables you to override the results of the algorithmic stemming to correct specific cases of overstemming or understemming. The maximum size of a stemming dictionary is 500 KB.

" + "smithy.api#enumValue": "no" } }, - "JapaneseTokenizationDictionary": { - "target": "com.amazonaws.cloudsearch#String", + "pt": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A JSON array that contains a collection of terms, tokens, readings and part of speech for Japanese Tokenizaiton. The Japanese tokenization dictionary enables you to override the default tokenization for selected terms. This is only valid for Japanese language fields.

" + "smithy.api#enumValue": "pt" } }, - "AlgorithmicStemming": { - "target": "com.amazonaws.cloudsearch#AlgorithmicStemming", + "ro": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The level of algorithmic stemming to perform: none, minimal, light, or full. The available levels vary depending on the language. For more information, see Language Specific Text Processing Settings in the Amazon CloudSearch Developer Guide

" + "smithy.api#enumValue": "ro" } - } - }, - "traits": { - "smithy.api#documentation": "

Synonyms, stopwords, and stemming options for an analysis scheme. Includes tokenization dictionary for Japanese.

" - } - }, - "com.amazonaws.cloudsearch#AnalysisScheme": { - "type": "structure", - "members": { - "AnalysisSchemeName": { - "target": "com.amazonaws.cloudsearch#StandardName", + }, + "ru": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#required": {} + "smithy.api#enumValue": "ru" } }, - "AnalysisSchemeLanguage": { - "target": "com.amazonaws.cloudsearch#AnalysisSchemeLanguage", + "sv": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#required": {} + "smithy.api#enumValue": "sv" } }, - "AnalysisOptions": { - "target": "com.amazonaws.cloudsearch#AnalysisOptions" + "th": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "th" + } + }, + "tr": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tr" + } + }, + "zh_Hans": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zh-Hans" + } + }, + "zh_Hant": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "zh-Hant" + } } }, "traits": { - "smithy.api#documentation": "

Configuration information for an analysis scheme. Each analysis scheme has a unique name and specifies the language of the text to be processed. The following options can be configured for an analysis scheme: Synonyms, Stopwords, StemmingDictionary, JapaneseTokenizationDictionary and AlgorithmicStemming.

" - } - }, - "com.amazonaws.cloudsearch#AnalysisSchemeLanguage": { - "type": "string", - "traits": { - "smithy.api#documentation": "

An IETF RFC 4646 language code or mul for multiple languages.

", - "smithy.api#enum": [ - { - "value": "ar", - "name": "ar" - }, - { - "value": "bg", - "name": "bg" - }, - { - "value": "ca", - "name": "ca" - }, - { - "value": "cs", - "name": "cs" - }, - { - "value": "da", - "name": "da" - }, - { - "value": "de", - "name": "de" - }, - { - "value": "el", - "name": "el" - }, - { - "value": "en", - "name": "en" - }, - { - "value": "es", - "name": "es" - }, - { - "value": "eu", - "name": "eu" - }, - { - "value": "fa", - "name": "fa" - }, - { - "value": "fi", - "name": "fi" - }, - { - "value": "fr", - "name": "fr" - }, - { - "value": "ga", - "name": "ga" - }, - { - "value": "gl", - "name": "gl" - }, - { - "value": "he", - "name": "he" - }, - { - "value": "hi", - "name": "hi" - }, - { - "value": "hu", - "name": "hu" - }, - { - "value": "hy", - "name": "hy" - }, - { - "value": "id", - "name": "id" - }, - { - "value": "it", - "name": "it" - }, - { - "value": "ja", - "name": "ja" - }, - { - "value": "ko", - "name": "ko" - }, - { - "value": "lv", - "name": "lv" - }, - { - "value": "mul", - "name": "mul" - }, - { - "value": "nl", - "name": "nl" - }, - { - "value": "no", - "name": "no" - }, - { - "value": "pt", - "name": "pt" - }, - { - "value": "ro", - "name": "ro" - }, - { - "value": "ru", - "name": "ru" - }, - { - "value": "sv", - "name": "sv" - }, - { - "value": "th", - "name": "th" - }, - { - "value": "tr", - "name": "tr" - }, - { - "value": "zh-Hans", - "name": "zh_Hans" - }, - { - "value": "zh-Hant", - "name": "zh_Hant" - } - ] + "smithy.api#documentation": "

An IETF RFC 4646 language code or mul for multiple languages.

" } }, "com.amazonaws.cloudsearch#AnalysisSchemeStatus": { @@ -1232,7 +1322,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the BuildSuggester operation. Specifies the name of the domain you want to update.

" + "smithy.api#documentation": "

Container for the parameters to the BuildSuggester operation. Specifies the name of the domain you want to update.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#BuildSuggestersResponse": { @@ -1243,7 +1334,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a BuildSuggester request. Contains a list of the fields used for suggestions.

" + "smithy.api#documentation": "

The result of a BuildSuggester request. Contains a list of the fields used for suggestions.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#CreateDomain": { @@ -1287,7 +1379,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the CreateDomain operation. Specifies a name for the new search domain.

" + "smithy.api#documentation": "

Container for the parameters to the CreateDomain operation. Specifies a name for the new search domain.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#CreateDomainResponse": { @@ -1298,7 +1391,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a CreateDomainRequest. Contains the status of a newly created domain.

" + "smithy.api#documentation": "

The result of a CreateDomainRequest. Contains the status of a newly created domain.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DateArrayOptions": { @@ -1429,7 +1523,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DefineAnalysisScheme operation. Specifies the name of the domain you want to update and the analysis scheme configuration.

" + "smithy.api#documentation": "

Container for the parameters to the DefineAnalysisScheme operation. Specifies the name of the domain you want to update and the analysis scheme configuration.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DefineAnalysisSchemeResponse": { @@ -1443,7 +1538,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DefineAnalysisScheme request. Contains the status of the newly-configured analysis scheme.

" + "smithy.api#documentation": "

The result of a DefineAnalysisScheme request. Contains the status of the newly-configured analysis scheme.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DefineExpression": { @@ -1495,7 +1591,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DefineExpression operation. Specifies the name of the domain you want to update and the expression you want to configure.

" + "smithy.api#documentation": "

Container for the parameters to the DefineExpression operation. Specifies the name of the domain you want to update and the expression you want to configure.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DefineExpressionResponse": { @@ -1509,7 +1606,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DefineExpression request. Contains the status of the newly-configured expression.

" + "smithy.api#documentation": "

The result of a DefineExpression request. Contains the status of the newly-configured expression.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DefineIndexField": { @@ -1562,7 +1660,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DefineIndexField operation. Specifies the name of the domain you want to update and the index field configuration.

" + "smithy.api#documentation": "

Container for the parameters to the DefineIndexField operation. Specifies the name of the domain you want to update and the index field configuration.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DefineIndexFieldResponse": { @@ -1576,7 +1675,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DefineIndexField request. Contains the status of the newly-configured index field.

" + "smithy.api#documentation": "

The result of a DefineIndexField request. Contains the status of the newly-configured index field.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DefineSuggester": { @@ -1628,7 +1728,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DefineSuggester operation. Specifies the name of the domain you want to update and the suggester configuration.

" + "smithy.api#documentation": "

Container for the parameters to the DefineSuggester operation. Specifies the name of the domain you want to update and the suggester configuration.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DefineSuggesterResponse": { @@ -1642,7 +1743,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DefineSuggester request. Contains the status of the newly-configured suggester.

" + "smithy.api#documentation": "

The result of a DefineSuggester request. Contains the status of the newly-configured suggester.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DeleteAnalysisScheme": { @@ -1692,7 +1794,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DeleteAnalysisScheme operation. Specifies the name of the domain you want to update and the analysis scheme you want to delete.

" + "smithy.api#documentation": "

Container for the parameters to the DeleteAnalysisScheme operation. Specifies the name of the domain you want to update and the analysis scheme you want to delete.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DeleteAnalysisSchemeResponse": { @@ -1707,7 +1810,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DeleteAnalysisScheme request. Contains the status of the deleted analysis scheme.

" + "smithy.api#documentation": "

The result of a DeleteAnalysisScheme request. Contains the status of the deleted analysis scheme.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DeleteDomain": { @@ -1742,7 +1846,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DeleteDomain operation. Specifies the name of the domain you want to delete.

" + "smithy.api#documentation": "

Container for the parameters to the DeleteDomain operation. Specifies the name of the domain you want to delete.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DeleteDomainResponse": { @@ -1753,7 +1858,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DeleteDomain request. Contains the status of a newly deleted domain, or no status if the domain has already been completely deleted.

" + "smithy.api#documentation": "

The result of a DeleteDomain request. Contains the status of a newly deleted domain, or no status if the domain has already been completely deleted.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DeleteExpression": { @@ -1803,7 +1909,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DeleteExpression operation. Specifies the name of the domain you want to update and the name of the expression you want to delete.

" + "smithy.api#documentation": "

Container for the parameters to the DeleteExpression operation. Specifies the name of the domain you want to update and the name of the expression you want to delete.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DeleteExpressionResponse": { @@ -1818,7 +1925,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DeleteExpression request. Specifies the expression being deleted.

" + "smithy.api#documentation": "

The result of a DeleteExpression request. Specifies the expression being deleted.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DeleteIndexField": { @@ -1868,7 +1976,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DeleteIndexField operation. Specifies the name of the domain you want to update and the name of the index field you want to delete.

" + "smithy.api#documentation": "

Container for the parameters to the DeleteIndexField operation. Specifies the name of the domain you want to update and the name of the index field you want to delete.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DeleteIndexFieldResponse": { @@ -1883,7 +1992,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DeleteIndexField request.

" + "smithy.api#documentation": "

The result of a DeleteIndexField request.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DeleteSuggester": { @@ -1933,7 +2043,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DeleteSuggester operation. Specifies the name of the domain you want to update and name of the suggester you want to delete.

" + "smithy.api#documentation": "

Container for the parameters to the DeleteSuggester operation. Specifies the name of the domain you want to update and name of the suggester you want to delete.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DeleteSuggesterResponse": { @@ -1948,7 +2059,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DeleteSuggester request. Contains the status of the deleted suggester.

" + "smithy.api#documentation": "

The result of a DeleteSuggester request. Contains the status of the deleted suggester.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DescribeAnalysisSchemes": { @@ -1998,7 +2110,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DescribeAnalysisSchemes operation. Specifies the name of the domain you want to describe. To limit the response to particular analysis schemes, specify the names of the analysis schemes you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

" + "smithy.api#documentation": "

Container for the parameters to the DescribeAnalysisSchemes operation. Specifies the name of the domain you want to describe. To limit the response to particular analysis schemes, specify the names of the analysis schemes you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DescribeAnalysisSchemesResponse": { @@ -2013,7 +2126,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeAnalysisSchemes request. Contains the analysis schemes configured for the domain specified in the request.

" + "smithy.api#documentation": "

The result of a DescribeAnalysisSchemes request. Contains the analysis schemes configured for the domain specified in the request.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DescribeAvailabilityOptions": { @@ -2066,7 +2180,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DescribeAvailabilityOptions operation. Specifies the name of the domain you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

" + "smithy.api#documentation": "

Container for the parameters to the DescribeAvailabilityOptions operation. Specifies the name of the domain you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DescribeAvailabilityOptionsResponse": { @@ -2080,7 +2195,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeAvailabilityOptions request. Indicates whether or not the Multi-AZ option is enabled for the domain specified in the request.

" + "smithy.api#documentation": "

The result of a DescribeAvailabilityOptions request. Indicates whether or not the Multi-AZ option is enabled for the domain specified in the request.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DescribeDomainEndpointOptions": { @@ -2130,7 +2246,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DescribeDomainEndpointOptions operation. Specify the name of the domain you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

" + "smithy.api#documentation": "

Container for the parameters to the DescribeDomainEndpointOptions operation. Specify the name of the domain you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DescribeDomainEndpointOptionsResponse": { @@ -2144,7 +2261,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeDomainEndpointOptions request. Contains the status and configuration of a search domain's endpoint options.

" + "smithy.api#documentation": "

The result of a DescribeDomainEndpointOptions request. Contains the status and configuration of a search domain's endpoint options.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DescribeDomains": { @@ -2178,7 +2296,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DescribeDomains operation. By default shows the status of all domains. To restrict the response to particular domains, specify the names of the domains you want to describe.

" + "smithy.api#documentation": "

Container for the parameters to the DescribeDomains operation. By default shows the status of all domains. To restrict the response to particular domains, specify the names of the domains you want to describe.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DescribeDomainsResponse": { @@ -2192,7 +2311,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeDomains request. Contains the status of the domains specified in the request or all domains owned by the account.

" + "smithy.api#documentation": "

The result of a DescribeDomains request. Contains the status of the domains specified in the request or all domains owned by the account.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DescribeExpressions": { @@ -2242,7 +2362,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DescribeDomains operation.\n Specifies the name of the domain you want to describe. To restrict the response to particular expressions, specify the names of the expressions you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

" + "smithy.api#documentation": "

Container for the parameters to the DescribeDomains operation.\n Specifies the name of the domain you want to describe. To restrict the response to particular expressions, specify the names of the expressions you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DescribeExpressionsResponse": { @@ -2257,7 +2378,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeExpressions request. Contains the expressions configured for the domain specified in the request.

" + "smithy.api#documentation": "

The result of a DescribeExpressions request. Contains the expressions configured for the domain specified in the request.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DescribeIndexFields": { @@ -2307,7 +2429,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DescribeIndexFields operation. Specifies the name of the domain you want to describe. To restrict the response to particular index fields, specify the names of the index fields you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

" + "smithy.api#documentation": "

Container for the parameters to the DescribeIndexFields operation. Specifies the name of the domain you want to describe. To restrict the response to particular index fields, specify the names of the index fields you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DescribeIndexFieldsResponse": { @@ -2322,7 +2445,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeIndexFields request. Contains the index fields configured for the domain specified in the request.

" + "smithy.api#documentation": "

The result of a DescribeIndexFields request. Contains the index fields configured for the domain specified in the request.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DescribeScalingParameters": { @@ -2359,7 +2483,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DescribeScalingParameters operation. Specifies the name of the domain you want to describe.

" + "smithy.api#documentation": "

Container for the parameters to the DescribeScalingParameters operation. Specifies the name of the domain you want to describe.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DescribeScalingParametersResponse": { @@ -2373,7 +2498,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeScalingParameters request. Contains the scaling parameters configured for the domain specified in the request.

" + "smithy.api#documentation": "

The result of a DescribeScalingParameters request. Contains the scaling parameters configured for the domain specified in the request.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DescribeServiceAccessPolicies": { @@ -2417,7 +2543,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DescribeServiceAccessPolicies operation. Specifies the name of the domain you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

" + "smithy.api#documentation": "

Container for the parameters to the DescribeServiceAccessPolicies operation. Specifies the name of the domain you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DescribeServiceAccessPoliciesResponse": { @@ -2432,7 +2559,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeServiceAccessPolicies request.

" + "smithy.api#documentation": "

The result of a DescribeServiceAccessPolicies request.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DescribeSuggesters": { @@ -2482,7 +2610,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the DescribeSuggester operation. Specifies the name of the domain you want to describe. To restrict the response to particular suggesters, specify the names of the suggesters you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

" + "smithy.api#documentation": "

Container for the parameters to the DescribeSuggester operation. Specifies the name of the domain you want to describe. To restrict the response to particular suggesters, specify the names of the suggesters you want to describe. To show the active configuration and exclude any pending changes, set the Deployed option to true.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#DescribeSuggestersResponse": { @@ -2497,7 +2626,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeSuggesters request.

" + "smithy.api#documentation": "

The result of a DescribeSuggesters request.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#DisabledOperationException": { @@ -2969,7 +3099,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the IndexDocuments operation. Specifies the name of the domain you want to re-index.

" + "smithy.api#documentation": "

Container for the parameters to the IndexDocuments operation. Specifies the name of the domain you want to re-index.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#IndexDocumentsResponse": { @@ -2983,7 +3114,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of an IndexDocuments request. Contains the status of the indexing operation, including the fields being indexed.

" + "smithy.api#documentation": "

The result of an IndexDocuments request. Contains the status of the indexing operation, including the fields being indexed.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#IndexField": { @@ -3070,55 +3202,77 @@ } }, "com.amazonaws.cloudsearch#IndexFieldType": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The type of field. The valid options for a field depend on the field type. For more information about the supported field types, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.

", - "smithy.api#enum": [ - { - "value": "int", - "name": "int" - }, - { - "value": "double", - "name": "double" - }, - { - "value": "literal", - "name": "literal" - }, - { - "value": "text", - "name": "text" - }, - { - "value": "date", - "name": "date" - }, - { - "value": "latlon", - "name": "latlon" - }, - { - "value": "int-array", - "name": "int_array" - }, - { - "value": "double-array", - "name": "double_array" - }, - { - "value": "literal-array", - "name": "literal_array" - }, - { - "value": "text-array", - "name": "text_array" - }, - { - "value": "date-array", - "name": "date_array" + "type": "enum", + "members": { + "int": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "int" + } + }, + "double": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "double" + } + }, + "literal": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "literal" + } + }, + "text": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text" + } + }, + "date": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date" + } + }, + "latlon": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latlon" + } + }, + "int_array": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "int-array" + } + }, + "double_array": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "double-array" } - ] + }, + "literal_array": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "literal-array" + } + }, + "text_array": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "text-array" + } + }, + "date_array": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "date-array" + } + } + }, + "traits": { + "smithy.api#documentation": "

The type of field. The valid options for a field depend on the field type. For more information about the supported field types, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.

" } }, "com.amazonaws.cloudsearch#InstanceCount": { @@ -3360,7 +3514,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a ListDomainNames request. Contains a list of the domains owned by an account.

" + "smithy.api#documentation": "

The result of a ListDomainNames request. Contains a list of the domains owned by an account.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#LiteralArrayOptions": { @@ -3470,27 +3625,35 @@ } }, "com.amazonaws.cloudsearch#OptionState": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The state of processing a change to an option. One of:

\n ", - "smithy.api#enum": [ - { - "value": "RequiresIndexDocuments", - "name": "RequiresIndexDocuments" - }, - { - "value": "Processing", - "name": "Processing" - }, - { - "value": "Active", - "name": "Active" - }, - { - "value": "FailedToValidate", - "name": "FailedToValidate" + "type": "enum", + "members": { + "RequiresIndexDocuments": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RequiresIndexDocuments" + } + }, + "Processing": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Processing" } - ] + }, + "Active": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Active" + } + }, + "FailedToValidate": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FailedToValidate" + } + } + }, + "traits": { + "smithy.api#documentation": "

The state of processing a change to an option. One of:

\n " } }, "com.amazonaws.cloudsearch#OptionStatus": { @@ -3546,79 +3709,113 @@ } }, "com.amazonaws.cloudsearch#PartitionInstanceType": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The instance type (such as search.m1.small) on which an index partition is hosted.

", - "smithy.api#enum": [ - { - "value": "search.m1.small", - "name": "search_m1_small" - }, - { - "value": "search.m1.large", - "name": "search_m1_large" - }, - { - "value": "search.m2.xlarge", - "name": "search_m2_xlarge" - }, - { - "value": "search.m2.2xlarge", - "name": "search_m2_2xlarge" - }, - { - "value": "search.m3.medium", - "name": "search_m3_medium" - }, - { - "value": "search.m3.large", - "name": "search_m3_large" - }, - { - "value": "search.m3.xlarge", - "name": "search_m3_xlarge" - }, - { - "value": "search.m3.2xlarge", - "name": "search_m3_2xlarge" - }, - { - "value": "search.small", - "name": "search_small" - }, - { - "value": "search.medium", - "name": "search_medium" - }, - { - "value": "search.large", - "name": "search_large" - }, - { - "value": "search.xlarge", - "name": "search_xlarge" - }, - { - "value": "search.2xlarge", - "name": "search_2xlarge" - }, - { - "value": "search.previousgeneration.small", - "name": "search_previousgeneration_small" - }, - { - "value": "search.previousgeneration.large", - "name": "search_previousgeneration_large" - }, - { - "value": "search.previousgeneration.xlarge", - "name": "search_previousgeneration_xlarge" - }, - { - "value": "search.previousgeneration.2xlarge", - "name": "search_previousgeneration_2xlarge" + "type": "enum", + "members": { + "search_m1_small": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.m1.small" + } + }, + "search_m1_large": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.m1.large" + } + }, + "search_m2_xlarge": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.m2.xlarge" + } + }, + "search_m2_2xlarge": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.m2.2xlarge" + } + }, + "search_m3_medium": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.m3.medium" + } + }, + "search_m3_large": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.m3.large" + } + }, + "search_m3_xlarge": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.m3.xlarge" + } + }, + "search_m3_2xlarge": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.m3.2xlarge" + } + }, + "search_small": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.small" + } + }, + "search_medium": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.medium" + } + }, + "search_large": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.large" + } + }, + "search_xlarge": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.xlarge" + } + }, + "search_2xlarge": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.2xlarge" + } + }, + "search_previousgeneration_small": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.previousgeneration.small" + } + }, + "search_previousgeneration_large": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.previousgeneration.large" + } + }, + "search_previousgeneration_xlarge": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.previousgeneration.xlarge" + } + }, + "search_previousgeneration_2xlarge": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "search.previousgeneration.2xlarge" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

The instance type (such as search.m1.small) on which an index partition is hosted.

" } }, "com.amazonaws.cloudsearch#PolicyDocument": { @@ -3779,22 +3976,26 @@ } }, "com.amazonaws.cloudsearch#SuggesterFuzzyMatching": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "none", - "name": "none" - }, - { - "value": "low", - "name": "low" - }, - { - "value": "high", - "name": "high" + "type": "enum", + "members": { + "none": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "low": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "low" + } + }, + "high": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "high" } - ] + } } }, "com.amazonaws.cloudsearch#SuggesterStatus": { @@ -3827,19 +4028,23 @@ } }, "com.amazonaws.cloudsearch#TLSSecurityPolicy": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The minimum required TLS version.

", - "smithy.api#enum": [ - { - "value": "Policy-Min-TLS-1-0-2019-07", - "name": "POLICY_MIN_TLS_1_0_2019_07" - }, - { - "value": "Policy-Min-TLS-1-2-2019-07", - "name": "POLICY_MIN_TLS_1_2_2019_07" + "type": "enum", + "members": { + "POLICY_MIN_TLS_1_0_2019_07": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Policy-Min-TLS-1-0-2019-07" + } + }, + "POLICY_MIN_TLS_1_2_2019_07": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Policy-Min-TLS-1-2-2019-07" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

The minimum required TLS version.

" } }, "com.amazonaws.cloudsearch#TextArrayOptions": { @@ -3983,7 +4188,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the UpdateAvailabilityOptions operation. Specifies the name of the domain you want to update and the Multi-AZ availability option.

" + "smithy.api#documentation": "

Container for the parameters to the UpdateAvailabilityOptions operation. Specifies the name of the domain you want to update and the Multi-AZ availability option.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#UpdateAvailabilityOptionsResponse": { @@ -3997,7 +4203,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a UpdateAvailabilityOptions request. Contains the status of the domain's availability options.

" + "smithy.api#documentation": "

The result of a UpdateAvailabilityOptions request. Contains the status of the domain's availability options.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#UpdateDomainEndpointOptions": { @@ -4054,7 +4261,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the UpdateDomainEndpointOptions operation. Specifies the name of the domain you want to update and the domain endpoint options.

" + "smithy.api#documentation": "

Container for the parameters to the UpdateDomainEndpointOptions operation. Specifies the name of the domain you want to update and the domain endpoint options.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#UpdateDomainEndpointOptionsResponse": { @@ -4068,7 +4276,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a UpdateDomainEndpointOptions request. Contains the configuration and status of the domain's endpoint options.

" + "smithy.api#documentation": "

The result of a UpdateDomainEndpointOptions request. Contains the configuration and status of the domain's endpoint options.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#UpdateScalingParameters": { @@ -4120,7 +4329,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the UpdateScalingParameters operation. Specifies the name of the domain you want to update and the scaling parameters you want to configure.

" + "smithy.api#documentation": "

Container for the parameters to the UpdateScalingParameters operation. Specifies the name of the domain you want to update and the scaling parameters you want to configure.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#UpdateScalingParametersResponse": { @@ -4134,7 +4344,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a UpdateScalingParameters request. Contains the status of the newly-configured scaling parameters.

" + "smithy.api#documentation": "

The result of a UpdateScalingParameters request. Contains the status of the newly-configured scaling parameters.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#UpdateServiceAccessPolicies": { @@ -4187,7 +4398,8 @@ } }, "traits": { - "smithy.api#documentation": "

Container for the parameters to the UpdateServiceAccessPolicies operation. Specifies the name of the domain you want to update and the access rules you want to configure.

" + "smithy.api#documentation": "

Container for the parameters to the UpdateServiceAccessPolicies operation. Specifies the name of the domain you want to update and the access rules you want to configure.

", + "smithy.api#input": {} } }, "com.amazonaws.cloudsearch#UpdateServiceAccessPoliciesResponse": { @@ -4202,7 +4414,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of an UpdateServiceAccessPolicies request. Contains the new access policies.

" + "smithy.api#documentation": "

The result of an UpdateServiceAccessPolicies request. Contains the new access policies.

", + "smithy.api#output": {} } }, "com.amazonaws.cloudsearch#UpdateTimestamp": { diff --git a/codegen/sdk-codegen/aws-models/cloudtrail-data.json b/codegen/sdk-codegen/aws-models/cloudtrail-data.json index 2229a1b676f..bde1305eaf0 100644 --- a/codegen/sdk-codegen/aws-models/cloudtrail-data.json +++ b/codegen/sdk-codegen/aws-models/cloudtrail-data.json @@ -491,55 +491,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cloudtrail-data-fips.us-gov-east-1.api.aws" + "url": "https://cloudtrail-data-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cloudtrail-data-fips.us-gov-east-1.amazonaws.com" + "url": "https://cloudtrail-data-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cloudtrail-data.us-gov-east-1.api.aws" + "url": "https://cloudtrail-data.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cloudtrail-data.us-gov-east-1.amazonaws.com" + "url": "https://cloudtrail-data.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -550,9 +550,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -563,9 +563,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -576,9 +576,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -589,109 +589,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://cloudtrail-data-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cloudtrail-data-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://cloudtrail-data-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://cloudtrail-data.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cloudtrail-data.us-iso-east-1.c2s.ic.gov" + "url": "https://cloudtrail-data.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://cloudtrail-data-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cloudtrail-data-fips.us-east-1.amazonaws.com" + "url": "https://cloudtrail-data-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://cloudtrail-data.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cloudtrail-data.us-east-1.amazonaws.com" + "url": "https://cloudtrail-data.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -700,9 +700,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -713,9 +713,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -724,9 +724,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -737,22 +737,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -762,9 +775,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -774,11 +787,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -983,4 +1002,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/cloudwatch-events.json b/codegen/sdk-codegen/aws-models/cloudwatch-events.json index 1ec64ecb647..e895f22720d 100644 --- a/codegen/sdk-codegen/aws-models/cloudwatch-events.json +++ b/codegen/sdk-codegen/aws-models/cloudwatch-events.json @@ -193,6 +193,7 @@ "arnNamespace": "events", "cloudFormationName": "Events", "cloudTrailEventSource": "cloudwatchevents.amazonaws.com", + "docId": "events-2015-10-07", "endpointPrefix": "events" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/cloudwatch-logs.json b/codegen/sdk-codegen/aws-models/cloudwatch-logs.json index b0a2424dc00..a3f0e0d634f 100644 --- a/codegen/sdk-codegen/aws-models/cloudwatch-logs.json +++ b/codegen/sdk-codegen/aws-models/cloudwatch-logs.json @@ -3292,6 +3292,7 @@ "arnNamespace": "logs", "cloudFormationName": "Logs", "cloudTrailEventSource": "cloudwatchlogs.amazonaws.com", + "docId": "logs-2014-03-28", "endpointPrefix": "logs" }, "aws.auth#sigv4": { @@ -3363,52 +3364,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3416,13 +3421,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3432,92 +3446,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://logs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://logs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -3526,168 +3531,128 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "Region" + }, + "us-gov-east-1" ] } ], - "type": "tree", - "rules": [ + "endpoint": { + "url": "https://logs.us-gov-east-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://logs.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + "fn": "stringEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://logs.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "Region" }, - { - "conditions": [], - "endpoint": { - "url": "https://logs-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "us-gov-west-1" ] } - ] + ], + "endpoint": { + "url": "https://logs.us-gov-west-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://logs-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://logs.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://logs.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://logs.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://logs.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/cloudwatch.json b/codegen/sdk-codegen/aws-models/cloudwatch.json index d5b68c7c6c5..9ab9f01acd3 100644 --- a/codegen/sdk-codegen/aws-models/cloudwatch.json +++ b/codegen/sdk-codegen/aws-models/cloudwatch.json @@ -2562,6 +2562,7 @@ "arnNamespace": "monitoring", "cloudFormationName": "CloudWatch", "cloudTrailEventSource": "cloudwatch.amazonaws.com", + "docId": "monitoring-2010-08-01", "endpointPrefix": "monitoring" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/codeartifact.json b/codegen/sdk-codegen/aws-models/codeartifact.json index b403c9f0328..14fa9e7e1f2 100644 --- a/codegen/sdk-codegen/aws-models/codeartifact.json +++ b/codegen/sdk-codegen/aws-models/codeartifact.json @@ -455,52 +455,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -508,13 +512,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -524,224 +537,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codeartifact-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://codeartifact-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codeartifact-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://codeartifact-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codeartifact.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://codeartifact.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://codeartifact.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codeartifact.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/codebuild.json b/codegen/sdk-codegen/aws-models/codebuild.json index 3066f5ac313..6379ee4e2a9 100644 --- a/codegen/sdk-codegen/aws-models/codebuild.json +++ b/codegen/sdk-codegen/aws-models/codebuild.json @@ -42,71 +42,83 @@ } }, "com.amazonaws.codebuild#ArtifactNamespace": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "BUILD_ID", - "name": "BUILD_ID" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + }, + "BUILD_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_ID" } - ] + } } }, "com.amazonaws.codebuild#ArtifactPackaging": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "ZIP", - "name": "ZIP" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + }, + "ZIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZIP" } - ] + } } }, "com.amazonaws.codebuild#ArtifactsType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CODEPIPELINE", - "name": "CODEPIPELINE" - }, - { - "value": "S3", - "name": "S3" - }, - { - "value": "NO_ARTIFACTS", - "name": "NO_ARTIFACTS" + "type": "enum", + "members": { + "CODEPIPELINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CODEPIPELINE" } - ] + }, + "S3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3" + } + }, + "NO_ARTIFACTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NO_ARTIFACTS" + } + } } }, "com.amazonaws.codebuild#AuthType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "OAUTH", - "name": "OAUTH" - }, - { - "value": "BASIC_AUTH", - "name": "BASIC_AUTH" - }, - { - "value": "PERSONAL_ACCESS_TOKEN", - "name": "PERSONAL_ACCESS_TOKEN" + "type": "enum", + "members": { + "OAUTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OAUTH" + } + }, + "BASIC_AUTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BASIC_AUTH" } - ] + }, + "PERSONAL_ACCESS_TOKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PERSONAL_ACCESS_TOKEN" + } + } } }, "com.amazonaws.codebuild#BatchDeleteBuilds": { @@ -136,6 +148,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#BatchDeleteBuildsOutput": { @@ -153,6 +168,9 @@ "smithy.api#documentation": "

Information about any builds that could not be successfully deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#BatchGetBuildBatches": { @@ -182,6 +200,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#BatchGetBuildBatchesOutput": { @@ -199,6 +220,9 @@ "smithy.api#documentation": "

An array that contains the identifiers of any batch builds that are not found.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#BatchGetBuilds": { @@ -228,6 +252,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#BatchGetBuildsOutput": { @@ -245,6 +272,9 @@ "smithy.api#documentation": "

The IDs of builds for which information could not be found.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#BatchGetProjects": { @@ -274,6 +304,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#BatchGetProjectsOutput": { @@ -291,6 +324,9 @@ "smithy.api#documentation": "

The names of build projects for which information could not be found.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#BatchGetReportGroups": { @@ -320,6 +356,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#BatchGetReportGroupsOutput": { @@ -337,6 +376,9 @@ "smithy.api#documentation": "

\n An array of ARNs passed to BatchGetReportGroups that are not associated with a ReportGroup.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#BatchGetReports": { @@ -366,6 +408,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#BatchGetReportsOutput": { @@ -383,21 +428,26 @@ "smithy.api#documentation": "

\n An array of ARNs passed to BatchGetReportGroups that are not associated with a Report.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#BatchReportModeType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "REPORT_INDIVIDUAL_BUILDS", - "name": "REPORT_INDIVIDUAL_BUILDS" - }, - { - "value": "REPORT_AGGREGATED_BATCH", - "name": "REPORT_AGGREGATED_BATCH" + "type": "enum", + "members": { + "REPORT_INDIVIDUAL_BUILDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPORT_INDIVIDUAL_BUILDS" + } + }, + "REPORT_AGGREGATED_BATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPORT_AGGREGATED_BATCH" } - ] + } } }, "com.amazonaws.codebuild#BatchRestrictions": { @@ -427,23 +477,29 @@ } }, "com.amazonaws.codebuild#BucketOwnerAccess": { - "type": "string", - "traits": { - "smithy.api#documentation": "

Specifies the bucket owner's access for objects that another account uploads to their\n Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has\n access to these objects. This property allows you to give the bucket owner access to\n these objects.

\n \n

To use this property, your CodeBuild service role must have the\n s3:PutBucketAcl permission. This permission allows CodeBuild to modify\n the access control list for the bucket.

\n
\n

This property can be one of the following values:

\n
\n
NONE
\n
\n

The bucket owner does not have access to the objects. This is the\n default.

\n
\n
READ_ONLY
\n
\n

The bucket owner has read-only access to the objects. The uploading account\n retains ownership of the objects.

\n
\n
FULL
\n
\n

The bucket owner has full access to the objects. Object ownership is determined\n by the following criteria:

\n \n

For more information about Amazon S3 object ownership, see Controlling ownership of uploaded objects using S3\n Object Ownership in the Amazon Simple Storage Service User\n Guide.

\n
\n
", - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "READ_ONLY", - "name": "READ_ONLY" - }, - { - "value": "FULL", - "name": "FULL" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + }, + "READ_ONLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READ_ONLY" + } + }, + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the bucket owner's access for objects that another account uploads to their\n Amazon S3 bucket. By default, only the account that uploads the objects to the bucket has\n access to these objects. This property allows you to give the bucket owner access to\n these objects.

\n \n

To use this property, your CodeBuild service role must have the\n s3:PutBucketAcl permission. This permission allows CodeBuild to modify\n the access control list for the bucket.

\n
\n

This property can be one of the following values:

\n
\n
NONE
\n
\n

The bucket owner does not have access to the objects. This is the\n default.

\n
\n
READ_ONLY
\n
\n

The bucket owner has read-only access to the objects. The uploading account\n retains ownership of the objects.

\n
\n
FULL
\n
\n

The bucket owner has full access to the objects. Object ownership is determined\n by the following criteria:

\n \n

For more information about Amazon S3 object ownership, see Controlling ownership of uploaded objects using S3\n Object Ownership in the Amazon Simple Storage Service User\n Guide.

\n
\n
" } }, "com.amazonaws.codebuild#Build": { @@ -488,19 +544,19 @@ "buildStatus": { "target": "com.amazonaws.codebuild#StatusType", "traits": { - "smithy.api#documentation": "

The current status of the build. Valid values include:

\n " + "smithy.api#documentation": "

The current status of the build. Valid values include:

\n " } }, "sourceVersion": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

Any version identifier for the version of the source code to be built. If\n sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

" + "smithy.api#documentation": "

Any version identifier for the version of the source code to be built. If\n sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

" } }, "resolvedSourceVersion": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

An identifier for the version of this build's source code.

\n " + "smithy.api#documentation": "

An identifier for the version of this build's source code.

\n " } }, "projectName": { @@ -530,7 +586,7 @@ "secondarySourceVersions": { "target": "com.amazonaws.codebuild#ProjectSecondarySourceVersions", "traits": { - "smithy.api#documentation": "

An array of ProjectSourceVersion objects. Each\n ProjectSourceVersion must be one of:

\n " + "smithy.api#documentation": "

An array of ProjectSourceVersion objects. Each\n ProjectSourceVersion must be one of:

\n " } }, "artifacts": { @@ -591,7 +647,7 @@ "initiator": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The entity that started the build. Valid values include:

\n " + "smithy.api#documentation": "

The entity that started the build. Valid values include:

\n " } }, "vpcConfig": { @@ -609,13 +665,13 @@ "encryptionKey": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The Key Management Service customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) to be used for encrypting the build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" } }, "exportedEnvironmentVariables": { "target": "com.amazonaws.codebuild#ExportedEnvironmentVariables", "traits": { - "smithy.api#documentation": "

A list of exported environment variables for this build.

\n

Exported environment variables are used in conjunction with CodePipeline to export\n environment variables from the current build stage to subsequent stages in the pipeline.\n For more information, see Working with variables in the CodePipeline User Guide.

" + "smithy.api#documentation": "

A list of exported environment variables for this build.

\n

Exported environment variables are used in conjunction with CodePipeline to export\n environment variables from the current build stage to subsequent stages in the pipeline.\n For more information, see Working with variables in the CodePipeline User Guide.

" } }, "reportArns": { @@ -659,13 +715,13 @@ "sha256sum": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The SHA-256 hash of the build artifact.

\n

You can use this hash along with a checksum tool to confirm file integrity and\n authenticity.

\n \n

This value is available only if the build project's packaging value\n is set to ZIP.

\n
" + "smithy.api#documentation": "

The SHA-256 hash of the build artifact.

\n

You can use this hash along with a checksum tool to confirm file integrity and\n authenticity.

\n \n

This value is available only if the build project's packaging value\n is set to ZIP.

\n
" } }, "md5sum": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The MD5 hash of the build artifact.

\n

You can use this hash along with a checksum tool to confirm file integrity and\n authenticity.

\n \n

This value is available only if the build project's packaging value\n is set to ZIP.

\n
" + "smithy.api#documentation": "

The MD5 hash of the build artifact.

\n

You can use this hash along with a checksum tool to confirm file integrity and\n authenticity.

\n \n

This value is available only if the build project's packaging value\n is set to ZIP.

\n
" } }, "overrideArtifactName": { @@ -754,7 +810,7 @@ "resolvedSourceVersion": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The identifier of the resolved version of this batch build's source code.

\n " + "smithy.api#documentation": "

The identifier of the resolved version of this batch build's source code.

\n " } }, "projectName": { @@ -833,7 +889,7 @@ "initiator": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The entity that started the batch build. Valid values include:

\n " + "smithy.api#documentation": "

The entity that started the batch build. Valid values include:

\n " } }, "vpcConfig": { @@ -842,7 +898,7 @@ "encryptionKey": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The Key Management Service customer master key (CMK) to be used for encrypting the batch build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) to be used for encrypting the batch build output\n artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" } }, "buildBatchNumber": { @@ -909,13 +965,13 @@ "phaseType": { "target": "com.amazonaws.codebuild#BuildBatchPhaseType", "traits": { - "smithy.api#documentation": "

The name of the batch build phase. Valid values include:

\n
\n
COMBINE_ARTIFACTS
\n
\n

Build output artifacts are being combined and uploaded to the output\n location.

\n
\n
DOWNLOAD_BATCHSPEC
\n
\n

The batch build specification is being downloaded.

\n
\n
FAILED
\n
\n

One or more of the builds failed.

\n
\n
IN_PROGRESS
\n
\n

The batch build is in progress.

\n
\n
STOPPED
\n
\n

The batch build was stopped.

\n
\n
SUBMITTED
\n
\n

The btach build has been submitted.

\n
\n
SUCCEEDED
\n
\n

The batch build succeeded.

\n
\n
" + "smithy.api#documentation": "

The name of the batch build phase. Valid values include:

\n
\n
COMBINE_ARTIFACTS
\n
\n

Build output artifacts are being combined and uploaded to the output\n location.

\n
\n
DOWNLOAD_BATCHSPEC
\n
\n

The batch build specification is being downloaded.

\n
\n
FAILED
\n
\n

One or more of the builds failed.

\n
\n
IN_PROGRESS
\n
\n

The batch build is in progress.

\n
\n
STOPPED
\n
\n

The batch build was stopped.

\n
\n
SUBMITTED
\n
\n

The btach build has been submitted.

\n
\n
SUCCEEDED
\n
\n

The batch build succeeded.

\n
\n
" } }, "phaseStatus": { "target": "com.amazonaws.codebuild#StatusType", "traits": { - "smithy.api#documentation": "

The current status of the batch build phase. Valid values include:

\n
\n
FAILED
\n
\n

The build phase failed.

\n
\n
FAULT
\n
\n

The build phase faulted.

\n
\n
IN_PROGRESS
\n
\n

The build phase is still in progress.

\n
\n
STOPPED
\n
\n

The build phase stopped.

\n
\n
SUCCEEDED
\n
\n

The build phase succeeded.

\n
\n
TIMED_OUT
\n
\n

The build phase timed out.

\n
\n
" + "smithy.api#documentation": "

The current status of the batch build phase. Valid values include:

\n
\n
FAILED
\n
\n

The build phase failed.

\n
\n
FAULT
\n
\n

The build phase faulted.

\n
\n
IN_PROGRESS
\n
\n

The build phase is still in progress.

\n
\n
STOPPED
\n
\n

The build phase stopped.

\n
\n
SUCCEEDED
\n
\n

The build phase succeeded.

\n
\n
TIMED_OUT
\n
\n

The build phase timed out.

\n
\n
" } }, "startTime": { @@ -948,38 +1004,50 @@ } }, "com.amazonaws.codebuild#BuildBatchPhaseType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUBMITTED", - "name": "SUBMITTED" - }, - { - "value": "DOWNLOAD_BATCHSPEC", - "name": "DOWNLOAD_BATCHSPEC" - }, - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "COMBINE_ARTIFACTS", - "name": "COMBINE_ARTIFACTS" - }, - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "STOPPED", - "name": "STOPPED" + "type": "enum", + "members": { + "SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUBMITTED" + } + }, + "DOWNLOAD_BATCHSPEC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOWNLOAD_BATCHSPEC" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "COMBINE_ARTIFACTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMBINE_ARTIFACTS" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPED" } - ] + } } }, "com.amazonaws.codebuild#BuildBatchPhases": { @@ -1083,13 +1151,13 @@ "phaseType": { "target": "com.amazonaws.codebuild#BuildPhaseType", "traits": { - "smithy.api#documentation": "

The name of the build phase. Valid values include:

\n
\n
BUILD
\n
\n

Core build activities typically occur in this build phase.

\n
\n
COMPLETED
\n
\n

The build has been completed.

\n
\n
DOWNLOAD_SOURCE
\n
\n

Source code is being downloaded in this build phase.

\n
\n
FINALIZING
\n
\n

The build process is completing in this build phase.

\n
\n
INSTALL
\n
\n

Installation activities typically occur in this build phase.

\n
\n
POST_BUILD
\n
\n

Post-build activities typically occur in this build phase.

\n
\n
PRE_BUILD
\n
\n

Pre-build activities typically occur in this build phase.

\n
\n
PROVISIONING
\n
\n

The build environment is being set up.

\n
\n
QUEUED
\n
\n

The build has been submitted and is queued behind other submitted\n builds.

\n
\n
SUBMITTED
\n
\n

The build has been submitted.

\n
\n
UPLOAD_ARTIFACTS
\n
\n

Build output artifacts are being uploaded to the output location.

\n
\n
" + "smithy.api#documentation": "

The name of the build phase. Valid values include:

\n
\n
BUILD
\n
\n

Core build activities typically occur in this build phase.

\n
\n
COMPLETED
\n
\n

The build has been completed.

\n
\n
DOWNLOAD_SOURCE
\n
\n

Source code is being downloaded in this build phase.

\n
\n
FINALIZING
\n
\n

The build process is completing in this build phase.

\n
\n
INSTALL
\n
\n

Installation activities typically occur in this build phase.

\n
\n
POST_BUILD
\n
\n

Post-build activities typically occur in this build phase.

\n
\n
PRE_BUILD
\n
\n

Pre-build activities typically occur in this build phase.

\n
\n
PROVISIONING
\n
\n

The build environment is being set up.

\n
\n
QUEUED
\n
\n

The build has been submitted and is queued behind other submitted\n builds.

\n
\n
SUBMITTED
\n
\n

The build has been submitted.

\n
\n
UPLOAD_ARTIFACTS
\n
\n

Build output artifacts are being uploaded to the output location.

\n
\n
" } }, "phaseStatus": { "target": "com.amazonaws.codebuild#StatusType", "traits": { - "smithy.api#documentation": "

The current status of the build phase. Valid values include:

\n
\n
FAILED
\n
\n

The build phase failed.

\n
\n
FAULT
\n
\n

The build phase faulted.

\n
\n
IN_PROGRESS
\n
\n

The build phase is still in progress.

\n
\n
STOPPED
\n
\n

The build phase stopped.

\n
\n
SUCCEEDED
\n
\n

The build phase succeeded.

\n
\n
TIMED_OUT
\n
\n

The build phase timed out.

\n
\n
" + "smithy.api#documentation": "

The current status of the build phase. Valid values include:

\n
\n
FAILED
\n
\n

The build phase failed.

\n
\n
FAULT
\n
\n

The build phase faulted.

\n
\n
IN_PROGRESS
\n
\n

The build phase is still in progress.

\n
\n
STOPPED
\n
\n

The build phase stopped.

\n
\n
SUCCEEDED
\n
\n

The build phase succeeded.

\n
\n
TIMED_OUT
\n
\n

The build phase timed out.

\n
\n
" } }, "startTime": { @@ -1122,54 +1190,74 @@ } }, "com.amazonaws.codebuild#BuildPhaseType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUBMITTED", - "name": "SUBMITTED" - }, - { - "value": "QUEUED", - "name": "QUEUED" - }, - { - "value": "PROVISIONING", - "name": "PROVISIONING" - }, - { - "value": "DOWNLOAD_SOURCE", - "name": "DOWNLOAD_SOURCE" - }, - { - "value": "INSTALL", - "name": "INSTALL" - }, - { - "value": "PRE_BUILD", - "name": "PRE_BUILD" - }, - { - "value": "BUILD", - "name": "BUILD" - }, - { - "value": "POST_BUILD", - "name": "POST_BUILD" - }, - { - "value": "UPLOAD_ARTIFACTS", - "name": "UPLOAD_ARTIFACTS" - }, - { - "value": "FINALIZING", - "name": "FINALIZING" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" + "type": "enum", + "members": { + "SUBMITTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUBMITTED" + } + }, + "QUEUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUEUED" + } + }, + "PROVISIONING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROVISIONING" + } + }, + "DOWNLOAD_SOURCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOWNLOAD_SOURCE" + } + }, + "INSTALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INSTALL" + } + }, + "PRE_BUILD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PRE_BUILD" + } + }, + "BUILD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD" + } + }, + "POST_BUILD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "POST_BUILD" + } + }, + "UPLOAD_ARTIFACTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPLOAD_ARTIFACTS" + } + }, + "FINALIZING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FINALIZING" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" } - ] + } } }, "com.amazonaws.codebuild#BuildPhases": { @@ -1190,13 +1278,13 @@ "context": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Specifies the context of the build status CodeBuild sends to the source provider. The\n usage of this parameter depends on the source provider.

\n
\n
Bitbucket
\n
\n

This parameter is used for the name parameter in the\n Bitbucket commit status. For more information, see build in the Bitbucket API documentation.

\n
\n
GitHub/GitHub Enterprise Server
\n
\n

This parameter is used for the context parameter in the\n GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.

\n
\n
" + "smithy.api#documentation": "

Specifies the context of the build status CodeBuild sends to the source provider. The\n usage of this parameter depends on the source provider.

\n
\n
Bitbucket
\n
\n

This parameter is used for the name parameter in the\n Bitbucket commit status. For more information, see build in the Bitbucket API documentation.

\n
\n
GitHub/GitHub Enterprise Server
\n
\n

This parameter is used for the context parameter in the\n GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.

\n
\n
" } }, "targetUrl": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Specifies the target url of the build status CodeBuild sends to the source provider. The\n usage of this parameter depends on the source provider.

\n
\n
Bitbucket
\n
\n

This parameter is used for the url parameter in the Bitbucket\n commit status. For more information, see build in the Bitbucket API documentation.

\n
\n
GitHub/GitHub Enterprise Server
\n
\n

This parameter is used for the target_url parameter in the\n GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.

\n
\n
" + "smithy.api#documentation": "

Specifies the target url of the build status CodeBuild sends to the source provider. The\n usage of this parameter depends on the source provider.

\n
\n
Bitbucket
\n
\n

This parameter is used for the url parameter in the Bitbucket\n commit status. For more information, see build in the Bitbucket API documentation.

\n
\n
GitHub/GitHub Enterprise Server
\n
\n

This parameter is used for the target_url parameter in the\n GitHub commit status. For more information, see Create a commit status in the GitHub developer guide.

\n
\n
" } } }, @@ -1228,7 +1316,7 @@ "buildStatus": { "target": "com.amazonaws.codebuild#StatusType", "traits": { - "smithy.api#documentation": "

The status of the build group.

\n
\n
FAILED
\n
\n

The build group failed.

\n
\n
FAULT
\n
\n

The build group faulted.

\n
\n
IN_PROGRESS
\n
\n

The build group is still in progress.

\n
\n
STOPPED
\n
\n

The build group stopped.

\n
\n
SUCCEEDED
\n
\n

The build group succeeded.

\n
\n
TIMED_OUT
\n
\n

The build group timed out.

\n
\n
" + "smithy.api#documentation": "

The status of the build group.

\n
\n
FAILED
\n
\n

The build group failed.

\n
\n
FAULT
\n
\n

The build group faulted.

\n
\n
IN_PROGRESS
\n
\n

The build group is still in progress.

\n
\n
STOPPED
\n
\n

The build group stopped.

\n
\n
SUCCEEDED
\n
\n

The build group succeeded.

\n
\n
TIMED_OUT
\n
\n

The build group timed out.

\n
\n
" } }, "primaryArtifact": { @@ -1261,41 +1349,49 @@ } }, "com.amazonaws.codebuild#CacheMode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "LOCAL_DOCKER_LAYER_CACHE", - "name": "LOCAL_DOCKER_LAYER_CACHE" - }, - { - "value": "LOCAL_SOURCE_CACHE", - "name": "LOCAL_SOURCE_CACHE" - }, - { - "value": "LOCAL_CUSTOM_CACHE", - "name": "LOCAL_CUSTOM_CACHE" + "type": "enum", + "members": { + "LOCAL_DOCKER_LAYER_CACHE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOCAL_DOCKER_LAYER_CACHE" + } + }, + "LOCAL_SOURCE_CACHE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOCAL_SOURCE_CACHE" + } + }, + "LOCAL_CUSTOM_CACHE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOCAL_CUSTOM_CACHE" } - ] + } } }, "com.amazonaws.codebuild#CacheType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NO_CACHE", - "name": "NO_CACHE" - }, - { - "value": "S3", - "name": "S3" - }, - { - "value": "LOCAL", - "name": "LOCAL" + "type": "enum", + "members": { + "NO_CACHE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NO_CACHE" + } + }, + "S3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3" } - ] + }, + "LOCAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOCAL" + } + } } }, "com.amazonaws.codebuild#CloudWatchLogsConfig": { @@ -1304,7 +1400,7 @@ "status": { "target": "com.amazonaws.codebuild#LogsConfigStatusType", "traits": { - "smithy.api#documentation": "

The current status of the logs in CloudWatch Logs for a build project. Valid values are:

\n ", + "smithy.api#documentation": "

The current status of the logs in CloudWatch Logs for a build project. Valid values are:

\n ", "smithy.api#required": {} } }, @@ -1477,7 +1573,7 @@ "name": "codebuild" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "CodeBuild\n

CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code,\n runs unit tests, and produces artifacts that are ready to deploy. CodeBuild eliminates the\n need to provision, manage, and scale your own build servers. It provides prepackaged\n build environments for the most popular programming languages and build tools, such as\n Apache Maven, Gradle, and more. You can also fully customize build environments in CodeBuild\n to use your own build tools. CodeBuild scales automatically to meet peak build requests. You\n pay only for the build time you consume. For more information about CodeBuild, see the \n CodeBuild User\n Guide.\n

", + "smithy.api#documentation": "CodeBuild\n

CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code,\n runs unit tests, and produces artifacts that are ready to deploy. CodeBuild eliminates the\n need to provision, manage, and scale your own build servers. It provides prepackaged\n build environments for the most popular programming languages and build tools, such as\n Apache Maven, Gradle, and more. You can also fully customize build environments in CodeBuild\n to use your own build tools. CodeBuild scales automatically to meet peak build requests. You\n pay only for the build time you consume. For more information about CodeBuild, see the \n CodeBuild User\n Guide.\n

", "smithy.api#title": "AWS CodeBuild", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -1539,52 +1635,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1592,13 +1692,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1608,224 +1717,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } - ], - "type": "tree", - "rules": [ + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, { - "conditions": [], - "type": "tree", - "rules": [ + "fn": "getAttr", + "argv": [ { - "conditions": [], - "endpoint": { - "url": "https://codebuild-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://codebuild-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codebuild-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://codebuild-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codebuild.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://codebuild.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://codebuild.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codebuild.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1840,8 +1900,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1853,8 +1913,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1866,8 +1926,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1879,8 +1939,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1892,8 +1952,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1905,8 +1965,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1918,8 +1978,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1931,8 +1991,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1944,8 +2004,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1957,8 +2017,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1970,8 +2030,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1983,8 +2043,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1996,8 +2056,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2009,8 +2069,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2022,8 +2082,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2035,8 +2095,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2048,8 +2108,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2061,8 +2121,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2074,8 +2134,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2087,8 +2147,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2100,8 +2160,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2113,8 +2173,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2126,8 +2186,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2139,8 +2199,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2152,8 +2212,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2165,8 +2225,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2178,8 +2238,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2191,8 +2251,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2204,8 +2264,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2217,8 +2277,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2230,8 +2290,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2243,8 +2303,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2256,8 +2316,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2269,8 +2329,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2282,8 +2342,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2295,8 +2355,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2308,8 +2368,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2321,8 +2381,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2334,8 +2394,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -2347,8 +2418,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2360,8 +2442,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2373,8 +2466,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2386,8 +2490,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2399,8 +2503,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2412,8 +2516,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2424,8 +2528,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2436,10 +2540,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2511,7 +2621,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains code coverage report information.

\n

Line coverage measures how many statements your tests cover. A statement is a single\n instruction, not including comments, conditionals, etc.

\n

Branch coverage determines if your tests cover every possible branch of a control\n structure, such as an if or case statement.

" + "smithy.api#documentation": "

Contains code coverage report information.

\n

Line coverage measures how many statements your tests cover. A statement is a single\n instruction, not including comments, conditionals, etc.

\n

Branch coverage determines if your tests cover every possible branch of a control\n structure, such as an if or case statement.

" } }, "com.amazonaws.codebuild#CodeCoverageReportSummary": { @@ -2555,7 +2665,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains a summary of a code coverage report.

\n

Line coverage measures how many statements your tests cover. A statement is a single\n instruction, not including comments, conditionals, etc.

\n

Branch coverage determines if your tests cover every possible branch of a control\n structure, such as an if or case statement.

" + "smithy.api#documentation": "

Contains a summary of a code coverage report.

\n

Line coverage measures how many statements your tests cover. A statement is a single\n instruction, not including comments, conditionals, etc.

\n

Branch coverage determines if your tests cover every possible branch of a control\n structure, such as an if or case statement.

" } }, "com.amazonaws.codebuild#CodeCoverages": { @@ -2565,26 +2675,32 @@ } }, "com.amazonaws.codebuild#ComputeType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BUILD_GENERAL1_SMALL", - "name": "BUILD_GENERAL1_SMALL" - }, - { - "value": "BUILD_GENERAL1_MEDIUM", - "name": "BUILD_GENERAL1_MEDIUM" - }, - { - "value": "BUILD_GENERAL1_LARGE", - "name": "BUILD_GENERAL1_LARGE" - }, - { - "value": "BUILD_GENERAL1_2XLARGE", - "name": "BUILD_GENERAL1_2XLARGE" + "type": "enum", + "members": { + "BUILD_GENERAL1_SMALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_GENERAL1_SMALL" } - ] + }, + "BUILD_GENERAL1_MEDIUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_GENERAL1_MEDIUM" + } + }, + "BUILD_GENERAL1_LARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_GENERAL1_LARGE" + } + }, + "BUILD_GENERAL1_2XLARGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_GENERAL1_2XLARGE" + } + } } }, "com.amazonaws.codebuild#ComputeTypesAllowed": { @@ -2750,6 +2866,9 @@ "smithy.api#documentation": "

The maximum number of concurrent builds that are allowed for this project.

\n

New builds are only started if the current number of builds is less than or equal to this limit. \n If the current build count meets this limit, new builds are throttled and are not run.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#CreateProjectOutput": { @@ -2761,6 +2880,9 @@ "smithy.api#documentation": "

Information about the build project that was created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#CreateReportGroup": { @@ -2816,6 +2938,9 @@ "smithy.api#documentation": "

\n A list of tag key and value pairs associated with this report group.\n

\n

These tags are available for use by Amazon Web Services services that support CodeBuild report group\n tags.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#CreateReportGroupOutput": { @@ -2827,6 +2952,9 @@ "smithy.api#documentation": "

\n Information about the report group that was created.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#CreateWebhook": { @@ -2883,6 +3011,9 @@ "smithy.api#documentation": "

Specifies the type of build this webhook will trigger.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#CreateWebhookOutput": { @@ -2894,17 +3025,20 @@ "smithy.api#documentation": "

Information about a webhook that connects repository events to a build project in\n CodeBuild.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#CredentialProviderType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SECRETS_MANAGER", - "name": "SECRETS_MANAGER" + "type": "enum", + "members": { + "SECRETS_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SECRETS_MANAGER" } - ] + } } }, "com.amazonaws.codebuild#DebugSession": { @@ -2954,6 +3088,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#DeleteBuildBatchOutput": { @@ -2977,6 +3114,9 @@ "smithy.api#documentation": "

An array of BuildNotDeleted objects that specify the builds that could not be\n deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#DeleteProject": { @@ -3006,11 +3146,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#DeleteProjectOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codebuild#DeleteReport": { "type": "operation", @@ -3063,11 +3209,17 @@ "smithy.api#documentation": "

If true, deletes any reports that belong to a report group before deleting\n the report group.

\n

If false, you must delete any reports in the report group. Use ListReportsForReportGroup to get the reports in a report group. Use DeleteReport to delete the reports. If you call\n DeleteReportGroup for a report group that contains one or more reports,\n an exception is thrown.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#DeleteReportGroupOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codebuild#DeleteReportInput": { "type": "structure", @@ -3079,11 +3231,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#DeleteReportOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codebuild#DeleteResourcePolicy": { "type": "operation", @@ -3112,11 +3270,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#DeleteResourcePolicyOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codebuild#DeleteSourceCredentials": { "type": "operation", @@ -3148,6 +3312,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#DeleteSourceCredentialsOutput": { @@ -3159,6 +3326,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#DeleteWebhook": { @@ -3194,11 +3364,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#DeleteWebhookOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codebuild#DescribeCodeCoverages": { "type": "operation", @@ -3254,7 +3430,7 @@ "sortBy": { "target": "com.amazonaws.codebuild#ReportCodeCoverageSortByType", "traits": { - "smithy.api#documentation": "

Specifies how the results are sorted. Possible values are:

\n
\n
FILE_PATH
\n
\n

The results are sorted by file path.

\n
\n
LINE_COVERAGE_PERCENTAGE
\n
\n

The results are sorted by the percentage of lines that are covered.

\n
\n
" + "smithy.api#documentation": "

Specifies how the results are sorted. Possible values are:

\n
\n
FILE_PATH
\n
\n

The results are sorted by file path.

\n
\n
LINE_COVERAGE_PERCENTAGE
\n
\n

The results are sorted by the percentage of lines that are covered.

\n
\n
" } }, "minLineCoveragePercentage": { @@ -3269,6 +3445,9 @@ "smithy.api#documentation": "

The maximum line coverage percentage to report.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#DescribeCodeCoveragesOutput": { @@ -3286,6 +3465,9 @@ "smithy.api#documentation": "

An array of CodeCoverage objects that contain the results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#DescribeTestCases": { @@ -3342,6 +3524,9 @@ "smithy.api#documentation": "

\n A TestCaseFilter object used to filter the returned reports.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#DescribeTestCasesOutput": { @@ -3359,6 +3544,9 @@ "smithy.api#documentation": "

\n The returned list of test cases.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#EnvironmentImage": { @@ -3446,30 +3634,38 @@ } }, "com.amazonaws.codebuild#EnvironmentType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "WINDOWS_CONTAINER", - "name": "WINDOWS_CONTAINER" - }, - { - "value": "LINUX_CONTAINER", - "name": "LINUX_CONTAINER" - }, - { - "value": "LINUX_GPU_CONTAINER", - "name": "LINUX_GPU_CONTAINER" - }, - { - "value": "ARM_CONTAINER", - "name": "ARM_CONTAINER" - }, - { - "value": "WINDOWS_SERVER_2019_CONTAINER", - "name": "WINDOWS_SERVER_2019_CONTAINER" + "type": "enum", + "members": { + "WINDOWS_CONTAINER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WINDOWS_CONTAINER" + } + }, + "LINUX_CONTAINER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINUX_CONTAINER" + } + }, + "LINUX_GPU_CONTAINER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINUX_GPU_CONTAINER" + } + }, + "ARM_CONTAINER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARM_CONTAINER" + } + }, + "WINDOWS_SERVER_2019_CONTAINER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WINDOWS_SERVER_2019_CONTAINER" } - ] + } } }, "com.amazonaws.codebuild#EnvironmentVariable": { @@ -3485,14 +3681,14 @@ "value": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The value of the environment variable.

\n \n

We strongly discourage the use of PLAINTEXT environment variables to\n store sensitive values, especially Amazon Web Services secret key IDs and secret access keys.\n PLAINTEXT environment variables can be displayed in plain text\n using the CodeBuild console and the CLI. For sensitive values, we recommend you use an\n environment variable of type PARAMETER_STORE or\n SECRETS_MANAGER.

\n
", + "smithy.api#documentation": "

The value of the environment variable.

\n \n

We strongly discourage the use of PLAINTEXT environment variables to\n store sensitive values, especially Amazon Web Services secret key IDs and secret access keys.\n PLAINTEXT environment variables can be displayed in plain text\n using the CodeBuild console and the CLI. For sensitive values, we recommend you use an\n environment variable of type PARAMETER_STORE or\n SECRETS_MANAGER.

\n
", "smithy.api#required": {} } }, "type": { "target": "com.amazonaws.codebuild#EnvironmentVariableType", "traits": { - "smithy.api#documentation": "

The type of environment variable. Valid values include:

\n " + "smithy.api#documentation": "

The type of environment variable. Valid values include:

\n " } } }, @@ -3501,22 +3697,26 @@ } }, "com.amazonaws.codebuild#EnvironmentVariableType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PLAINTEXT", - "name": "PLAINTEXT" - }, - { - "value": "PARAMETER_STORE", - "name": "PARAMETER_STORE" - }, - { - "value": "SECRETS_MANAGER", - "name": "SECRETS_MANAGER" + "type": "enum", + "members": { + "PLAINTEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PLAINTEXT" + } + }, + "PARAMETER_STORE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARAMETER_STORE" } - ] + }, + "SECRETS_MANAGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SECRETS_MANAGER" + } + } } }, "com.amazonaws.codebuild#EnvironmentVariables": { @@ -3542,7 +3742,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains information about an exported environment variable.

\n

Exported environment variables are used in conjunction with CodePipeline to export\n environment variables from the current build stage to subsequent stages in the pipeline.\n For more information, see Working with variables in the CodePipeline User Guide.

\n \n

During a build, the value of a variable is available starting with the\n install phase. It can be updated between the start of the\n install phase and the end of the post_build phase.\n After the post_build phase ends, the value of exported variables cannot\n change.

\n
" + "smithy.api#documentation": "

Contains information about an exported environment variable.

\n

Exported environment variables are used in conjunction with CodePipeline to export\n environment variables from the current build stage to subsequent stages in the pipeline.\n For more information, see Working with variables in the CodePipeline User Guide.

\n \n

During a build, the value of a variable is available starting with the\n install phase. It can be updated between the start of the\n install phase and the end of the post_build phase.\n After the post_build phase ends, the value of exported variables cannot\n change.

\n
" } }, "com.amazonaws.codebuild#ExportedEnvironmentVariables": { @@ -3552,14 +3752,14 @@ } }, "com.amazonaws.codebuild#FileSystemType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EFS", - "name": "EFS" + "type": "enum", + "members": { + "EFS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EFS" } - ] + } } }, "com.amazonaws.codebuild#FilterGroup": { @@ -3607,16 +3807,19 @@ "numOfReports": { "target": "com.amazonaws.codebuild#PageSize", "traits": { - "smithy.api#documentation": "

The number of reports to analyze. This operation always retrieves the most recent\n reports.

\n

If this parameter is omitted, the most recent 100 reports are analyzed.

" + "smithy.api#documentation": "

The number of reports to analyze. This operation always retrieves the most recent\n reports.

\n

If this parameter is omitted, the most recent 100 reports are analyzed.

" } }, "trendField": { "target": "com.amazonaws.codebuild#ReportGroupTrendFieldType", "traits": { - "smithy.api#documentation": "

The test report value to accumulate. This must be one of the following values:

\n
\n
Test reports:
\n
\n
\n
DURATION
\n
\n

Accumulate the test run times for the specified\n reports.

\n
\n
PASS_RATE
\n
\n

Accumulate the percentage of tests that passed for the\n specified test reports.

\n
\n
TOTAL
\n
\n

Accumulate the total number of tests for the specified test\n reports.

\n
\n
\n
\n
\n
\n
Code coverage reports:
\n
\n
\n
BRANCH_COVERAGE
\n
\n

Accumulate the branch coverage percentages for the specified\n test reports.

\n
\n
BRANCHES_COVERED
\n
\n

Accumulate the branches covered values for the specified test\n reports.

\n
\n
BRANCHES_MISSED
\n
\n

Accumulate the branches missed values for the specified test\n reports.

\n
\n
LINE_COVERAGE
\n
\n

Accumulate the line coverage percentages for the specified\n test reports.

\n
\n
LINES_COVERED
\n
\n

Accumulate the lines covered values for the specified test\n reports.

\n
\n
LINES_MISSED
\n
\n

Accumulate the lines not covered values for the specified test\n reports.

\n
\n
\n
\n
", + "smithy.api#documentation": "

The test report value to accumulate. This must be one of the following values:

\n
\n
Test reports:
\n
\n
\n
DURATION
\n
\n

Accumulate the test run times for the specified\n reports.

\n
\n
PASS_RATE
\n
\n

Accumulate the percentage of tests that passed for the\n specified test reports.

\n
\n
TOTAL
\n
\n

Accumulate the total number of tests for the specified test\n reports.

\n
\n
\n
\n
\n
\n
Code coverage reports:
\n
\n
\n
BRANCH_COVERAGE
\n
\n

Accumulate the branch coverage percentages for the specified\n test reports.

\n
\n
BRANCHES_COVERED
\n
\n

Accumulate the branches covered values for the specified test\n reports.

\n
\n
BRANCHES_MISSED
\n
\n

Accumulate the branches missed values for the specified test\n reports.

\n
\n
LINE_COVERAGE
\n
\n

Accumulate the line coverage percentages for the specified\n test reports.

\n
\n
LINES_COVERED
\n
\n

Accumulate the lines covered values for the specified test\n reports.

\n
\n
LINES_MISSED
\n
\n

Accumulate the lines not covered values for the specified test\n reports.

\n
\n
\n
\n
", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#GetReportGroupTrendOutput": { @@ -3634,6 +3837,9 @@ "smithy.api#documentation": "

An array that contains the raw data for each report.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#GetResourcePolicy": { @@ -3666,6 +3872,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#GetResourcePolicyOutput": { @@ -3677,6 +3886,9 @@ "smithy.api#documentation": "

The resource policy for the resource identified by the input ARN parameter.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#GitCloneDepth": { @@ -3709,18 +3921,20 @@ } }, "com.amazonaws.codebuild#ImagePullCredentialsType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CODEBUILD", - "name": "CODEBUILD" - }, - { - "value": "SERVICE_ROLE", - "name": "SERVICE_ROLE" + "type": "enum", + "members": { + "CODEBUILD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CODEBUILD" + } + }, + "SERVICE_ROLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SERVICE_ROLE" } - ] + } } }, "com.amazonaws.codebuild#ImageVersions": { @@ -3788,6 +4002,9 @@ "smithy.api#documentation": "

Set to false to prevent overwriting the repository source credentials.\n Set to true to overwrite the repository source credentials. The default\n value is true.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ImportSourceCredentialsOutput": { @@ -3799,6 +4016,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#InvalidInputException": { @@ -3843,11 +4063,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#InvalidateProjectCacheOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codebuild#KeyInput": { "type": "string", @@ -3860,50 +4086,68 @@ } }, "com.amazonaws.codebuild#LanguageType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "JAVA", - "name": "JAVA" - }, - { - "value": "PYTHON", - "name": "PYTHON" - }, - { - "value": "NODE_JS", - "name": "NODE_JS" - }, - { - "value": "RUBY", - "name": "RUBY" - }, - { - "value": "GOLANG", - "name": "GOLANG" - }, - { - "value": "DOCKER", - "name": "DOCKER" - }, - { - "value": "ANDROID", - "name": "ANDROID" - }, - { - "value": "DOTNET", - "name": "DOTNET" - }, - { - "value": "BASE", - "name": "BASE" - }, - { - "value": "PHP", - "name": "PHP" + "type": "enum", + "members": { + "JAVA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JAVA" + } + }, + "PYTHON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PYTHON" + } + }, + "NODE_JS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NODE_JS" + } + }, + "RUBY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUBY" + } + }, + "GOLANG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GOLANG" + } + }, + "DOCKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOCKER" + } + }, + "ANDROID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ANDROID" + } + }, + "DOTNET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOTNET" } - ] + }, + "BASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BASE" + } + }, + "PHP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PHP" + } + } } }, "com.amazonaws.codebuild#ListBuildBatches": { @@ -3979,7 +4223,7 @@ "sortOrder": { "target": "com.amazonaws.codebuild#SortOrderType", "traits": { - "smithy.api#documentation": "

Specifies the sort order of the returned items. Valid values include:

\n " + "smithy.api#documentation": "

Specifies the sort order of the returned items. Valid values include:

\n " } }, "nextToken": { @@ -3988,6 +4232,9 @@ "smithy.api#documentation": "

The nextToken value returned from a previous call to\n ListBuildBatchesForProject. This specifies the next item to return. To return the\n beginning of the list, exclude this parameter.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListBuildBatchesForProjectOutput": { @@ -4005,6 +4252,9 @@ "smithy.api#documentation": "

If there are more items to return, this contains a token that is passed to a\n subsequent call to ListBuildBatchesForProject to retrieve the next set of\n items.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListBuildBatchesInput": { @@ -4034,6 +4284,9 @@ "smithy.api#documentation": "

The nextToken value returned from a previous call to\n ListBuildBatches. This specifies the next item to return. To return the\n beginning of the list, exclude this parameter.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListBuildBatchesOutput": { @@ -4051,6 +4304,9 @@ "smithy.api#documentation": "

If there are more items to return, this contains a token that is passed to a subsequent\n call to ListBuildBatches to retrieve the next set of items.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListBuilds": { @@ -4113,7 +4369,7 @@ "sortOrder": { "target": "com.amazonaws.codebuild#SortOrderType", "traits": { - "smithy.api#documentation": "

The order to sort the results in. The results are sorted by build number, not the build\n identifier. If this is not specified, the results are sorted in descending order.

\n

Valid values include:

\n \n

If the project has more than 100 builds, setting the sort order will result in an\n error.

" + "smithy.api#documentation": "

The order to sort the results in. The results are sorted by build number, not the build\n identifier. If this is not specified, the results are sorted in descending order.

\n

Valid values include:

\n \n

If the project has more than 100 builds, setting the sort order will result in an\n error.

" } }, "nextToken": { @@ -4122,6 +4378,9 @@ "smithy.api#documentation": "

During a previous call, if there are more than 100 items in the list, only the first\n 100 items are returned, along with a unique string called a\n nextToken. To get the next batch of items in the list, call\n this operation again, adding the next token to the call. To get all of the items in the\n list, keep calling this operation with each subsequent next token that is returned,\n until no more next tokens are returned.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListBuildsForProjectOutput": { @@ -4139,6 +4398,9 @@ "smithy.api#documentation": "

If there are more than 100 items in the list, only the first 100 items are returned,\n along with a unique string called a nextToken. To get the next\n batch of items in the list, call this operation again, adding the next token to the\n call.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListBuildsInput": { @@ -4147,7 +4409,7 @@ "sortOrder": { "target": "com.amazonaws.codebuild#SortOrderType", "traits": { - "smithy.api#documentation": "

The order to list build IDs. Valid values include:

\n " + "smithy.api#documentation": "

The order to list build IDs. Valid values include:

\n " } }, "nextToken": { @@ -4156,6 +4418,9 @@ "smithy.api#documentation": "

During a previous call, if there are more than 100 items in the list, only the first\n 100 items are returned, along with a unique string called a\n nextToken. To get the next batch of items in the list, call\n this operation again, adding the next token to the call. To get all of the items in the\n list, keep calling this operation with each subsequent next token that is returned,\n until no more next tokens are returned.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListBuildsOutput": { @@ -4173,6 +4438,9 @@ "smithy.api#documentation": "

If there are more than 100 items in the list, only the first 100 items are returned,\n along with a unique string called a nextToken. To get the next\n batch of items in the list, call this operation again, adding the next token to the\n call.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListCuratedEnvironmentImages": { @@ -4189,7 +4457,10 @@ }, "com.amazonaws.codebuild#ListCuratedEnvironmentImagesInput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.codebuild#ListCuratedEnvironmentImagesOutput": { "type": "structure", @@ -4200,6 +4471,9 @@ "smithy.api#documentation": "

Information about supported platforms for Docker images that are managed by\n CodeBuild.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListProjects": { @@ -4230,13 +4504,13 @@ "sortBy": { "target": "com.amazonaws.codebuild#ProjectSortByType", "traits": { - "smithy.api#documentation": "

The criterion to be used to list build project names. Valid values include:

\n \n

Use sortOrder to specify in what order to list the build project names\n based on the preceding criteria.

" + "smithy.api#documentation": "

The criterion to be used to list build project names. Valid values include:

\n \n

Use sortOrder to specify in what order to list the build project names\n based on the preceding criteria.

" } }, "sortOrder": { "target": "com.amazonaws.codebuild#SortOrderType", "traits": { - "smithy.api#documentation": "

The order in which to list build projects. Valid values include:

\n \n

Use sortBy to specify the criterion to be used to list build project\n names.

" + "smithy.api#documentation": "

The order in which to list build projects. Valid values include:

\n \n

Use sortBy to specify the criterion to be used to list build project\n names.

" } }, "nextToken": { @@ -4245,6 +4519,9 @@ "smithy.api#documentation": "

During a previous call, if there are more than 100 items in the list, only the first\n 100 items are returned, along with a unique string called a\n nextToken. To get the next batch of items in the list, call\n this operation again, adding the next token to the call. To get all of the items in the\n list, keep calling this operation with each subsequent next token that is returned,\n until no more next tokens are returned.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListProjectsOutput": { @@ -4262,6 +4539,9 @@ "smithy.api#documentation": "

The list of build project names, with each build project name representing a single\n build project.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListReportGroups": { @@ -4314,6 +4594,9 @@ "smithy.api#documentation": "

\n The maximum number of paginated report groups returned per response. Use nextToken to iterate pages in\n the list of returned ReportGroup objects. The default value is 100.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListReportGroupsOutput": { @@ -4331,6 +4614,9 @@ "smithy.api#documentation": "

\n The list of ARNs for the report groups in the current Amazon Web Services account.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListReports": { @@ -4416,6 +4702,9 @@ "smithy.api#documentation": "

\n A ReportFilter object used to filter the returned reports.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListReportsForReportGroupOutput": { @@ -4433,6 +4722,9 @@ "smithy.api#documentation": "

\n The list of report ARNs.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListReportsInput": { @@ -4462,6 +4754,9 @@ "smithy.api#documentation": "

\n A ReportFilter object used to filter the returned reports.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListReportsOutput": { @@ -4479,6 +4774,9 @@ "smithy.api#documentation": "

\n The list of returned ARNs for the reports in the current Amazon Web Services account.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListSharedProjects": { @@ -4510,13 +4808,13 @@ "sortBy": { "target": "com.amazonaws.codebuild#SharedResourceSortByType", "traits": { - "smithy.api#documentation": "

The criterion to be used to list build projects shared with the current Amazon Web Services account\n or user. Valid values include:

\n " + "smithy.api#documentation": "

The criterion to be used to list build projects shared with the current Amazon Web Services account\n or user. Valid values include:

\n " } }, "sortOrder": { "target": "com.amazonaws.codebuild#SortOrderType", "traits": { - "smithy.api#documentation": "

The order in which to list shared build projects. Valid values include:

\n " + "smithy.api#documentation": "

The order in which to list shared build projects. Valid values include:

\n " } }, "maxResults": { @@ -4531,6 +4829,9 @@ "smithy.api#documentation": "

During a previous call, the maximum number of items that can be returned is the value\n specified in maxResults. If there more items in the list, then a unique\n string called a nextToken is returned. To get the next batch of\n items in the list, call this operation again, adding the next token to the call. To get\n all of the items in the list, keep calling this operation with each subsequent next\n token that is returned, until no more next tokens are returned.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListSharedProjectsOutput": { @@ -4548,6 +4849,9 @@ "smithy.api#documentation": "

The list of ARNs for the build projects shared with the current Amazon Web Services account or user.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListSharedReportGroups": { @@ -4579,13 +4883,13 @@ "sortOrder": { "target": "com.amazonaws.codebuild#SortOrderType", "traits": { - "smithy.api#documentation": "

The order in which to list shared report groups. Valid values include:

\n " + "smithy.api#documentation": "

The order in which to list shared report groups. Valid values include:

\n " } }, "sortBy": { "target": "com.amazonaws.codebuild#SharedResourceSortByType", "traits": { - "smithy.api#documentation": "

The criterion to be used to list report groups shared with the current Amazon Web Services account or\n user. Valid values include:

\n " + "smithy.api#documentation": "

The criterion to be used to list report groups shared with the current Amazon Web Services account or\n user. Valid values include:

\n " } }, "nextToken": { @@ -4600,6 +4904,9 @@ "smithy.api#documentation": "

The maximum number of paginated shared report groups per response. Use\n nextToken to iterate pages in the list of returned\n ReportGroup objects. The default value is 100.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#ListSharedReportGroupsOutput": { @@ -4617,6 +4924,9 @@ "smithy.api#documentation": "

The list of ARNs for the report groups shared with the current Amazon Web Services account or user.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ListSourceCredentials": { @@ -4638,7 +4948,10 @@ }, "com.amazonaws.codebuild#ListSourceCredentialsInput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.codebuild#ListSourceCredentialsOutput": { "type": "structure", @@ -4649,6 +4962,9 @@ "smithy.api#documentation": "

A list of SourceCredentialsInfo objects. Each\n SourceCredentialsInfo object includes the authentication type, token\n ARN, and type of source provider for one set of credentials.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#LogsConfig": { @@ -4672,18 +4988,20 @@ } }, "com.amazonaws.codebuild#LogsConfigStatusType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" } - ] + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } } }, "com.amazonaws.codebuild#LogsLocation": { @@ -4835,26 +5153,32 @@ } }, "com.amazonaws.codebuild#PlatformType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DEBIAN", - "name": "DEBIAN" - }, - { - "value": "AMAZON_LINUX", - "name": "AMAZON_LINUX" - }, - { - "value": "UBUNTU", - "name": "UBUNTU" - }, - { - "value": "WINDOWS_SERVER", - "name": "WINDOWS_SERVER" + "type": "enum", + "members": { + "DEBIAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEBIAN" + } + }, + "AMAZON_LINUX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AMAZON_LINUX" + } + }, + "UBUNTU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UBUNTU" + } + }, + "WINDOWS_SERVER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WINDOWS_SERVER" } - ] + } } }, "com.amazonaws.codebuild#Project": { @@ -5048,38 +5372,38 @@ "type": { "target": "com.amazonaws.codebuild#ArtifactsType", "traits": { - "smithy.api#documentation": "

The type of build output artifact. Valid values include:

\n ", + "smithy.api#documentation": "

The type of build output artifact. Valid values include:

\n ", "smithy.api#required": {} } }, "location": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Information about the build output artifact location:

\n " + "smithy.api#documentation": "

Information about the build output artifact location:

\n " } }, "path": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Along with namespaceType and name, the pattern that CodeBuild\n uses to name and store the output artifact:

\n \n

For example, if path is set to MyArtifacts,\n namespaceType is set to NONE, and name is set\n to MyArtifact.zip, the output artifact is stored in the output bucket at\n MyArtifacts/MyArtifact.zip.

" + "smithy.api#documentation": "

Along with namespaceType and name, the pattern that CodeBuild\n uses to name and store the output artifact:

\n \n

For example, if path is set to MyArtifacts,\n namespaceType is set to NONE, and name is set\n to MyArtifact.zip, the output artifact is stored in the output bucket at\n MyArtifacts/MyArtifact.zip.

" } }, "namespaceType": { "target": "com.amazonaws.codebuild#ArtifactNamespace", "traits": { - "smithy.api#documentation": "

Along with path and name, the pattern that CodeBuild uses to\n determine the name and location to store the output artifact:

\n \n

For example, if path is set to MyArtifacts,\n namespaceType is set to BUILD_ID, and name is\n set to MyArtifact.zip, the output artifact is stored in\n MyArtifacts//MyArtifact.zip.

" + "smithy.api#documentation": "

Along with path and name, the pattern that CodeBuild uses to\n determine the name and location to store the output artifact:

\n \n

For example, if path is set to MyArtifacts,\n namespaceType is set to BUILD_ID, and name is\n set to MyArtifact.zip, the output artifact is stored in\n MyArtifacts//MyArtifact.zip.

" } }, "name": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Along with path and namespaceType, the pattern that CodeBuild\n uses to name and store the output artifact:

\n \n

For example:

\n " + "smithy.api#documentation": "

Along with path and namespaceType, the pattern that CodeBuild\n uses to name and store the output artifact:

\n \n

For example:

\n " } }, "packaging": { "target": "com.amazonaws.codebuild#ArtifactPackaging", "traits": { - "smithy.api#documentation": "

The type of build output artifact to create:

\n " + "smithy.api#documentation": "

The type of build output artifact to create:

\n " } }, "overrideArtifactName": { @@ -5185,20 +5509,20 @@ "type": { "target": "com.amazonaws.codebuild#CacheType", "traits": { - "smithy.api#documentation": "

The type of cache used by the build project. Valid values include:

\n ", + "smithy.api#documentation": "

The type of cache used by the build project. Valid values include:

\n ", "smithy.api#required": {} } }, "location": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Information about the cache location:

\n " + "smithy.api#documentation": "

Information about the cache location:

\n " } }, "modes": { "target": "com.amazonaws.codebuild#ProjectCacheModes", "traits": { - "smithy.api#documentation": "

An array of strings that specify the local cache modes. You can use one or more local\n cache modes at the same time. This is only used for LOCAL cache\n types.

\n

Possible values are:

\n
\n
LOCAL_SOURCE_CACHE
\n
\n

Caches Git metadata for primary and secondary sources. After the cache is\n created, subsequent builds pull only the change between commits. This mode\n is a good choice for projects with a clean working directory and a source\n that is a large Git repository. If you choose this option and your project\n does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the\n option is ignored.

\n
\n
LOCAL_DOCKER_LAYER_CACHE
\n
\n

Caches existing Docker layers. This mode is a good choice for projects\n that build or pull large Docker images. It can prevent the performance\n issues caused by pulling large Docker images down from the network.

\n \n
    \n
  • \n

    You can use a Docker layer cache in the Linux environment\n only.

    \n
  • \n
  • \n

    The privileged flag must be set so that your\n project has the required Docker permissions.

    \n
  • \n
  • \n

    You should consider the security implications before you use a\n Docker layer cache.

    \n
  • \n
\n
\n
\n
LOCAL_CUSTOM_CACHE
\n
\n

Caches directories you specify in the buildspec file. This mode is a good\n choice if your build scenario is not suited to one of the other three local\n cache modes. If you use a custom cache:

\n \n
\n
" + "smithy.api#documentation": "

An array of strings that specify the local cache modes. You can use one or more local\n cache modes at the same time. This is only used for LOCAL cache\n types.

\n

Possible values are:

\n
\n
LOCAL_SOURCE_CACHE
\n
\n

Caches Git metadata for primary and secondary sources. After the cache is\n created, subsequent builds pull only the change between commits. This mode\n is a good choice for projects with a clean working directory and a source\n that is a large Git repository. If you choose this option and your project\n does not use a Git repository (GitHub, GitHub Enterprise, or Bitbucket), the\n option is ignored.

\n
\n
LOCAL_DOCKER_LAYER_CACHE
\n
\n

Caches existing Docker layers. This mode is a good choice for projects\n that build or pull large Docker images. It can prevent the performance\n issues caused by pulling large Docker images down from the network.

\n \n
    \n
  • \n

    You can use a Docker layer cache in the Linux environment\n only.

    \n
  • \n
  • \n

    The privileged flag must be set so that your\n project has the required Docker permissions.

    \n
  • \n
  • \n

    You should consider the security implications before you use a\n Docker layer cache.

    \n
  • \n
\n
\n
\n
LOCAL_CUSTOM_CACHE
\n
\n

Caches directories you specify in the buildspec file. This mode is a good\n choice if your build scenario is not suited to one of the other three local\n cache modes. If you use a custom cache:

\n \n
\n
" } } }, @@ -5227,21 +5551,21 @@ "type": { "target": "com.amazonaws.codebuild#EnvironmentType", "traits": { - "smithy.api#documentation": "

The type of build environment to use for related builds.

\n \n \n

For more information, see Build environment compute types in the CodeBuild\n user guide.

", + "smithy.api#documentation": "

The type of build environment to use for related builds.

\n \n \n

For more information, see Build environment compute types in the CodeBuild\n user guide.

", "smithy.api#required": {} } }, "image": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The image tag or image digest that identifies the Docker image to use for this build\n project. Use the following formats:

\n \n

For more information, see Docker images provided by CodeBuild in the CodeBuild user\n guide.

", + "smithy.api#documentation": "

The image tag or image digest that identifies the Docker image to use for this build\n project. Use the following formats:

\n \n

For more information, see Docker images provided by CodeBuild in the CodeBuild user\n guide.

", "smithy.api#required": {} } }, "computeType": { "target": "com.amazonaws.codebuild#ComputeType", "traits": { - "smithy.api#documentation": "

Information about the compute resources the build project uses. Available values\n include:

\n \n

If you use BUILD_GENERAL1_LARGE:

\n \n

For more information, see Build Environment\n Compute Types in the CodeBuild User Guide.\n

", + "smithy.api#documentation": "

Information about the compute resources the build project uses. Available values\n include:

\n \n

If you use BUILD_GENERAL1_LARGE:

\n \n

For more information, see Build Environment\n Compute Types in the CodeBuild User Guide.\n

", "smithy.api#required": {} } }, @@ -5254,7 +5578,7 @@ "privilegedMode": { "target": "com.amazonaws.codebuild#WrapperBoolean", "traits": { - "smithy.api#documentation": "

Enables running the Docker daemon inside a Docker container. Set to true only if the\n build project is used to build Docker images. Otherwise, a build that attempts to\n interact with the Docker daemon fails. The default setting is false.

\n

You can initialize the Docker daemon during the install phase of your build by adding\n one of the following sets of commands to the install phase of your buildspec\n file:

\n

If the operating system's base image is Ubuntu Linux:

\n

\n - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&\n

\n

\n - timeout 15 sh -c \"until docker info; do echo .; sleep 1; done\"\n

\n

If the operating system's base image is Alpine Linux and the previous command does not\n work, add the -t argument to timeout:

\n

\n - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&\n

\n

\n - timeout -t 15 sh -c \"until docker info; do echo .; sleep 1; done\"\n

" + "smithy.api#documentation": "

Enables running the Docker daemon inside a Docker container. Set to true only if the\n build project is used to build Docker images. Otherwise, a build that attempts to\n interact with the Docker daemon fails. The default setting is false.

\n

You can initialize the Docker daemon during the install phase of your build by adding\n one of the following sets of commands to the install phase of your buildspec\n file:

\n

If the operating system's base image is Ubuntu Linux:

\n

\n - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&\n

\n

\n - timeout 15 sh -c \"until docker info; do echo .; sleep 1; done\"\n

\n

If the operating system's base image is Alpine Linux and the previous command does not\n work, add the -t argument to timeout:

\n

\n - nohup /usr/local/bin/dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay&\n

\n

\n - timeout -t 15 sh -c \"until docker info; do echo .; sleep 1; done\"\n

" } }, "certificate": { @@ -5272,7 +5596,7 @@ "imagePullCredentialsType": { "target": "com.amazonaws.codebuild#ImagePullCredentialsType", "traits": { - "smithy.api#documentation": "

The type of credentials CodeBuild uses to pull images in your build. There are two valid\n values:

\n \n

When you use a cross-account or private registry image, you must use SERVICE_ROLE\n credentials. When you use an CodeBuild curated image, you must use CODEBUILD credentials.\n

" + "smithy.api#documentation": "

The type of credentials CodeBuild uses to pull images in your build. There are two valid\n values:

\n \n

When you use a cross-account or private registry image, you must use SERVICE_ROLE\n credentials. When you use an CodeBuild curated image, you must use CODEBUILD credentials.\n

" } } }, @@ -5292,7 +5616,7 @@ "location": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A string that specifies the location of the file system created by Amazon EFS. Its\n format is efs-dns-name:/directory-path. You can find the DNS name of file\n system when you view it in the Amazon EFS console. The directory path is a path to a\n directory in the file system that CodeBuild mounts. For example, if the DNS name of a\n file system is fs-abcd1234.efs.us-west-2.amazonaws.com, and its mount\n directory is my-efs-mount-directory, then the location is\n fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory.

\n

The directory path in the format efs-dns-name:/directory-path is\n optional. If you do not specify a directory path, the location is only the DNS name and\n CodeBuild mounts the entire file system.

" + "smithy.api#documentation": "

A string that specifies the location of the file system created by Amazon EFS. Its\n format is efs-dns-name:/directory-path. You can find the DNS name of file\n system when you view it in the Amazon EFS console. The directory path is a path to a\n directory in the file system that CodeBuild mounts. For example, if the DNS name of a\n file system is fs-abcd1234.efs.us-west-2.amazonaws.com, and its mount\n directory is my-efs-mount-directory, then the location is\n fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory.

\n

The directory path in the format efs-dns-name:/directory-path is\n optional. If you do not specify a directory path, the location is only the DNS name and\n CodeBuild mounts the entire file system.

" } }, "mountPoint": { @@ -5304,7 +5628,7 @@ "identifier": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The name used to access a file system created by Amazon EFS. CodeBuild creates an\n environment variable by appending the identifier in all capital letters to\n CODEBUILD_. For example, if you specify my_efs for\n identifier, a new environment variable is create named\n CODEBUILD_MY_EFS.

\n

The identifier is used to mount your file system.

" + "smithy.api#documentation": "

The name used to access a file system created by Amazon EFS. CodeBuild creates an\n environment variable by appending the identifier in all capital letters to\n CODEBUILD_. For example, if you specify my_efs for\n identifier, a new environment variable is create named\n CODEBUILD_MY_EFS.

\n

The identifier is used to mount your file system.

" } }, "mountOptions": { @@ -5315,7 +5639,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about a file system created by Amazon Elastic File System (EFS). For more\n information, see What Is\n Amazon Elastic File System?\n

" + "smithy.api#documentation": "

Information about a file system created by Amazon Elastic File System (EFS). For more\n information, see What Is\n Amazon Elastic File System?\n

" } }, "com.amazonaws.codebuild#ProjectFileSystemLocations": { @@ -5359,22 +5683,26 @@ } }, "com.amazonaws.codebuild#ProjectSortByType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NAME", - "name": "NAME" - }, - { - "value": "CREATED_TIME", - "name": "CREATED_TIME" - }, - { - "value": "LAST_MODIFIED_TIME", - "name": "LAST_MODIFIED_TIME" + "type": "enum", + "members": { + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAME" + } + }, + "CREATED_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATED_TIME" + } + }, + "LAST_MODIFIED_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LAST_MODIFIED_TIME" } - ] + } } }, "com.amazonaws.codebuild#ProjectSource": { @@ -5383,14 +5711,14 @@ "type": { "target": "com.amazonaws.codebuild#SourceType", "traits": { - "smithy.api#documentation": "

The type of repository that contains the source code to be built. Valid values\n include:

\n ", + "smithy.api#documentation": "

The type of repository that contains the source code to be built. Valid values\n include:

\n ", "smithy.api#required": {} } }, "location": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

Information about the location of the source code to be built. Valid values\n include:

\n \n

\n If you specify CODEPIPELINE for the Type property, don't specify this \n property. For all of the other types, you must specify Location.\n

" + "smithy.api#documentation": "

Information about the location of the source code to be built. Valid values\n include:

\n \n

\n If you specify CODEPIPELINE for the Type property, don't specify this \n property. For all of the other types, you must specify Location.\n

" } }, "gitCloneDepth": { @@ -5408,19 +5736,19 @@ "buildspec": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The buildspec file declaration to use for the builds in this build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" + "smithy.api#documentation": "

The buildspec file declaration to use for the builds in this build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" } }, "auth": { "target": "com.amazonaws.codebuild#SourceAuth", "traits": { - "smithy.api#documentation": "

Information about the authorization settings for CodeBuild to access the source code to be\n built.

\n

This information is for the CodeBuild console's use only. Your code should not get or set\n this information directly.

" + "smithy.api#documentation": "

Information about the authorization settings for CodeBuild to access the source code to be\n built.

\n

This information is for the CodeBuild console's use only. Your code should not get or set\n this information directly.

" } }, "reportBuildStatus": { "target": "com.amazonaws.codebuild#WrapperBoolean", "traits": { - "smithy.api#documentation": "

Set to true to report the status of a build's start and finish to your source\n provider. This option is valid only when your source provider is GitHub, GitHub\n Enterprise, or Bitbucket. If this is set and you use a different source provider, an\n invalidInputException is thrown.

\n

To be able to report the build status to the source provider, the user associated with the source provider must\nhave write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the CodeBuild User Guide.

\n

The status of a build triggered by a webhook is always reported to your source\n provider.

\n

If your project's builds are triggered by a webhook, you must push a\n new commit to the repo for a change to this property to take\n effect.

" + "smithy.api#documentation": "

Set to true to report the status of a build's start and finish to your source\n provider. This option is valid only when your source provider is GitHub, GitHub\n Enterprise, or Bitbucket. If this is set and you use a different source provider, an\n invalidInputException is thrown.

\n

To be able to report the build status to the source provider, the user associated with the source provider must\nhave write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the CodeBuild User Guide.

\n

The status of a build triggered by a webhook is always reported to your source\n provider.

\n

If your project's builds are triggered by a webhook, you must push a\n new commit to the repo for a change to this property to take\n effect.

" } }, "buildStatusConfig": { @@ -5459,7 +5787,7 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The source version for the corresponding source identifier. If specified, must be one\n of:

\n \n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

", + "smithy.api#documentation": "

The source version for the corresponding source identifier. If specified, must be one\n of:

\n \n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

", "smithy.api#required": {} } } @@ -5481,19 +5809,23 @@ } }, "com.amazonaws.codebuild#ProjectVisibilityType": { - "type": "string", - "traits": { - "smithy.api#documentation": "

Specifies the visibility of the project's builds. Possible values are:

\n\n
\n
PUBLIC_READ
\n
\n

The project builds are visible to the public.

\n
\n
PRIVATE
\n
\n

The project builds are not visible to the public.

\n
\n
", - "smithy.api#enum": [ - { - "value": "PUBLIC_READ", - "name": "PUBLIC_READ" - }, - { - "value": "PRIVATE", - "name": "PRIVATE" + "type": "enum", + "members": { + "PUBLIC_READ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PUBLIC_READ" + } + }, + "PRIVATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PRIVATE" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the visibility of the project's builds. Possible values are:

\n
\n
PUBLIC_READ
\n
\n

The project builds are visible to the public.

\n
\n
PRIVATE
\n
\n

The project builds are not visible to the public.

\n
\n
" } }, "com.amazonaws.codebuild#Projects": { @@ -5539,6 +5871,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#PutResourcePolicyOutput": { @@ -5550,6 +5885,9 @@ "smithy.api#documentation": "

The ARN of the Project or ReportGroup resource that is\n associated with a resource policy.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#RegistryCredential": { @@ -5558,7 +5896,7 @@ "credential": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) or name of credentials created using Secrets Manager.

\n \n

The credential can use the name of the credentials only if they\n exist in your current Amazon Web Services Region.

\n
", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) or name of credentials created using Secrets Manager.

\n \n

The credential can use the name of the credentials only if they\n exist in your current Amazon Web Services Region.

\n
", "smithy.api#required": {} } }, @@ -5571,7 +5909,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about credentials that provide access to a private Docker registry. When\n this is set:

\n \n

For more information, see Private Registry with\n Secrets Manager Sample for CodeBuild.

" + "smithy.api#documentation": "

Information about credentials that provide access to a private Docker registry. When\n this is set:

\n \n

For more information, see Private Registry with\n Secrets Manager Sample for CodeBuild.

" } }, "com.amazonaws.codebuild#Report": { @@ -5667,18 +6005,20 @@ } }, "com.amazonaws.codebuild#ReportCodeCoverageSortByType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "LINE_COVERAGE_PERCENTAGE", - "name": "LINE_COVERAGE_PERCENTAGE" - }, - { - "value": "FILE_PATH", - "name": "FILE_PATH" + "type": "enum", + "members": { + "LINE_COVERAGE_PERCENTAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINE_COVERAGE_PERCENTAGE" + } + }, + "FILE_PATH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FILE_PATH" } - ] + } } }, "com.amazonaws.codebuild#ReportExportConfig": { @@ -5687,7 +6027,7 @@ "exportConfigType": { "target": "com.amazonaws.codebuild#ReportExportConfigType", "traits": { - "smithy.api#documentation": "

The export configuration type. Valid values are:

\n " + "smithy.api#documentation": "

The export configuration type. Valid values are:

\n " } }, "s3Destination": { @@ -5702,18 +6042,20 @@ } }, "com.amazonaws.codebuild#ReportExportConfigType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "S3", - "name": "S3" - }, - { - "value": "NO_EXPORT", - "name": "NO_EXPORT" + "type": "enum", + "members": { + "S3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3" + } + }, + "NO_EXPORT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NO_EXPORT" } - ] + } } }, "com.amazonaws.codebuild#ReportFilter": { @@ -5772,7 +6114,7 @@ "tags": { "target": "com.amazonaws.codebuild#TagList", "traits": { - "smithy.api#documentation": "

A list of tag key and value pairs associated with this report group.

\n

These tags are available for use by Amazon Web Services services that support CodeBuild report group\n tags.

" + "smithy.api#documentation": "

A list of tag key and value pairs associated with this report group.

\n

These tags are available for use by Amazon Web Services services that support CodeBuild report group\n tags.

" } }, "status": { @@ -5808,80 +6150,102 @@ } }, "com.amazonaws.codebuild#ReportGroupSortByType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NAME", - "name": "NAME" - }, - { - "value": "CREATED_TIME", - "name": "CREATED_TIME" - }, - { - "value": "LAST_MODIFIED_TIME", - "name": "LAST_MODIFIED_TIME" + "type": "enum", + "members": { + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAME" + } + }, + "CREATED_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATED_TIME" } - ] + }, + "LAST_MODIFIED_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LAST_MODIFIED_TIME" + } + } } }, - "com.amazonaws.codebuild#ReportGroupStatusType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "DELETING", - "name": "DELETING" + "com.amazonaws.codebuild#ReportGroupStatusType": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" } - ] + } } }, "com.amazonaws.codebuild#ReportGroupTrendFieldType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PASS_RATE", - "name": "PASS_RATE" - }, - { - "value": "DURATION", - "name": "DURATION" - }, - { - "value": "TOTAL", - "name": "TOTAL" - }, - { - "value": "LINE_COVERAGE", - "name": "LINE_COVERAGE" - }, - { - "value": "LINES_COVERED", - "name": "LINES_COVERED" - }, - { - "value": "LINES_MISSED", - "name": "LINES_MISSED" - }, - { - "value": "BRANCH_COVERAGE", - "name": "BRANCH_COVERAGE" - }, - { - "value": "BRANCHES_COVERED", - "name": "BRANCHES_COVERED" - }, - { - "value": "BRANCHES_MISSED", - "name": "BRANCHES_MISSED" + "type": "enum", + "members": { + "PASS_RATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PASS_RATE" + } + }, + "DURATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DURATION" + } + }, + "TOTAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TOTAL" + } + }, + "LINE_COVERAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINE_COVERAGE" + } + }, + "LINES_COVERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINES_COVERED" + } + }, + "LINES_MISSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINES_MISSED" + } + }, + "BRANCH_COVERAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BRANCH_COVERAGE" + } + }, + "BRANCHES_COVERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BRANCHES_COVERED" } - ] + }, + "BRANCHES_MISSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BRANCHES_MISSED" + } + } } }, "com.amazonaws.codebuild#ReportGroupTrendRawDataList": { @@ -5929,18 +6293,20 @@ } }, "com.amazonaws.codebuild#ReportPackagingType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ZIP", - "name": "ZIP" - }, - { - "value": "NONE", - "name": "NONE" + "type": "enum", + "members": { + "ZIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZIP" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" } - ] + } } }, "com.amazonaws.codebuild#ReportStatusCounts": { @@ -5953,45 +6319,55 @@ } }, "com.amazonaws.codebuild#ReportStatusType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "GENERATING", - "name": "GENERATING" - }, - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "INCOMPLETE", - "name": "INCOMPLETE" - }, - { - "value": "DELETING", - "name": "DELETING" + "type": "enum", + "members": { + "GENERATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GENERATING" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" } - ] + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "INCOMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INCOMPLETE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + } } }, "com.amazonaws.codebuild#ReportType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "TEST", - "name": "TEST" - }, - { - "value": "CODE_COVERAGE", - "name": "CODE_COVERAGE" + "type": "enum", + "members": { + "TEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEST" + } + }, + "CODE_COVERAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CODE_COVERAGE" } - ] + } } }, "com.amazonaws.codebuild#ReportWithRawData": { @@ -6146,6 +6522,9 @@ "smithy.api#documentation": "

Specifies the type of retry to perform.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#RetryBuildBatchOutput": { @@ -6154,21 +6533,26 @@ "buildBatch": { "target": "com.amazonaws.codebuild#BuildBatch" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#RetryBuildBatchType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "RETRY_ALL_BUILDS", - "name": "RETRY_ALL_BUILDS" - }, - { - "value": "RETRY_FAILED_BUILDS", - "name": "RETRY_FAILED_BUILDS" + "type": "enum", + "members": { + "RETRY_ALL_BUILDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_ALL_BUILDS" } - ] + }, + "RETRY_FAILED_BUILDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RETRY_FAILED_BUILDS" + } + } } }, "com.amazonaws.codebuild#RetryBuildInput": { @@ -6186,6 +6570,9 @@ "smithy.api#documentation": "

A unique, case sensitive identifier you provide to ensure the idempotency of the\n RetryBuild request. The token is included in the\n RetryBuild request and is valid for five minutes. If you repeat\n the RetryBuild request with the same token, but change a parameter,\n CodeBuild returns a parameter mismatch error.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#RetryBuildOutput": { @@ -6194,6 +6581,9 @@ "build": { "target": "com.amazonaws.codebuild#Build" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#S3LogsConfig": { @@ -6202,7 +6592,7 @@ "status": { "target": "com.amazonaws.codebuild#LogsConfigStatusType", "traits": { - "smithy.api#documentation": "

The current status of the S3 build logs. Valid values are:

\n ", + "smithy.api#documentation": "

The current status of the S3 build logs. Valid values are:

\n ", "smithy.api#required": {} } }, @@ -6250,7 +6640,7 @@ "packaging": { "target": "com.amazonaws.codebuild#ReportPackagingType", "traits": { - "smithy.api#documentation": "

The type of build output artifact to create. Valid values include:

\n " + "smithy.api#documentation": "

The type of build output artifact to create. Valid values include:

\n " } }, "encryptionKey": { @@ -6292,52 +6682,60 @@ } }, "com.amazonaws.codebuild#ServerType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "GITHUB", - "name": "GITHUB" - }, - { - "value": "BITBUCKET", - "name": "BITBUCKET" - }, - { - "value": "GITHUB_ENTERPRISE", - "name": "GITHUB_ENTERPRISE" + "type": "enum", + "members": { + "GITHUB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GITHUB" + } + }, + "BITBUCKET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BITBUCKET" + } + }, + "GITHUB_ENTERPRISE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GITHUB_ENTERPRISE" } - ] + } } }, "com.amazonaws.codebuild#SharedResourceSortByType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ARN", - "name": "ARN" - }, - { - "value": "MODIFIED_TIME", - "name": "MODIFIED_TIME" + "type": "enum", + "members": { + "ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARN" + } + }, + "MODIFIED_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MODIFIED_TIME" } - ] + } } }, "com.amazonaws.codebuild#SortOrderType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ASCENDING", - "name": "ASCENDING" - }, - { - "value": "DESCENDING", - "name": "DESCENDING" + "type": "enum", + "members": { + "ASCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASCENDING" + } + }, + "DESCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESCENDING" } - ] + } } }, "com.amazonaws.codebuild#SourceAuth": { @@ -6346,7 +6744,7 @@ "type": { "target": "com.amazonaws.codebuild#SourceAuthType", "traits": { - "smithy.api#documentation": "\n

This data type is deprecated and is no longer accurate or used.

\n
\n

The authorization type to use. The only valid value is OAUTH, which\n represents the OAuth authorization type.

", + "smithy.api#documentation": "\n

This data type is deprecated and is no longer accurate or used.

\n
\n

The authorization type to use. The only valid value is OAUTH, which\n represents the OAuth authorization type.

", "smithy.api#required": {} } }, @@ -6358,18 +6756,18 @@ } }, "traits": { - "smithy.api#documentation": "

Information about the authorization settings for CodeBuild to access the source code to be\n built.

\n

This information is for the CodeBuild console's use only. Your code should not get or set\n this information directly.

" + "smithy.api#documentation": "

Information about the authorization settings for CodeBuild to access the source code to be\n built.

\n

This information is for the CodeBuild console's use only. Your code should not get or set\n this information directly.

" } }, "com.amazonaws.codebuild#SourceAuthType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "OAUTH", - "name": "OAUTH" + "type": "enum", + "members": { + "OAUTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OAUTH" } - ] + } } }, "com.amazonaws.codebuild#SourceCredentialsInfo": { @@ -6405,38 +6803,50 @@ } }, "com.amazonaws.codebuild#SourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CODECOMMIT", - "name": "CODECOMMIT" - }, - { - "value": "CODEPIPELINE", - "name": "CODEPIPELINE" - }, - { - "value": "GITHUB", - "name": "GITHUB" - }, - { - "value": "S3", - "name": "S3" - }, - { - "value": "BITBUCKET", - "name": "BITBUCKET" - }, - { - "value": "GITHUB_ENTERPRISE", - "name": "GITHUB_ENTERPRISE" - }, - { - "value": "NO_SOURCE", - "name": "NO_SOURCE" + "type": "enum", + "members": { + "CODECOMMIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CODECOMMIT" + } + }, + "CODEPIPELINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CODEPIPELINE" + } + }, + "GITHUB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GITHUB" + } + }, + "S3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3" + } + }, + "BITBUCKET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BITBUCKET" + } + }, + "GITHUB_ENTERPRISE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GITHUB_ENTERPRISE" + } + }, + "NO_SOURCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NO_SOURCE" } - ] + } } }, "com.amazonaws.codebuild#StartBuild": { @@ -6507,7 +6917,7 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The version of the batch build input to be built, for this build only. If not specified,\n the latest version is used. If specified, the contents depends on the source\n provider:

\n
\n
CodeCommit
\n
\n

The commit ID, branch, or Git tag to use.

\n
\n
GitHub
\n
\n

The commit ID, pull request ID, branch name, or tag name that corresponds\n to the version of the source code you want to build. If a pull request ID is\n specified, it must use the format pr/pull-request-ID (for\n example pr/25). If a branch name is specified, the branch's\n HEAD commit ID is used. If not specified, the default branch's HEAD commit\n ID is used.

\n
\n
Bitbucket
\n
\n

The commit ID, branch name, or tag name that corresponds to the version of\n the source code you want to build. If a branch name is specified, the\n branch's HEAD commit ID is used. If not specified, the default branch's HEAD\n commit ID is used.

\n
\n
Amazon S3
\n
\n

The version ID of the object that represents the build input ZIP file to\n use.

\n
\n
\n

If sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

" + "smithy.api#documentation": "

The version of the batch build input to be built, for this build only. If not specified,\n the latest version is used. If specified, the contents depends on the source\n provider:

\n
\n
CodeCommit
\n
\n

The commit ID, branch, or Git tag to use.

\n
\n
GitHub
\n
\n

The commit ID, pull request ID, branch name, or tag name that corresponds\n to the version of the source code you want to build. If a pull request ID is\n specified, it must use the format pr/pull-request-ID (for\n example pr/25). If a branch name is specified, the branch's\n HEAD commit ID is used. If not specified, the default branch's HEAD commit\n ID is used.

\n
\n
Bitbucket
\n
\n

The commit ID, branch name, or tag name that corresponds to the version of\n the source code you want to build. If a branch name is specified, the\n branch's HEAD commit ID is used. If not specified, the default branch's HEAD\n commit ID is used.

\n
\n
Amazon S3
\n
\n

The version ID of the object that represents the build input ZIP file to\n use.

\n
\n
\n

If sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

" } }, "artifactsOverride": { @@ -6657,7 +7067,7 @@ "imagePullCredentialsTypeOverride": { "target": "com.amazonaws.codebuild#ImagePullCredentialsType", "traits": { - "smithy.api#documentation": "

The type of credentials CodeBuild uses to pull images in your batch build. There are two valid\n values:

\n
\n
CODEBUILD
\n
\n

Specifies that CodeBuild uses its own credentials. This requires that you\n modify your ECR repository policy to trust CodeBuild's service principal.

\n
\n
SERVICE_ROLE
\n
\n

Specifies that CodeBuild uses your build project's service role.

\n
\n
\n

When using a cross-account or private registry image, you must use\n SERVICE_ROLE credentials. When using an CodeBuild curated image,\n you must use CODEBUILD credentials.

" + "smithy.api#documentation": "

The type of credentials CodeBuild uses to pull images in your batch build. There are two valid\n values:

\n
\n
CODEBUILD
\n
\n

Specifies that CodeBuild uses its own credentials. This requires that you\n modify your ECR repository policy to trust CodeBuild's service principal.

\n
\n
SERVICE_ROLE
\n
\n

Specifies that CodeBuild uses your build project's service role.

\n
\n
\n

When using a cross-account or private registry image, you must use\n SERVICE_ROLE credentials. When using an CodeBuild curated image,\n you must use CODEBUILD credentials.

" } }, "buildBatchConfigOverride": { @@ -6672,6 +7082,9 @@ "smithy.api#documentation": "

Specifies if session debugging is enabled for this batch build. For more information, see\n Viewing a running build in Session Manager. Batch session debugging is not supported for matrix batch builds.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#StartBuildBatchOutput": { @@ -6683,6 +7096,9 @@ "smithy.api#documentation": "

A BuildBatch object that contains information about the batch build.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#StartBuildInput": { @@ -6710,7 +7126,7 @@ "sourceVersion": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The version of the build input to be built, for this build only. If not specified,\n the latest version is used. If specified, the contents depends on the source\n provider:

\n
\n
CodeCommit
\n
\n

The commit ID, branch, or Git tag to use.

\n
\n
GitHub
\n
\n

The commit ID, pull request ID, branch name, or tag name that corresponds\n to the version of the source code you want to build. If a pull request ID is\n specified, it must use the format pr/pull-request-ID (for\n example pr/25). If a branch name is specified, the branch's\n HEAD commit ID is used. If not specified, the default branch's HEAD commit\n ID is used.

\n
\n
Bitbucket
\n
\n

The commit ID, branch name, or tag name that corresponds to the version of\n the source code you want to build. If a branch name is specified, the\n branch's HEAD commit ID is used. If not specified, the default branch's HEAD\n commit ID is used.

\n
\n
Amazon S3
\n
\n

The version ID of the object that represents the build input ZIP file to\n use.

\n
\n
\n

If sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

" + "smithy.api#documentation": "

The version of the build input to be built, for this build only. If not specified,\n the latest version is used. If specified, the contents depends on the source\n provider:

\n
\n
CodeCommit
\n
\n

The commit ID, branch, or Git tag to use.

\n
\n
GitHub
\n
\n

The commit ID, pull request ID, branch name, or tag name that corresponds\n to the version of the source code you want to build. If a pull request ID is\n specified, it must use the format pr/pull-request-ID (for\n example pr/25). If a branch name is specified, the branch's\n HEAD commit ID is used. If not specified, the default branch's HEAD commit\n ID is used.

\n
\n
Bitbucket
\n
\n

The commit ID, branch name, or tag name that corresponds to the version of\n the source code you want to build. If a branch name is specified, the\n branch's HEAD commit ID is used. If not specified, the default branch's HEAD\n commit ID is used.

\n
\n
Amazon S3
\n
\n

The version ID of the object that represents the build input ZIP file to\n use.

\n
\n
\n

If sourceVersion is specified at the project level, then this\n sourceVersion (at the build level) takes precedence.

\n

For more information, see Source Version Sample\n with CodeBuild in the CodeBuild User Guide.

" } }, "artifactsOverride": { @@ -6764,7 +7180,7 @@ "buildspecOverride": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

A buildspec file declaration that overrides, for this build only, the latest one\n already defined in the build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" + "smithy.api#documentation": "

A buildspec file declaration that overrides, for this build only, the latest one\n already defined in the build project.

\n

If this value is set, it can be either an inline buildspec definition, the path to an\n alternate buildspec file relative to the value of the built-in\n CODEBUILD_SRC_DIR environment variable, or the path to an S3 bucket.\n The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec\n file using its ARN (for example,\n arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not\n provided or is set to an empty string, the source code must contain a buildspec file in\n its root directory. For more information, see Buildspec File Name and Storage Location.

" } }, "insecureSslOverride": { @@ -6776,7 +7192,7 @@ "reportBuildStatusOverride": { "target": "com.amazonaws.codebuild#WrapperBoolean", "traits": { - "smithy.api#documentation": "

Set to true to report to your source provider the status of a build's start and\n completion. If you use this option with a source provider other than GitHub, GitHub\n Enterprise, or Bitbucket, an invalidInputException is thrown.

\n

To be able to report the build status to the source provider, the user associated with the source provider must\nhave write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the CodeBuild User Guide.

\n \n

The status of a build triggered by a webhook is always reported to your source\n provider.

\n
" + "smithy.api#documentation": "

Set to true to report to your source provider the status of a build's start and\n completion. If you use this option with a source provider other than GitHub, GitHub\n Enterprise, or Bitbucket, an invalidInputException is thrown.

\n

To be able to report the build status to the source provider, the user associated with the source provider must\nhave write access to the repo. If the user does not have write access, the build status cannot be updated. For more information, see Source provider access in the CodeBuild User Guide.

\n \n

The status of a build triggered by a webhook is always reported to your source\n provider.

\n
" } }, "buildStatusConfigOverride": { @@ -6842,7 +7258,7 @@ "encryptionKeyOverride": { "target": "com.amazonaws.codebuild#NonEmptyString", "traits": { - "smithy.api#documentation": "

The Key Management Service customer master key (CMK) that overrides the one specified in the build\n project. The CMK key encrypts the build output artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" + "smithy.api#documentation": "

The Key Management Service customer master key (CMK) that overrides the one specified in the build\n project. The CMK key encrypts the build output artifacts.

\n \n

You can use a cross-account KMS key to encrypt the build output artifacts if your\n service role has permission to that key.

\n
\n

You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using\n the format alias/).

" } }, "idempotencyToken": { @@ -6866,7 +7282,7 @@ "imagePullCredentialsTypeOverride": { "target": "com.amazonaws.codebuild#ImagePullCredentialsType", "traits": { - "smithy.api#documentation": "

The type of credentials CodeBuild uses to pull images in your build. There are two valid\n values:

\n
\n
CODEBUILD
\n
\n

Specifies that CodeBuild uses its own credentials. This requires that you\n modify your ECR repository policy to trust CodeBuild's service principal.

\n
\n
SERVICE_ROLE
\n
\n

Specifies that CodeBuild uses your build project's service role.

\n
\n
\n

When using a cross-account or private registry image, you must use\n SERVICE_ROLE credentials. When using an CodeBuild curated image,\n you must use CODEBUILD credentials.

" + "smithy.api#documentation": "

The type of credentials CodeBuild uses to pull images in your build. There are two valid\n values:

\n
\n
CODEBUILD
\n
\n

Specifies that CodeBuild uses its own credentials. This requires that you\n modify your ECR repository policy to trust CodeBuild's service principal.

\n
\n
SERVICE_ROLE
\n
\n

Specifies that CodeBuild uses your build project's service role.

\n
\n
\n

When using a cross-account or private registry image, you must use\n SERVICE_ROLE credentials. When using an CodeBuild curated image,\n you must use CODEBUILD credentials.

" } }, "debugSessionEnabled": { @@ -6875,6 +7291,9 @@ "smithy.api#documentation": "

Specifies if session debugging is enabled for this build. For more information, see\n Viewing a running build in Session Manager.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#StartBuildOutput": { @@ -6886,37 +7305,50 @@ "smithy.api#documentation": "

Information about the build to be run.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#StatusType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "FAULT", - "name": "FAULT" - }, - { - "value": "TIMED_OUT", - "name": "TIMED_OUT" - }, - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "STOPPED", - "name": "STOPPED" + "type": "enum", + "members": { + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "FAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAULT" + } + }, + "TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMED_OUT" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPED" } - ] + } } }, "com.amazonaws.codebuild#StopBuild": { @@ -6969,6 +7401,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#StopBuildBatchOutput": { @@ -6977,6 +7412,9 @@ "buildBatch": { "target": "com.amazonaws.codebuild#BuildBatch" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#StopBuildInput": { @@ -6989,6 +7427,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#StopBuildOutput": { @@ -7000,6 +7441,9 @@ "smithy.api#documentation": "

Information about the build.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#String": { @@ -7034,7 +7478,7 @@ } }, "traits": { - "smithy.api#documentation": "

A tag, consisting of a key and a value.

\n

This tag is available for use by Amazon Web Services services that support tags in CodeBuild.

" + "smithy.api#documentation": "

A tag, consisting of a key and a value.

\n

This tag is available for use by Amazon Web Services services that support tags in CodeBuild.

" } }, "com.amazonaws.codebuild#TagList": { @@ -7111,7 +7555,7 @@ "status": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

The status used to filter test cases. A TestCaseFilter can have one\n status. Valid values are:

\n " + "smithy.api#documentation": "

The status used to filter test cases. A TestCaseFilter can have one\n status. Valid values are:

\n " } }, "keyword": { @@ -7319,6 +7763,9 @@ "smithy.api#documentation": "

The maximum number of concurrent builds that are allowed for this project.

\n

New builds are only started if the current number of builds is less than or equal to this limit. \n If the current build count meets this limit, new builds are throttled and are not run.

\n

To remove this limit, set this value to -1.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#UpdateProjectOutput": { @@ -7330,6 +7777,9 @@ "smithy.api#documentation": "

Information about the build project that was changed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#UpdateProjectVisibility": { @@ -7374,6 +7824,9 @@ "smithy.api#documentation": "

The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for\n the project's builds.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#UpdateProjectVisibilityOutput": { @@ -7394,6 +7847,9 @@ "projectVisibility": { "target": "com.amazonaws.codebuild#ProjectVisibilityType" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#UpdateReportGroup": { @@ -7438,6 +7894,9 @@ "smithy.api#documentation": "

\n An updated list of tag key and value pairs associated with this report group.\n

\n

These tags are available for use by Amazon Web Services services that support CodeBuild report group\n tags.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#UpdateReportGroupOutput": { @@ -7449,6 +7908,9 @@ "smithy.api#documentation": "

\n Information about the updated report group.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#UpdateWebhook": { @@ -7509,6 +7971,9 @@ "smithy.api#documentation": "

Specifies the type of build this webhook will trigger.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codebuild#UpdateWebhookOutput": { @@ -7520,6 +7985,9 @@ "smithy.api#documentation": "

Information about a repository's webhook that is associated with a project in CodeBuild.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codebuild#ValueInput": { @@ -7609,18 +8077,20 @@ } }, "com.amazonaws.codebuild#WebhookBuildType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BUILD", - "name": "BUILD" - }, - { - "value": "BUILD_BATCH", - "name": "BUILD_BATCH" + "type": "enum", + "members": { + "BUILD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD" + } + }, + "BUILD_BATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD_BATCH" } - ] + } } }, "com.amazonaws.codebuild#WebhookFilter": { @@ -7629,14 +8099,14 @@ "type": { "target": "com.amazonaws.codebuild#WebhookFilterType", "traits": { - "smithy.api#documentation": "

The type of webhook filter. There are six webhook filter types: EVENT,\n ACTOR_ACCOUNT_ID, HEAD_REF, BASE_REF,\n FILE_PATH, and COMMIT_MESSAGE.

\n
\n
\n EVENT\n
\n
\n

A webhook event triggers a build when the provided pattern\n matches one of five event types: PUSH,\n PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED,\n PULL_REQUEST_REOPENED, and\n PULL_REQUEST_MERGED. The EVENT patterns are\n specified as a comma-separated string. For example, PUSH,\n PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull\n request created, and pull request updated events.

\n \n

The PULL_REQUEST_REOPENED works with GitHub and GitHub\n Enterprise only.

\n
\n
\n
\n ACTOR_ACCOUNT_ID\n
\n
\n

A webhook event triggers a build when a GitHub, GitHub Enterprise, or\n Bitbucket account ID matches the regular expression pattern.\n

\n
\n
\n HEAD_REF\n
\n
\n

A webhook event triggers a build when the head reference matches the\n regular expression pattern. For example,\n refs/heads/branch-name and refs/tags/tag-name.

\n

Works with GitHub and GitHub Enterprise push, GitHub and GitHub\n Enterprise pull request, Bitbucket push, and Bitbucket pull request events.\n

\n
\n
\n BASE_REF\n
\n
\n

A webhook event triggers a build when the base reference matches the\n regular expression pattern. For example,\n refs/heads/branch-name.

\n \n

Works with pull request events only.

\n
\n
\n
\n FILE_PATH\n
\n
\n

A webhook triggers a build when the path of a changed file matches the\n regular expression pattern.

\n \n

Works with GitHub and Bitbucket events push and pull requests events.\n Also works with GitHub Enterprise push events, but does not work with\n GitHub Enterprise pull request events.

\n
\n
\n
COMMIT_MESSAGE
\n
\n

A webhook triggers a build when the head commit message matches the\n regular expression pattern.

\n \n

Works with GitHub and Bitbucket events push and pull requests events.\n Also works with GitHub Enterprise push events, but does not work with\n GitHub Enterprise pull request events.

\n
\n
\n
", + "smithy.api#documentation": "

The type of webhook filter. There are six webhook filter types: EVENT,\n ACTOR_ACCOUNT_ID, HEAD_REF, BASE_REF,\n FILE_PATH, and COMMIT_MESSAGE.

\n
\n
\n EVENT\n
\n
\n

A webhook event triggers a build when the provided pattern\n matches one of five event types: PUSH,\n PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED,\n PULL_REQUEST_REOPENED, and\n PULL_REQUEST_MERGED. The EVENT patterns are\n specified as a comma-separated string. For example, PUSH,\n PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED filters all push, pull\n request created, and pull request updated events.

\n \n

The PULL_REQUEST_REOPENED works with GitHub and GitHub\n Enterprise only.

\n
\n
\n
\n ACTOR_ACCOUNT_ID\n
\n
\n

A webhook event triggers a build when a GitHub, GitHub Enterprise, or\n Bitbucket account ID matches the regular expression pattern.\n

\n
\n
\n HEAD_REF\n
\n
\n

A webhook event triggers a build when the head reference matches the\n regular expression pattern. For example,\n refs/heads/branch-name and refs/tags/tag-name.

\n

Works with GitHub and GitHub Enterprise push, GitHub and GitHub\n Enterprise pull request, Bitbucket push, and Bitbucket pull request events.\n

\n
\n
\n BASE_REF\n
\n
\n

A webhook event triggers a build when the base reference matches the\n regular expression pattern. For example,\n refs/heads/branch-name.

\n \n

Works with pull request events only.

\n
\n
\n
\n FILE_PATH\n
\n
\n

A webhook triggers a build when the path of a changed file matches the\n regular expression pattern.

\n \n

Works with GitHub and Bitbucket events push and pull requests events.\n Also works with GitHub Enterprise push events, but does not work with\n GitHub Enterprise pull request events.

\n
\n
\n
COMMIT_MESSAGE
\n
\n

A webhook triggers a build when the head commit message matches the\n regular expression pattern.

\n \n

Works with GitHub and Bitbucket events push and pull requests events.\n Also works with GitHub Enterprise push events, but does not work with\n GitHub Enterprise pull request events.

\n
\n
\n
", "smithy.api#required": {} } }, "pattern": { "target": "com.amazonaws.codebuild#String", "traits": { - "smithy.api#documentation": "

For a WebHookFilter that uses EVENT type, a comma-separated\n string that specifies one or more events. For example, the webhook filter PUSH,\n PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request\n created, and pull request updated events to trigger a build.

\n

For a WebHookFilter that uses any of the other filter types, a regular\n expression pattern. For example, a WebHookFilter that uses\n HEAD_REF for its type and the pattern\n ^refs/heads/ triggers a build when the head reference is a branch with\n a reference name refs/heads/branch-name.

", + "smithy.api#documentation": "

For a WebHookFilter that uses EVENT type, a comma-separated\n string that specifies one or more events. For example, the webhook filter PUSH,\n PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED allows all push, pull request\n created, and pull request updated events to trigger a build.

\n

For a WebHookFilter that uses any of the other filter types, a regular\n expression pattern. For example, a WebHookFilter that uses\n HEAD_REF for its type and the pattern\n ^refs/heads/ triggers a build when the head reference is a branch with\n a reference name refs/heads/branch-name.

", "smithy.api#required": {} } }, @@ -7652,34 +8122,44 @@ } }, "com.amazonaws.codebuild#WebhookFilterType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EVENT", - "name": "EVENT" - }, - { - "value": "BASE_REF", - "name": "BASE_REF" - }, - { - "value": "HEAD_REF", - "name": "HEAD_REF" - }, - { - "value": "ACTOR_ACCOUNT_ID", - "name": "ACTOR_ACCOUNT_ID" - }, - { - "value": "FILE_PATH", - "name": "FILE_PATH" - }, - { - "value": "COMMIT_MESSAGE", - "name": "COMMIT_MESSAGE" + "type": "enum", + "members": { + "EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT" } - ] + }, + "BASE_REF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BASE_REF" + } + }, + "HEAD_REF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HEAD_REF" + } + }, + "ACTOR_ACCOUNT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTOR_ACCOUNT_ID" + } + }, + "FILE_PATH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FILE_PATH" + } + }, + "COMMIT_MESSAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMMIT_MESSAGE" + } + } } }, "com.amazonaws.codebuild#WrapperBoolean": { diff --git a/codegen/sdk-codegen/aws-models/codecatalyst.json b/codegen/sdk-codegen/aws-models/codecatalyst.json index 8abfcde1f87..59c77dff24b 100644 --- a/codegen/sdk-codegen/aws-models/codecatalyst.json +++ b/codegen/sdk-codegen/aws-models/codecatalyst.json @@ -156,7 +156,7 @@ "smithy.api#httpBearerAuth": {}, "smithy.api#title": "Amazon CodeCatalyst", "smithy.rules#endpointRuleSet": { - "version": "1.3", + "version": "1.0", "parameters": { "UseFIPS": { "builtIn": "AWS::UseFIPS", @@ -180,50 +180,60 @@ }, "rules": [ { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "not", + "argv": [ { "fn": "isSet", "argv": [ { - "ref": "Endpoint" + "ref": "Region" } ] } - ], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + ] }, + { + "fn": "aws.partition", + "argv": [ + "us-west-2" + ], + "assign": "PartitionResult" + } + ], + "type": "tree", + "rules": [ { "conditions": [ { - "fn": "not", + "fn": "booleanEquals", "argv": [ { - "fn": "isSet", - "argv": [ - { - "ref": "Region" - } - ] - } + "ref": "UseFIPS" + }, + true ] - }, - { - "fn": "aws.partition", - "argv": [ - "us-west-2" - ], - "assign": "PartitionResult" } ], "type": "tree", @@ -234,50 +244,25 @@ "fn": "booleanEquals", "argv": [ { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] + "ref": "PartitionResult" }, - false + "supportsFIPS" ] - } - ], - "error": "Partition does not support FIPS.", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": "https://codecatalyst-fips.global.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + }, + false + ] } - ] + ], + "error": "Partition does not support FIPS.", + "type": "error" }, { "conditions": [], "endpoint": { - "url": "https://codecatalyst.global.{PartitionResult#dualStackDnsSuffix}", + "url": "https://codecatalyst-fips.global.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, @@ -285,24 +270,49 @@ } ] }, + { + "conditions": [], + "endpoint": { + "url": "https://codecatalyst.global.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + }, + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "type": "tree", + "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } + "ref": "UseFIPS" + }, + true ] - }, - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "PartitionResult" } ], "type": "tree", @@ -313,62 +323,47 @@ "fn": "booleanEquals", "argv": [ { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] + "ref": "PartitionResult" }, - false + "supportsFIPS" ] - } - ], - "error": "Partition does not support FIPS.", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": "https://codecatalyst-fips.global.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + }, + false + ] } - ] + ], + "error": "Partition does not support FIPS.", + "type": "error" }, { "conditions": [], "endpoint": { - "url": "https://codecatalyst.global.{PartitionResult#dualStackDnsSuffix}", + "url": "https://codecatalyst-fips.global.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codecatalyst.global.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] } ] }, "smithy.rules#endpointTests": { + "version": "1", "testCases": [ { "documentation": "Override endpoint", @@ -387,7 +382,8 @@ "endpoint": { "url": "https://codecatalyst.global.api.aws" } - } + }, + "params": {} }, { "documentation": "Default FIPS endpoint (region not set)", @@ -469,8 +465,7 @@ "UseFIPS": true } } - ], - "version": "1.0" + ] } } }, diff --git a/codegen/sdk-codegen/aws-models/codedeploy.json b/codegen/sdk-codegen/aws-models/codedeploy.json index 046ef025b30..11f34c0b4b6 100644 --- a/codegen/sdk-codegen/aws-models/codedeploy.json +++ b/codegen/sdk-codegen/aws-models/codedeploy.json @@ -70,7 +70,7 @@ "tags": { "target": "com.amazonaws.codedeploy#TagList", "traits": { - "smithy.api#documentation": "

The tag key-value pairs to add to the on-premises instances.

\n

Keys and values are both required. Keys cannot be null or empty strings. Value-only\n tags are not allowed.

", + "smithy.api#documentation": "

The tag key-value pairs to add to the on-premises instances.

\n

Keys and values are both required. Keys cannot be null or empty strings. Value-only\n tags are not allowed.

", "smithy.api#required": {} } }, @@ -83,7 +83,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of, and adds tags to, an on-premises instance operation.

" + "smithy.api#documentation": "

Represents the input of, and adds tags to, an on-premises instance operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#AdditionalDeploymentStatusInfo": { @@ -122,7 +123,7 @@ "target": "com.amazonaws.codedeploy#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Indicates whether a deployment should continue if information about the current state\n of alarms cannot be retrieved from Amazon CloudWatch. The default value is false.

\n " + "smithy.api#documentation": "

Indicates whether a deployment should continue if information about the current state\n of alarms cannot be retrieved from Amazon CloudWatch. The default value is false.

\n " } }, "alarms": { @@ -166,7 +167,7 @@ "content": { "target": "com.amazonaws.codedeploy#RawStringContent", "traits": { - "smithy.api#documentation": "

The YAML-formatted or JSON-formatted revision string.

\n

For an Lambda deployment, the content includes a Lambda\n function name, the alias for its original version, and the alias for its replacement\n version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

\n

For an Amazon ECS deployment, the content includes the task name, information\n about the load balancer that serves traffic to the container, and more.

\n

For both types of deployments, the content can specify Lambda functions\n that run at specified hooks, such as BeforeInstall, during a deployment.\n

" + "smithy.api#documentation": "

The YAML-formatted or JSON-formatted revision string.

\n

For an Lambda deployment, the content includes a Lambda\n function name, the alias for its original version, and the alias for its replacement\n version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.

\n

For an Amazon ECS deployment, the content includes the task name, information\n about the load balancer that serves traffic to the container, and more.

\n

For both types of deployments, the content can specify Lambda functions\n that run at specified hooks, such as BeforeInstall, during a deployment.\n

" } }, "sha256": { @@ -495,7 +496,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a BatchGetApplicationRevisions operation.

" + "smithy.api#documentation": "

Represents the input of a BatchGetApplicationRevisions operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#BatchGetApplicationRevisionsOutput": { @@ -521,7 +523,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a BatchGetApplicationRevisions operation.

" + "smithy.api#documentation": "

Represents the output of a BatchGetApplicationRevisions operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#BatchGetApplications": { @@ -562,7 +565,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a BatchGetApplications operation.

" + "smithy.api#documentation": "

Represents the input of a BatchGetApplications operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#BatchGetApplicationsOutput": { @@ -576,7 +580,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a BatchGetApplications operation.

" + "smithy.api#documentation": "

Represents the output of a BatchGetApplications operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#BatchGetDeploymentGroups": { @@ -633,7 +638,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a BatchGetDeploymentGroups operation.

" + "smithy.api#documentation": "

Represents the input of a BatchGetDeploymentGroups operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#BatchGetDeploymentGroupsOutput": { @@ -653,7 +659,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a BatchGetDeploymentGroups operation.

" + "smithy.api#documentation": "

Represents the output of a BatchGetDeploymentGroups operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#BatchGetDeploymentInstances": { @@ -691,7 +698,7 @@ "smithy.api#deprecated": { "message": "This operation is deprecated, use BatchGetDeploymentTargets instead." }, - "smithy.api#documentation": "\n

This method works, but is deprecated. Use BatchGetDeploymentTargets\n instead.

\n
\n

Returns an array of one or more instances associated with a deployment. This method\n works with EC2/On-premises and Lambda compute platforms. The newer\n BatchGetDeploymentTargets works with all compute platforms. The maximum\n number of instances that can be returned is 25.

" + "smithy.api#documentation": "\n

This method works, but is deprecated. Use BatchGetDeploymentTargets\n instead.

\n
\n

Returns an array of one or more instances associated with a deployment. This method\n works with EC2/On-premises and Lambda compute platforms. The newer\n BatchGetDeploymentTargets works with all compute platforms. The maximum\n number of instances that can be returned is 25.

" } }, "com.amazonaws.codedeploy#BatchGetDeploymentInstancesInput": { @@ -713,7 +720,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a BatchGetDeploymentInstances operation.

" + "smithy.api#documentation": "

Represents the input of a BatchGetDeploymentInstances operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#BatchGetDeploymentInstancesOutput": { @@ -733,7 +741,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a BatchGetDeploymentInstances operation.

" + "smithy.api#documentation": "

Represents the output of a BatchGetDeploymentInstances operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#BatchGetDeploymentTargets": { @@ -774,7 +783,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns an array of one or more targets associated with a deployment. This method\n works with all compute types and should be used instead of the deprecated\n BatchGetDeploymentInstances. The maximum number of targets that can be\n returned is 25.

\n

The type of targets returned depends on the deployment's compute platform or\n deployment method:

\n " + "smithy.api#documentation": "

Returns an array of one or more targets associated with a deployment. This method\n works with all compute types and should be used instead of the deprecated\n BatchGetDeploymentInstances. The maximum number of targets that can be\n returned is 25.

\n

The type of targets returned depends on the deployment's compute platform or\n deployment method:

\n " } }, "com.amazonaws.codedeploy#BatchGetDeploymentTargetsInput": { @@ -789,9 +798,12 @@ "targetIds": { "target": "com.amazonaws.codedeploy#TargetIdList", "traits": { - "smithy.api#documentation": "

The unique IDs of the deployment targets. The compute platform of the deployment\n determines the type of the targets and their formats. The maximum number of deployment\n target IDs you can specify is 25.

\n " + "smithy.api#documentation": "

The unique IDs of the deployment targets. The compute platform of the deployment\n determines the type of the targets and their formats. The maximum number of deployment\n target IDs you can specify is 25.

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#BatchGetDeploymentTargetsOutput": { @@ -800,9 +812,12 @@ "deploymentTargets": { "target": "com.amazonaws.codedeploy#DeploymentTargetList", "traits": { - "smithy.api#documentation": "

A list of target objects for a deployment. Each target object contains details about\n the target, such as its status and lifecycle events. The type of the target objects\n depends on the deployment' compute platform.

\n " + "smithy.api#documentation": "

A list of target objects for a deployment. Each target object contains details about\n the target, such as its status and lifecycle events. The type of the target objects\n depends on the deployment' compute platform.

\n " } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#BatchGetDeployments": { @@ -840,7 +855,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a BatchGetDeployments operation.

" + "smithy.api#documentation": "

Represents the input of a BatchGetDeployments operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#BatchGetDeploymentsOutput": { @@ -854,7 +870,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a BatchGetDeployments operation.

" + "smithy.api#documentation": "

Represents the output of a BatchGetDeployments operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#BatchGetOnPremisesInstances": { @@ -892,7 +909,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a BatchGetOnPremisesInstances operation.

" + "smithy.api#documentation": "

Represents the input of a BatchGetOnPremisesInstances operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#BatchGetOnPremisesInstancesOutput": { @@ -906,7 +924,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a BatchGetOnPremisesInstances operation.

" + "smithy.api#documentation": "

Represents the output of a BatchGetOnPremisesInstances operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#BatchLimitExceededException": { @@ -956,14 +975,14 @@ "action": { "target": "com.amazonaws.codedeploy#InstanceAction", "traits": { - "smithy.api#documentation": "

The action to take on instances in the original environment after a successful\n blue/green deployment.

\n " + "smithy.api#documentation": "

The action to take on instances in the original environment after a successful\n blue/green deployment.

\n " } }, "terminationWaitTimeInMinutes": { "target": "com.amazonaws.codedeploy#Duration", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

For an Amazon EC2 deployment, the number of minutes to wait after a successful\n blue/green deployment before terminating instances from the original environment.

\n\n

For an Amazon ECS deployment, the number of minutes before deleting the\n original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts\n traffic from the original (blue) task set to a replacement (green) task set.

\n\n

The maximum setting is 2880 minutes (2 days).

" + "smithy.api#documentation": "

For an Amazon EC2 deployment, the number of minutes to wait after a successful\n blue/green deployment before terminating instances from the original environment.

\n

For an Amazon ECS deployment, the number of minutes before deleting the\n original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts\n traffic from the original (blue) task set to a replacement (green) task set.

\n

The maximum setting is 2880 minutes (2 days).

" } } }, @@ -1239,7 +1258,7 @@ "name": "codedeploy" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

CodeDeploy is a deployment service that automates application deployments\n to Amazon EC2 instances, on-premises instances running in your own facility,\n serverless Lambda functions, or applications in an Amazon ECS\n service.

\n

You can deploy a nearly unlimited variety of application content, such as an updated\n Lambda function, updated applications in an Amazon ECS service,\n code, web and configuration files, executables, packages, scripts, multimedia files, and\n so on. CodeDeploy can deploy application content stored in Amazon S3\n buckets, GitHub repositories, or Bitbucket repositories. You do not need to make changes\n to your existing code before you can use CodeDeploy.

\n

CodeDeploy makes it easier for you to rapidly release new features, helps\n you avoid downtime during application deployment, and handles the complexity of updating\n your applications, without many of the risks associated with error-prone manual\n deployments.

\n

\n CodeDeploy Components\n

\n

Use the information in this guide to help you work with the following CodeDeploy components:

\n \n

This guide also contains information to help you get details about the instances in\n your deployments, to make on-premises instances available for CodeDeploy\n deployments, to get details about a Lambda function deployment, and to get\n details about Amazon ECS service deployments.

\n

\n CodeDeploy Information Resources\n

\n ", + "smithy.api#documentation": "

CodeDeploy is a deployment service that automates application deployments\n to Amazon EC2 instances, on-premises instances running in your own facility,\n serverless Lambda functions, or applications in an Amazon ECS\n service.

\n

You can deploy a nearly unlimited variety of application content, such as an updated\n Lambda function, updated applications in an Amazon ECS service,\n code, web and configuration files, executables, packages, scripts, multimedia files, and\n so on. CodeDeploy can deploy application content stored in Amazon S3\n buckets, GitHub repositories, or Bitbucket repositories. You do not need to make changes\n to your existing code before you can use CodeDeploy.

\n

CodeDeploy makes it easier for you to rapidly release new features, helps\n you avoid downtime during application deployment, and handles the complexity of updating\n your applications, without many of the risks associated with error-prone manual\n deployments.

\n

\n CodeDeploy Components\n

\n

Use the information in this guide to help you work with the following CodeDeploy components:

\n \n

This guide also contains information to help you get details about the instances in\n your deployments, to make on-premises instances available for CodeDeploy\n deployments, to get details about a Lambda function deployment, and to get\n details about Amazon ECS service deployments.

\n

\n CodeDeploy Information Resources\n

\n ", "smithy.api#title": "AWS CodeDeploy", "smithy.api#xmlNamespace": { "uri": "http://codedeploy.amazonaws.com/doc/2014-10-06/" @@ -1304,52 +1323,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1357,13 +1380,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1373,224 +1405,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codedeploy-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://codedeploy-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codedeploy-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://codedeploy-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codedeploy.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://codedeploy.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://codedeploy.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codedeploy.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1605,8 +1588,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1618,8 +1601,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1631,8 +1614,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1644,8 +1627,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1657,8 +1640,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1670,8 +1653,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1683,8 +1666,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1696,8 +1679,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1709,8 +1692,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1722,8 +1705,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1735,8 +1718,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1748,8 +1731,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1761,8 +1744,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1774,8 +1757,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1787,8 +1770,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1800,8 +1783,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1813,8 +1796,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1826,8 +1809,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1839,8 +1822,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1852,8 +1835,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1865,8 +1848,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1878,8 +1861,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1891,8 +1874,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1904,8 +1887,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1917,8 +1900,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1930,8 +1913,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1943,8 +1926,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1956,8 +1939,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1969,8 +1952,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1982,8 +1965,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1995,8 +1978,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2008,8 +1991,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2021,8 +2004,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2034,8 +2017,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2047,8 +2030,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2060,8 +2043,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2073,8 +2056,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2086,8 +2069,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2099,8 +2082,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2112,8 +2095,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2125,8 +2108,19 @@ }, "params": { "Region": "us-iso-west-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2138,8 +2132,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2151,8 +2156,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2164,8 +2180,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2177,8 +2204,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2190,8 +2217,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2202,8 +2229,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2214,10 +2241,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2303,6 +2336,9 @@ "smithy.api#documentation": "

The status of the deployment's waiting period. READY_WAIT indicates that\n the deployment is ready to start shifting traffic. TERMINATION_WAIT\n indicates that the traffic is shifted, but the original target is not terminated.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#CreateApplication": { @@ -2361,7 +2397,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateApplication operation.

" + "smithy.api#documentation": "

Represents the input of a CreateApplication operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#CreateApplicationOutput": { @@ -2375,7 +2412,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateApplication operation.

" + "smithy.api#documentation": "

Represents the output of a CreateApplication operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#CreateDeployment": { @@ -2518,7 +2556,7 @@ "minimumHealthyHosts": { "target": "com.amazonaws.codedeploy#MinimumHealthyHosts", "traits": { - "smithy.api#documentation": "

The minimum number of healthy instances that should be available at any time during\n the deployment. There are two parameters expected in the input: type and value.

\n

The type parameter takes either of the following values:

\n \n

The value parameter takes an integer.

\n

For example, to set a minimum of 95% healthy instance, specify a type of FLEET_PERCENT\n and a value of 95.

" + "smithy.api#documentation": "

The minimum number of healthy instances that should be available at any time during\n the deployment. There are two parameters expected in the input: type and value.

\n

The type parameter takes either of the following values:

\n \n

The value parameter takes an integer.

\n

For example, to set a minimum of 95% healthy instance, specify a type of FLEET_PERCENT\n and a value of 95.

" } }, "trafficRoutingConfig": { @@ -2535,7 +2573,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateDeploymentConfig operation.

" + "smithy.api#documentation": "

Represents the input of a CreateDeploymentConfig operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#CreateDeploymentConfigOutput": { @@ -2549,7 +2588,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateDeploymentConfig operation.

" + "smithy.api#documentation": "

Represents the output of a CreateDeploymentConfig operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#CreateDeploymentGroup": { @@ -2685,7 +2725,7 @@ "deploymentConfigName": { "target": "com.amazonaws.codedeploy#DeploymentConfigName", "traits": { - "smithy.api#documentation": "

If specified, the deployment configuration name can be either one of the predefined\n configurations provided with CodeDeploy or a custom deployment configuration\n that you create by calling the create deployment configuration operation.

\n

\n CodeDeployDefault.OneAtATime is the default deployment configuration. It\n is used if a configuration isn't specified for the deployment or deployment\n group.

\n

For more information about the predefined deployment configurations in CodeDeploy, see Working with\n Deployment Configurations in CodeDeploy in the CodeDeploy User Guide.

" + "smithy.api#documentation": "

If specified, the deployment configuration name can be either one of the predefined\n configurations provided with CodeDeploy or a custom deployment configuration\n that you create by calling the create deployment configuration operation.

\n

\n CodeDeployDefault.OneAtATime is the default deployment configuration. It\n is used if a configuration isn't specified for the deployment or deployment\n group.

\n

For more information about the predefined deployment configurations in CodeDeploy, see Working with\n Deployment Configurations in CodeDeploy in the CodeDeploy User Guide.

" } }, "ec2TagFilters": { @@ -2734,7 +2774,7 @@ "outdatedInstancesStrategy": { "target": "com.amazonaws.codedeploy#OutdatedInstancesStrategy", "traits": { - "smithy.api#documentation": "

Indicates what happens when new Amazon EC2 instances are launched\n mid-deployment and do not receive the deployed application revision.

\n

If this option is set to UPDATE or is unspecified, CodeDeploy initiates\n one or more 'auto-update outdated instances' deployments to apply the deployed\n application revision to the new Amazon EC2 instances.

\n

If this option is set to IGNORE, CodeDeploy does not initiate a\n deployment to update the new Amazon EC2 instances. This may result in instances\n having different revisions.

" + "smithy.api#documentation": "

Indicates what happens when new Amazon EC2 instances are launched\n mid-deployment and do not receive the deployed application revision.

\n

If this option is set to UPDATE or is unspecified, CodeDeploy initiates\n one or more 'auto-update outdated instances' deployments to apply the deployed\n application revision to the new Amazon EC2 instances.

\n

If this option is set to IGNORE, CodeDeploy does not initiate a\n deployment to update the new Amazon EC2 instances. This may result in instances\n having different revisions.

" } }, "deploymentStyle": { @@ -2781,7 +2821,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateDeploymentGroup operation.

" + "smithy.api#documentation": "

Represents the input of a CreateDeploymentGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#CreateDeploymentGroupOutput": { @@ -2795,7 +2836,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateDeploymentGroup operation.

" + "smithy.api#documentation": "

Represents the output of a CreateDeploymentGroup operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#CreateDeploymentInput": { @@ -2823,7 +2865,7 @@ "deploymentConfigName": { "target": "com.amazonaws.codedeploy#DeploymentConfigName", "traits": { - "smithy.api#documentation": "

The name of a deployment configuration associated with the IAM user or\n Amazon Web Services account.

\n

If not specified, the value configured in the deployment group is used as the default.\n If the deployment group does not have a deployment configuration associated with it,\n CodeDeployDefault.OneAtATime is used by default.

" + "smithy.api#documentation": "

The name of a deployment configuration associated with the IAM user or\n Amazon Web Services account.

\n

If not specified, the value configured in the deployment group is used as the default.\n If the deployment group does not have a deployment configuration associated with it,\n CodeDeployDefault.OneAtATime is used by default.

" } }, "description": { @@ -2836,7 +2878,7 @@ "target": "com.amazonaws.codedeploy#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

If true, then if an ApplicationStop, BeforeBlockTraffic, or\n AfterBlockTraffic deployment lifecycle event to an instance fails, then\n the deployment continues to the next deployment lifecycle event. For example, if\n ApplicationStop fails, the deployment continues with\n DownloadBundle. If BeforeBlockTraffic fails, the\n deployment continues with BlockTraffic. If AfterBlockTraffic\n fails, the deployment continues with ApplicationStop.

\n\n

If false or not specified, then if a lifecycle event fails during a deployment to an\n instance, that deployment fails. If deployment to that instance is part of an overall\n deployment and the number of healthy hosts is not less than the minimum number of\n healthy hosts, then a deployment to the next instance is attempted.

\n\n

During a deployment, the CodeDeploy agent runs the scripts specified for\n ApplicationStop, BeforeBlockTraffic, and\n AfterBlockTraffic in the AppSpec file from the previous successful\n deployment. (All other scripts are run from the AppSpec file in the current deployment.)\n If one of these scripts contains an error and does not run successfully, the deployment\n can fail.

\n\n

If the cause of the failure is a script from the last successful deployment that will\n never run successfully, create a new deployment and use\n ignoreApplicationStopFailures to specify that the\n ApplicationStop, BeforeBlockTraffic, and\n AfterBlockTraffic failures should be ignored.

" + "smithy.api#documentation": "

If true, then if an ApplicationStop, BeforeBlockTraffic, or\n AfterBlockTraffic deployment lifecycle event to an instance fails, then\n the deployment continues to the next deployment lifecycle event. For example, if\n ApplicationStop fails, the deployment continues with\n DownloadBundle. If BeforeBlockTraffic fails, the\n deployment continues with BlockTraffic. If AfterBlockTraffic\n fails, the deployment continues with ApplicationStop.

\n

If false or not specified, then if a lifecycle event fails during a deployment to an\n instance, that deployment fails. If deployment to that instance is part of an overall\n deployment and the number of healthy hosts is not less than the minimum number of\n healthy hosts, then a deployment to the next instance is attempted.

\n

During a deployment, the CodeDeploy agent runs the scripts specified for\n ApplicationStop, BeforeBlockTraffic, and\n AfterBlockTraffic in the AppSpec file from the previous successful\n deployment. (All other scripts are run from the AppSpec file in the current deployment.)\n If one of these scripts contains an error and does not run successfully, the deployment\n can fail.

\n

If the cause of the failure is a script from the last successful deployment that will\n never run successfully, create a new deployment and use\n ignoreApplicationStopFailures to specify that the\n ApplicationStop, BeforeBlockTraffic, and\n AfterBlockTraffic failures should be ignored.

" } }, "targetInstances": { @@ -2861,18 +2903,19 @@ "fileExistsBehavior": { "target": "com.amazonaws.codedeploy#FileExistsBehavior", "traits": { - "smithy.api#documentation": "

Information about how CodeDeploy handles files that already exist in a\n deployment target location but weren't part of the previous successful\n deployment.

\n

The fileExistsBehavior parameter takes any of the following\n values:

\n " + "smithy.api#documentation": "

Information about how CodeDeploy handles files that already exist in a\n deployment target location but weren't part of the previous successful\n deployment.

\n

The fileExistsBehavior parameter takes any of the following\n values:

\n " } }, "overrideAlarmConfiguration": { "target": "com.amazonaws.codedeploy#AlarmConfiguration", "traits": { - "smithy.api#documentation": "

Allows you to specify information about alarms associated with a deployment. The alarm\n configuration that you specify here will override the alarm configuration at the\n deployment group level. Consider overriding the alarm configuration if you have set up\n alarms at the deployment group level that are causing deployment failures. In this case,\n you would call CreateDeployment to create a new deployment that uses a\n previous application revision that is known to work, and set its alarm configuration to\n turn off alarm polling. Turning off alarm polling ensures that the new deployment\n proceeds without being blocked by the alarm that was generated by the previous, failed,\n deployment.

\n \n

If you specify an overrideAlarmConfiguration, you need the\n UpdateDeploymentGroup IAM permission when calling\n CreateDeployment.

\n
" + "smithy.api#documentation": "

Allows you to specify information about alarms associated with a deployment. The alarm\n configuration that you specify here will override the alarm configuration at the\n deployment group level. Consider overriding the alarm configuration if you have set up\n alarms at the deployment group level that are causing deployment failures. In this case,\n you would call CreateDeployment to create a new deployment that uses a\n previous application revision that is known to work, and set its alarm configuration to\n turn off alarm polling. Turning off alarm polling ensures that the new deployment\n proceeds without being blocked by the alarm that was generated by the previous, failed,\n deployment.

\n \n

If you specify an overrideAlarmConfiguration, you need the\n UpdateDeploymentGroup IAM permission when calling\n CreateDeployment.

\n
" } } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateDeployment operation.

" + "smithy.api#documentation": "

Represents the input of a CreateDeployment operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#CreateDeploymentOutput": { @@ -2886,7 +2929,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateDeployment operation.

" + "smithy.api#documentation": "

Represents the output of a CreateDeployment operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#DeleteApplication": { @@ -2924,7 +2968,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteApplication operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteApplication operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#DeleteDeploymentConfig": { @@ -2950,7 +2995,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a deployment configuration.

\n \n

A deployment configuration cannot be deleted if it is currently in use. Predefined\n configurations cannot be deleted.

\n
" + "smithy.api#documentation": "

Deletes a deployment configuration.

\n \n

A deployment configuration cannot be deleted if it is currently in use. Predefined\n configurations cannot be deleted.

\n
" } }, "com.amazonaws.codedeploy#DeleteDeploymentConfigInput": { @@ -2965,7 +3010,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteDeploymentConfig operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteDeploymentConfig operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#DeleteDeploymentGroup": { @@ -3016,7 +3062,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteDeploymentGroup operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteDeploymentGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#DeleteDeploymentGroupOutput": { @@ -3030,7 +3077,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DeleteDeploymentGroup operation.

" + "smithy.api#documentation": "

Represents the output of a DeleteDeploymentGroup operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#DeleteGitHubAccountToken": { @@ -3073,7 +3121,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteGitHubAccount operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteGitHubAccount operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#DeleteGitHubAccountTokenOutput": { @@ -3087,7 +3136,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DeleteGitHubAccountToken operation.

" + "smithy.api#documentation": "

Represents the output of a DeleteGitHubAccountToken operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#DeleteResourcesByExternalId": { @@ -3111,11 +3161,17 @@ "smithy.api#documentation": "

The unique ID of an external resource (for example, a CloudFormation stack\n ID) that is linked to one or more CodeDeploy resources.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#DeleteResourcesByExternalIdOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codedeploy#DeploymentAlreadyCompletedException": { "type": "structure", @@ -3448,7 +3504,7 @@ "outdatedInstancesStrategy": { "target": "com.amazonaws.codedeploy#OutdatedInstancesStrategy", "traits": { - "smithy.api#documentation": "

Indicates what happens when new Amazon EC2 instances are launched\n mid-deployment and do not receive the deployed application revision.

\n

If this option is set to UPDATE or is unspecified, CodeDeploy initiates\n one or more 'auto-update outdated instances' deployments to apply the deployed\n application revision to the new Amazon EC2 instances.

\n

If this option is set to IGNORE, CodeDeploy does not initiate a\n deployment to update the new Amazon EC2 instances. This may result in instances\n having different revisions.

" + "smithy.api#documentation": "

Indicates what happens when new Amazon EC2 instances are launched\n mid-deployment and do not receive the deployed application revision.

\n

If this option is set to UPDATE or is unspecified, CodeDeploy initiates\n one or more 'auto-update outdated instances' deployments to apply the deployed\n application revision to the new Amazon EC2 instances.

\n

If this option is set to IGNORE, CodeDeploy does not initiate a\n deployment to update the new Amazon EC2 instances. This may result in instances\n having different revisions.

" } }, "blueGreenDeploymentConfiguration": { @@ -3633,7 +3689,7 @@ "startTime": { "target": "com.amazonaws.codedeploy#Timestamp", "traits": { - "smithy.api#documentation": "

A timestamp that indicates when the deployment was deployed to the deployment\n group.

\n

In some cases, the reported value of the start time might be later than the complete\n time. This is due to differences in the clock settings of backend servers that\n participate in the deployment process.

" + "smithy.api#documentation": "

A timestamp that indicates when the deployment was deployed to the deployment\n group.

\n

In some cases, the reported value of the start time might be later than the complete\n time. This is due to differences in the clock settings of backend servers that\n participate in the deployment process.

" } }, "completeTime": { @@ -3657,14 +3713,14 @@ "creator": { "target": "com.amazonaws.codedeploy#DeploymentCreator", "traits": { - "smithy.api#documentation": "

The means by which the deployment was created:

\n " + "smithy.api#documentation": "

The means by which the deployment was created:

\n " } }, "ignoreApplicationStopFailures": { "target": "com.amazonaws.codedeploy#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

If true, then if an ApplicationStop, BeforeBlockTraffic, or\n AfterBlockTraffic deployment lifecycle event to an instance fails, then\n the deployment continues to the next deployment lifecycle event. For example, if\n ApplicationStop fails, the deployment continues with DownloadBundle. If\n BeforeBlockTraffic fails, the deployment continues with\n BlockTraffic. If AfterBlockTraffic fails, the deployment\n continues with ApplicationStop.

\n\n

If false or not specified, then if a lifecycle event fails during a deployment to an\n instance, that deployment fails. If deployment to that instance is part of an overall\n deployment and the number of healthy hosts is not less than the minimum number of\n healthy hosts, then a deployment to the next instance is attempted.

\n\n

During a deployment, the CodeDeploy agent runs the scripts specified for\n ApplicationStop, BeforeBlockTraffic, and\n AfterBlockTraffic in the AppSpec file from the previous successful\n deployment. (All other scripts are run from the AppSpec file in the current deployment.)\n If one of these scripts contains an error and does not run successfully, the deployment\n can fail.

\n\n

If the cause of the failure is a script from the last successful deployment that will\n never run successfully, create a new deployment and use\n ignoreApplicationStopFailures to specify that the\n ApplicationStop, BeforeBlockTraffic, and\n AfterBlockTraffic failures should be ignored.

" + "smithy.api#documentation": "

If true, then if an ApplicationStop, BeforeBlockTraffic, or\n AfterBlockTraffic deployment lifecycle event to an instance fails, then\n the deployment continues to the next deployment lifecycle event. For example, if\n ApplicationStop fails, the deployment continues with DownloadBundle. If\n BeforeBlockTraffic fails, the deployment continues with\n BlockTraffic. If AfterBlockTraffic fails, the deployment\n continues with ApplicationStop.

\n

If false or not specified, then if a lifecycle event fails during a deployment to an\n instance, that deployment fails. If deployment to that instance is part of an overall\n deployment and the number of healthy hosts is not less than the minimum number of\n healthy hosts, then a deployment to the next instance is attempted.

\n

During a deployment, the CodeDeploy agent runs the scripts specified for\n ApplicationStop, BeforeBlockTraffic, and\n AfterBlockTraffic in the AppSpec file from the previous successful\n deployment. (All other scripts are run from the AppSpec file in the current deployment.)\n If one of these scripts contains an error and does not run successfully, the deployment\n can fail.

\n

If the cause of the failure is a script from the last successful deployment that will\n never run successfully, create a new deployment and use\n ignoreApplicationStopFailures to specify that the\n ApplicationStop, BeforeBlockTraffic, and\n AfterBlockTraffic failures should be ignored.

" } }, "autoRollbackConfiguration": { @@ -3726,7 +3782,7 @@ "fileExistsBehavior": { "target": "com.amazonaws.codedeploy#FileExistsBehavior", "traits": { - "smithy.api#documentation": "

Information about how CodeDeploy handles files that already exist in a\n deployment target location but weren't part of the previous successful\n deployment.

\n " + "smithy.api#documentation": "

Information about how CodeDeploy handles files that already exist in a\n deployment target location but weren't part of the previous successful\n deployment.

\n " } }, "deploymentStatusMessages": { @@ -3893,7 +3949,7 @@ "actionOnTimeout": { "target": "com.amazonaws.codedeploy#DeploymentReadyAction", "traits": { - "smithy.api#documentation": "

Information about when to reroute traffic from an original environment to a\n replacement environment in a blue/green deployment.

\n " + "smithy.api#documentation": "

Information about when to reroute traffic from an original environment to a\n replacement environment in a blue/green deployment.

\n " } }, "waitTimeInMinutes": { @@ -4186,7 +4242,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeregisterOnPremisesInstance operation.

" + "smithy.api#documentation": "

Represents the input of a DeregisterOnPremisesInstance operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#Description": { @@ -4213,7 +4270,7 @@ "errorCode": { "target": "com.amazonaws.codedeploy#LifecycleErrorCode", "traits": { - "smithy.api#documentation": "

The associated error code:

\n " + "smithy.api#documentation": "

The associated error code:

\n " } }, "scriptName": { @@ -4231,7 +4288,7 @@ "logTail": { "target": "com.amazonaws.codedeploy#LogTail", "traits": { - "smithy.api#documentation": "

The last portion of the diagnostic log.

\n

If available, CodeDeploy returns up to the last 4 KB of the diagnostic\n log.

" + "smithy.api#documentation": "

The last portion of the diagnostic log.

\n

If available, CodeDeploy returns up to the last 4 KB of the diagnostic\n log.

" } } }, @@ -4263,7 +4320,7 @@ "Type": { "target": "com.amazonaws.codedeploy#EC2TagFilterType", "traits": { - "smithy.api#documentation": "

The tag filter type:

\n " + "smithy.api#documentation": "

The tag filter type:

\n " } } }, @@ -4450,7 +4507,7 @@ "status": { "target": "com.amazonaws.codedeploy#ECSTaskSetStatus", "traits": { - "smithy.api#documentation": "

The status of the task set. There are three valid task set statuses:

\n " + "smithy.api#documentation": "

The status of the task set. There are three valid task set statuses:

\n " } }, "trafficWeight": { @@ -4736,7 +4793,7 @@ "code": { "target": "com.amazonaws.codedeploy#ErrorCode", "traits": { - "smithy.api#documentation": "

For more information, see Error Codes for CodeDeploy in the CodeDeploy User Guide.

\n

The error code:

\n " + "smithy.api#documentation": "

For more information, see Error Codes for CodeDeploy in the CodeDeploy User Guide.

\n

The error code:

\n " } }, "message": { @@ -4861,7 +4918,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a GetApplication operation.

" + "smithy.api#documentation": "

Represents the input of a GetApplication operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#GetApplicationOutput": { @@ -4875,7 +4933,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetApplication operation.

" + "smithy.api#documentation": "

Represents the output of a GetApplication operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#GetApplicationRevision": { @@ -4929,7 +4988,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a GetApplicationRevision operation.

" + "smithy.api#documentation": "

Represents the input of a GetApplicationRevision operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#GetApplicationRevisionOutput": { @@ -4955,7 +5015,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetApplicationRevision operation.

" + "smithy.api#documentation": "

Represents the output of a GetApplicationRevision operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#GetDeployment": { @@ -4978,7 +5039,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a deployment.

\n \n

The content property of the appSpecContent object in\n the returned revision is always null. Use GetApplicationRevision and\n the sha256 property of the returned appSpecContent object\n to get the content of the deployment’s AppSpec file.

\n
", + "smithy.api#documentation": "

Gets information about a deployment.

\n \n

The content property of the appSpecContent object in\n the returned revision is always null. Use GetApplicationRevision and\n the sha256 property of the returned appSpecContent object\n to get the content of the deployment’s AppSpec file.

\n
", "smithy.waiters#waitable": { "DeploymentSuccessful": { "acceptors": [ @@ -5056,7 +5117,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a GetDeploymentConfig operation.

" + "smithy.api#documentation": "

Represents the input of a GetDeploymentConfig operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#GetDeploymentConfigOutput": { @@ -5070,7 +5132,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetDeploymentConfig operation.

" + "smithy.api#documentation": "

Represents the output of a GetDeploymentConfig operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#GetDeploymentGroup": { @@ -5127,7 +5190,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a GetDeploymentGroup operation.

" + "smithy.api#documentation": "

Represents the input of a GetDeploymentGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#GetDeploymentGroupOutput": { @@ -5141,7 +5205,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetDeploymentGroup operation.

" + "smithy.api#documentation": "

Represents the output of a GetDeploymentGroup operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#GetDeploymentInput": { @@ -5156,7 +5221,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a GetDeployment operation.

" + "smithy.api#documentation": "

Represents the input of a GetDeployment operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#GetDeploymentInstance": { @@ -5216,7 +5282,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a GetDeploymentInstance operation.

" + "smithy.api#documentation": "

Represents the input of a GetDeploymentInstance operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#GetDeploymentInstanceOutput": { @@ -5230,7 +5297,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetDeploymentInstance operation.

" + "smithy.api#documentation": "

Represents the output of a GetDeploymentInstance operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#GetDeploymentOutput": { @@ -5244,7 +5312,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetDeployment operation.

" + "smithy.api#documentation": "

Represents the output of a GetDeployment operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#GetDeploymentTarget": { @@ -5300,6 +5369,9 @@ "smithy.api#documentation": "

The unique ID of a deployment target.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#GetDeploymentTargetOutput": { @@ -5311,6 +5383,9 @@ "smithy.api#documentation": "

A deployment target that contains information about a deployment such as its status,\n lifecycle events, and when it was last updated. It also contains metadata about the\n deployment target. The deployment target metadata depends on the deployment target's\n type (instanceTarget, lambdaTarget, or\n ecsTarget).

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#GetOnPremisesInstance": { @@ -5348,7 +5423,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a GetOnPremisesInstance operation.

" + "smithy.api#documentation": "

Represents the input of a GetOnPremisesInstance operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#GetOnPremisesInstanceOutput": { @@ -5362,7 +5438,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetOnPremisesInstance operation.

" + "smithy.api#documentation": "

Represents the output of a GetOnPremisesInstance operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#GitHubAccountTokenDoesNotExistException": { @@ -5410,7 +5487,7 @@ "repository": { "target": "com.amazonaws.codedeploy#Repository", "traits": { - "smithy.api#documentation": "

The GitHub account and repository pair that stores a reference to the commit that\n represents the bundled artifacts for the application revision.

\n

Specified as account/repository.

" + "smithy.api#documentation": "

The GitHub account and repository pair that stores a reference to the commit that\n represents the bundled artifacts for the application revision.

\n

Specified as account/repository.

" } }, "commitId": { @@ -5447,7 +5524,7 @@ "action": { "target": "com.amazonaws.codedeploy#GreenFleetProvisioningAction", "traits": { - "smithy.api#documentation": "

The method used to add instances to a replacement environment.

\n " + "smithy.api#documentation": "

The method used to add instances to a replacement environment.

\n " } } }, @@ -5787,7 +5864,7 @@ "status": { "target": "com.amazonaws.codedeploy#InstanceStatus", "traits": { - "smithy.api#documentation": "

The deployment status for this instance:

\n " + "smithy.api#documentation": "

The deployment status for this instance:

\n " } }, "lastUpdatedAt": { @@ -5805,7 +5882,7 @@ "instanceType": { "target": "com.amazonaws.codedeploy#InstanceType", "traits": { - "smithy.api#documentation": "

Information about which environment an instance belongs to in a blue/green\n deployment.

\n " + "smithy.api#documentation": "

Information about which environment an instance belongs to in a blue/green\n deployment.

\n " } } }, @@ -5912,7 +5989,7 @@ } }, "traits": { - "smithy.api#documentation": "

The format of the alarm configuration is invalid. Possible causes include:

\n ", + "smithy.api#documentation": "

The format of the alarm configuration is invalid. Possible causes include:

\n ", "smithy.api#error": "client" } }, @@ -6647,7 +6724,7 @@ } }, "traits": { - "smithy.api#documentation": "

The target instance configuration is invalid. Possible causes include:

\n ", + "smithy.api#documentation": "

The target instance configuration is invalid. Possible causes include:

\n ", "smithy.api#error": "client" } }, @@ -6912,7 +6989,7 @@ "status": { "target": "com.amazonaws.codedeploy#LifecycleEventStatus", "traits": { - "smithy.api#documentation": "

The deployment lifecycle event status:

\n " + "smithy.api#documentation": "

The deployment lifecycle event status:

\n " } } }, @@ -7068,19 +7145,19 @@ "sortBy": { "target": "com.amazonaws.codedeploy#ApplicationRevisionSortBy", "traits": { - "smithy.api#documentation": "

The column name to use to sort the list results:

\n \n

If not specified or set to null, the results are returned in an arbitrary order.\n

" + "smithy.api#documentation": "

The column name to use to sort the list results:

\n \n

If not specified or set to null, the results are returned in an arbitrary order.\n

" } }, "sortOrder": { "target": "com.amazonaws.codedeploy#SortOrder", "traits": { - "smithy.api#documentation": "

The order in which to sort the list results:

\n \n

If not specified, the results are sorted in ascending order.

\n

If set to null, the results are sorted in an arbitrary order.

" + "smithy.api#documentation": "

The order in which to sort the list results:

\n \n

If not specified, the results are sorted in ascending order.

\n

If set to null, the results are sorted in an arbitrary order.

" } }, "s3Bucket": { "target": "com.amazonaws.codedeploy#S3Bucket", "traits": { - "smithy.api#documentation": "

An Amazon S3 bucket name to limit the search for revisions.

\n

If set to null, all of the user's buckets are searched.

" + "smithy.api#documentation": "

An Amazon S3 bucket name to limit the search for revisions.

\n

If set to null, all of the user's buckets are searched.

" } }, "s3KeyPrefix": { @@ -7092,7 +7169,7 @@ "deployed": { "target": "com.amazonaws.codedeploy#ListStateFilterAction", "traits": { - "smithy.api#documentation": "

Whether to list revisions based on whether the revision is the target revision of a\n deployment group:

\n " + "smithy.api#documentation": "

Whether to list revisions based on whether the revision is the target revision of a\n deployment group:

\n " } }, "nextToken": { @@ -7103,7 +7180,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ListApplicationRevisions operation.

" + "smithy.api#documentation": "

Represents the input of a ListApplicationRevisions operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListApplicationRevisionsOutput": { @@ -7123,7 +7201,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a ListApplicationRevisions operation.

" + "smithy.api#documentation": "

Represents the output of a ListApplicationRevisions operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListApplications": { @@ -7159,7 +7238,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ListApplications operation.

" + "smithy.api#documentation": "

Represents the input of a ListApplications operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListApplicationsOutput": { @@ -7179,7 +7259,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a ListApplications operation.

" + "smithy.api#documentation": "

Represents the output of a ListApplications operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListDeploymentConfigs": { @@ -7215,7 +7296,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ListDeploymentConfigs operation.

" + "smithy.api#documentation": "

Represents the input of a ListDeploymentConfigs operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListDeploymentConfigsOutput": { @@ -7235,7 +7317,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a ListDeploymentConfigs operation.

" + "smithy.api#documentation": "

Represents the output of a ListDeploymentConfigs operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListDeploymentGroups": { @@ -7287,7 +7370,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ListDeploymentGroups operation.

" + "smithy.api#documentation": "

Represents the input of a ListDeploymentGroups operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListDeploymentGroupsOutput": { @@ -7313,7 +7397,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a ListDeploymentGroups operation.

" + "smithy.api#documentation": "

Represents the output of a ListDeploymentGroups operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListDeploymentInstances": { @@ -7360,7 +7445,7 @@ "smithy.api#deprecated": { "message": "This operation is deprecated, use ListDeploymentTargets instead." }, - "smithy.api#documentation": "\n

The newer BatchGetDeploymentTargets should be used instead because\n it works with all compute types. ListDeploymentInstances throws an\n exception if it is used with a compute platform other than EC2/On-premises or\n Lambda.

\n
\n

Lists the instance for a deployment associated with the IAM user or\n Amazon Web Services account.

", + "smithy.api#documentation": "\n

The newer BatchGetDeploymentTargets should be used instead because\n it works with all compute types. ListDeploymentInstances throws an\n exception if it is used with a compute platform other than EC2/On-premises or\n Lambda.

\n
\n

Lists the instance for a deployment associated with the IAM user or\n Amazon Web Services account.

", "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -7387,7 +7472,7 @@ "instanceStatusFilter": { "target": "com.amazonaws.codedeploy#InstanceStatusList", "traits": { - "smithy.api#documentation": "

A subset of instances to list by status:

\n " + "smithy.api#documentation": "

A subset of instances to list by status:

\n " } }, "instanceTypeFilter": { @@ -7398,7 +7483,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ListDeploymentInstances operation.

" + "smithy.api#documentation": "

Represents the input of a ListDeploymentInstances operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListDeploymentInstancesOutput": { @@ -7418,7 +7504,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a ListDeploymentInstances operation.

" + "smithy.api#documentation": "

Represents the output of a ListDeploymentInstances operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListDeploymentTargets": { @@ -7477,9 +7564,12 @@ "targetFilters": { "target": "com.amazonaws.codedeploy#TargetFilters", "traits": { - "smithy.api#documentation": "

A key used to filter the returned targets. The two valid values are:

\n " + "smithy.api#documentation": "

A key used to filter the returned targets. The two valid values are:

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListDeploymentTargetsOutput": { @@ -7497,6 +7587,9 @@ "smithy.api#documentation": "

If a large amount of information is returned, a token identifier is also returned. It\n can be used in a subsequent ListDeploymentTargets call to return the next\n set of deployment targets in the list.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListDeployments": { @@ -7557,13 +7650,13 @@ "applicationName": { "target": "com.amazonaws.codedeploy#ApplicationName", "traits": { - "smithy.api#documentation": "

The name of an CodeDeploy application associated with the IAM user or Amazon Web Services account.

\n \n

If applicationName is specified, then\n deploymentGroupName must be specified. If it is not specified, then\n deploymentGroupName must not be specified.

\n
" + "smithy.api#documentation": "

The name of an CodeDeploy application associated with the IAM user or Amazon Web Services account.

\n \n

If applicationName is specified, then\n deploymentGroupName must be specified. If it is not specified, then\n deploymentGroupName must not be specified.

\n
" } }, "deploymentGroupName": { "target": "com.amazonaws.codedeploy#DeploymentGroupName", "traits": { - "smithy.api#documentation": "

The name of a deployment group for the specified application.

\n \n

If deploymentGroupName is specified, then\n applicationName must be specified. If it is not specified, then\n applicationName must not be specified.

\n
" + "smithy.api#documentation": "

The name of a deployment group for the specified application.

\n \n

If deploymentGroupName is specified, then\n applicationName must be specified. If it is not specified, then\n applicationName must not be specified.

\n
" } }, "externalId": { @@ -7575,7 +7668,7 @@ "includeOnlyStatuses": { "target": "com.amazonaws.codedeploy#DeploymentStatusList", "traits": { - "smithy.api#documentation": "

A subset of deployments to list by status:

\n " + "smithy.api#documentation": "

A subset of deployments to list by status:

\n " } }, "createTimeRange": { @@ -7592,7 +7685,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ListDeployments operation.

" + "smithy.api#documentation": "

Represents the input of a ListDeployments operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListDeploymentsOutput": { @@ -7612,7 +7706,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a ListDeployments operation.

" + "smithy.api#documentation": "

Represents the output of a ListDeployments operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListGitHubAccountTokenNames": { @@ -7649,7 +7744,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ListGitHubAccountTokenNames operation.

" + "smithy.api#documentation": "

Represents the input of a ListGitHubAccountTokenNames operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListGitHubAccountTokenNamesOutput": { @@ -7669,7 +7765,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a ListGitHubAccountTokenNames operation.

" + "smithy.api#documentation": "

Represents the output of a ListGitHubAccountTokenNames operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListOnPremisesInstances": { @@ -7692,7 +7789,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a list of names for one or more on-premises instances.

\n

Unless otherwise specified, both registered and deregistered on-premises instance\n names are listed. To list only registered or deregistered on-premises instance names,\n use the registration status parameter.

" + "smithy.api#documentation": "

Gets a list of names for one or more on-premises instances.

\n

Unless otherwise specified, both registered and deregistered on-premises instance\n names are listed. To list only registered or deregistered on-premises instance names,\n use the registration status parameter.

" } }, "com.amazonaws.codedeploy#ListOnPremisesInstancesInput": { @@ -7701,7 +7798,7 @@ "registrationStatus": { "target": "com.amazonaws.codedeploy#RegistrationStatus", "traits": { - "smithy.api#documentation": "

The registration status of the on-premises instances:

\n " + "smithy.api#documentation": "

The registration status of the on-premises instances:

\n " } }, "tagFilters": { @@ -7718,7 +7815,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ListOnPremisesInstances operation.

" + "smithy.api#documentation": "

Represents the input of a ListOnPremisesInstances operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListOnPremisesInstancesOutput": { @@ -7738,7 +7836,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of the list on-premises instances operation.

" + "smithy.api#documentation": "

Represents the output of the list on-premises instances operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListStateFilterAction": { @@ -7803,6 +7902,9 @@ "smithy.api#documentation": "

An identifier returned from the previous ListTagsForResource call. It can\n be used to return the next set of applications in the list.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#ListTagsForResourceOutput": { @@ -7820,6 +7922,9 @@ "smithy.api#documentation": "

If a large amount of information is returned, an identifier is also returned. It can\n be used in a subsequent list application revisions call to return the next set of\n application revisions in the list.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#ListenerArn": { @@ -7837,13 +7942,13 @@ "elbInfoList": { "target": "com.amazonaws.codedeploy#ELBInfoList", "traits": { - "smithy.api#documentation": "

An array that contains information about the load balancer to use for load balancing\n in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load\n Balancers.

\n \n

Adding more than one load balancer to the array is not supported.

\n
" + "smithy.api#documentation": "

An array that contains information about the load balancer to use for load balancing\n in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load\n Balancers.

\n \n

Adding more than one load balancer to the array is not supported.

\n
" } }, "targetGroupInfoList": { "target": "com.amazonaws.codedeploy#TargetGroupInfoList", "traits": { - "smithy.api#documentation": "

An array that contains information about the target group to use for load balancing in\n a deployment. In Elastic Load Balancing, target groups are used with Application Load\n Balancers.

\n \n

Adding more than one target group to the array is not supported.

\n
" + "smithy.api#documentation": "

An array that contains information about the target group to use for load balancing in\n a deployment. In Elastic Load Balancing, target groups are used with Application Load\n Balancers.

\n \n

Adding more than one target group to the array is not supported.

\n
" } }, "targetGroupPairInfoList": { @@ -7869,7 +7974,7 @@ "type": { "target": "com.amazonaws.codedeploy#MinimumHealthyHostsType", "traits": { - "smithy.api#documentation": "

The minimum healthy instance type:

\n \n

In an example of nine instances, if a HOST_COUNT of six is specified, deploy to up to\n three instances at a time. The deployment is successful if six or more instances are\n deployed to successfully. Otherwise, the deployment fails. If a FLEET_PERCENT of 40 is\n specified, deploy to up to five instances at a time. The deployment is successful if\n four or more instances are deployed to successfully. Otherwise, the deployment\n fails.

\n \n

In a call to the GetDeploymentConfig, CodeDeployDefault.OneAtATime\n returns a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This\n means a deployment to only one instance at a time. (You cannot set the type to\n MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with\n CodeDeployDefault.OneAtATime, CodeDeploy attempts to ensure that all\n instances but one are kept in a healthy state during the deployment. Although this\n allows one instance at a time to be taken offline for a new deployment, it also\n means that if the deployment to the last instance fails, the overall deployment is\n still successful.

\n
\n

For more information, see CodeDeploy\n Instance Health in the CodeDeploy User\n Guide.

" + "smithy.api#documentation": "

The minimum healthy instance type:

\n \n

In an example of nine instances, if a HOST_COUNT of six is specified, deploy to up to\n three instances at a time. The deployment is successful if six or more instances are\n deployed to successfully. Otherwise, the deployment fails. If a FLEET_PERCENT of 40 is\n specified, deploy to up to five instances at a time. The deployment is successful if\n four or more instances are deployed to successfully. Otherwise, the deployment\n fails.

\n \n

In a call to the GetDeploymentConfig, CodeDeployDefault.OneAtATime\n returns a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This\n means a deployment to only one instance at a time. (You cannot set the type to\n MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with\n CodeDeployDefault.OneAtATime, CodeDeploy attempts to ensure that all\n instances but one are kept in a healthy state during the deployment. Although this\n allows one instance at a time to be taken offline for a new deployment, it also\n means that if the deployment to the last instance fails, the overall deployment is\n still successful.

\n
\n

For more information, see CodeDeploy\n Instance Health in the CodeDeploy User\n Guide.

" } }, "value": { @@ -8042,6 +8147,9 @@ "smithy.api#documentation": "

The result of a Lambda function that validates a deployment lifecycle\n event. The values listed in Valid Values are valid for\n lifecycle statuses in general; however, only Succeeded and\n Failed can be passed successfully in your API call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#PutLifecycleEventHookExecutionStatusOutput": { @@ -8053,6 +8161,9 @@ "smithy.api#documentation": "

The execution ID of the lifecycle event hook. A hook is specified in the\n hooks section of the deployment's AppSpec file.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#RawString": { @@ -8141,7 +8252,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a RegisterApplicationRevision operation.

" + "smithy.api#documentation": "

Represents the input of a RegisterApplicationRevision operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#RegisterOnPremisesInstance": { @@ -8185,7 +8297,7 @@ } ], "traits": { - "smithy.api#documentation": "

Registers an on-premises instance.

\n \n

Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request. You cannot use both.

\n
" + "smithy.api#documentation": "

Registers an on-premises instance.

\n \n

Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request. You cannot use both.

\n
" } }, "com.amazonaws.codedeploy#RegisterOnPremisesInstanceInput": { @@ -8212,7 +8324,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of the register on-premises instance operation.

" + "smithy.api#documentation": "

Represents the input of the register on-premises instance operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#RegistrationStatus": { @@ -8306,7 +8419,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a RemoveTagsFromOnPremisesInstances\n operation.

" + "smithy.api#documentation": "

Represents the input of a RemoveTagsFromOnPremisesInstances\n operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#Repository": { @@ -8389,7 +8503,7 @@ "revisionType": { "target": "com.amazonaws.codedeploy#RevisionLocationType", "traits": { - "smithy.api#documentation": "

The type of application revision:

\n " + "smithy.api#documentation": "

The type of application revision:

\n " } }, "s3Location": { @@ -8539,19 +8653,19 @@ "bundleType": { "target": "com.amazonaws.codedeploy#BundleType", "traits": { - "smithy.api#documentation": "

The file type of the application revision. Must be one of the following:

\n " + "smithy.api#documentation": "

The file type of the application revision. Must be one of the following:

\n " } }, "version": { "target": "com.amazonaws.codedeploy#VersionId", "traits": { - "smithy.api#documentation": "

A specific version of the Amazon S3 object that represents the bundled\n artifacts for the application revision.

\n

If the version is not specified, the system uses the most recent version by\n default.

" + "smithy.api#documentation": "

A specific version of the Amazon S3 object that represents the bundled\n artifacts for the application revision.

\n

If the version is not specified, the system uses the most recent version by\n default.

" } }, "eTag": { "target": "com.amazonaws.codedeploy#ETag", "traits": { - "smithy.api#documentation": "

The ETag of the Amazon S3 object that represents the bundled artifacts for the\n application revision.

\n

If the ETag is not specified as an input parameter, ETag validation of the object is\n skipped.

" + "smithy.api#documentation": "

The ETag of the Amazon S3 object that represents the bundled artifacts for the\n application revision.

\n

If the ETag is not specified as an input parameter, ETag validation of the object is\n skipped.

" } } }, @@ -8606,6 +8720,9 @@ "smithy.api#documentation": "

The unique ID of a blue/green deployment for which you want to skip the instance\n termination wait time.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#SortOrder": { @@ -8675,7 +8792,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a StopDeployment operation.

" + "smithy.api#documentation": "

Represents the input of a StopDeployment operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#StopDeploymentOutput": { @@ -8684,7 +8802,7 @@ "status": { "target": "com.amazonaws.codedeploy#StopStatus", "traits": { - "smithy.api#documentation": "

The status of the stop deployment operation:

\n " + "smithy.api#documentation": "

The status of the stop deployment operation:

\n " } }, "statusMessage": { @@ -8695,7 +8813,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a StopDeployment operation.

" + "smithy.api#documentation": "

Represents the output of a StopDeployment operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#StopStatus": { @@ -8753,7 +8872,7 @@ "Type": { "target": "com.amazonaws.codedeploy#TagFilterType", "traits": { - "smithy.api#documentation": "

The on-premises instance tag filter type:

\n " + "smithy.api#documentation": "

The on-premises instance tag filter type:

\n " } } }, @@ -8887,11 +9006,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#TagResourceOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codedeploy#TagSetListLimitExceededException": { "type": "structure", @@ -9159,13 +9284,13 @@ "start": { "target": "com.amazonaws.codedeploy#Timestamp", "traits": { - "smithy.api#documentation": "

The start time of the time range.

\n \n

Specify null to leave the start time open-ended.

\n
" + "smithy.api#documentation": "

The start time of the time range.

\n \n

Specify null to leave the start time open-ended.

\n
" } }, "end": { "target": "com.amazonaws.codedeploy#Timestamp", "traits": { - "smithy.api#documentation": "

The end time of the time range.

\n \n

Specify null to leave the end time open-ended.

\n
" + "smithy.api#documentation": "

The end time of the time range.

\n \n

Specify null to leave the end time open-ended.

\n
" } } }, @@ -9439,11 +9564,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#UntagResourceOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codedeploy#UpdateApplication": { "type": "operation", @@ -9488,7 +9619,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of an UpdateApplication operation.

" + "smithy.api#documentation": "

Represents the input of an UpdateApplication operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#UpdateDeploymentGroup": { @@ -9642,7 +9774,7 @@ "autoScalingGroups": { "target": "com.amazonaws.codedeploy#AutoScalingGroupNameList", "traits": { - "smithy.api#documentation": "

The replacement list of Auto Scaling groups to be included in the deployment\n group, if you want to change them.

\n " + "smithy.api#documentation": "

The replacement list of Auto Scaling groups to be included in the deployment\n group, if you want to change them.

\n " } }, "serviceRoleArn": { @@ -9672,7 +9804,7 @@ "outdatedInstancesStrategy": { "target": "com.amazonaws.codedeploy#OutdatedInstancesStrategy", "traits": { - "smithy.api#documentation": "

Indicates what happens when new Amazon EC2 instances are launched\n mid-deployment and do not receive the deployed application revision.

\n

If this option is set to UPDATE or is unspecified, CodeDeploy initiates\n one or more 'auto-update outdated instances' deployments to apply the deployed\n application revision to the new Amazon EC2 instances.

\n

If this option is set to IGNORE, CodeDeploy does not initiate a\n deployment to update the new Amazon EC2 instances. This may result in instances\n having different revisions.

" + "smithy.api#documentation": "

Indicates what happens when new Amazon EC2 instances are launched\n mid-deployment and do not receive the deployed application revision.

\n

If this option is set to UPDATE or is unspecified, CodeDeploy initiates\n one or more 'auto-update outdated instances' deployments to apply the deployed\n application revision to the new Amazon EC2 instances.

\n

If this option is set to IGNORE, CodeDeploy does not initiate a\n deployment to update the new Amazon EC2 instances. This may result in instances\n having different revisions.

" } }, "deploymentStyle": { @@ -9713,7 +9845,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of an UpdateDeploymentGroup operation.

" + "smithy.api#documentation": "

Represents the input of an UpdateDeploymentGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.codedeploy#UpdateDeploymentGroupOutput": { @@ -9727,7 +9860,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of an UpdateDeploymentGroup operation.

" + "smithy.api#documentation": "

Represents the output of an UpdateDeploymentGroup operation.

", + "smithy.api#output": {} } }, "com.amazonaws.codedeploy#Value": { diff --git a/codegen/sdk-codegen/aws-models/codeguru-reviewer.json b/codegen/sdk-codegen/aws-models/codeguru-reviewer.json index f5fd1d47438..836631a04c2 100644 --- a/codegen/sdk-codegen/aws-models/codeguru-reviewer.json +++ b/codegen/sdk-codegen/aws-models/codeguru-reviewer.json @@ -88,7 +88,7 @@ "name": "codeguru-reviewer" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a\n service that uses program analysis and machine learning to detect potential defects that\n are difficult for developers to find and recommends fixes in your Java and Python\n code.

\n\n

By proactively detecting and providing recommendations for addressing code defects and\n implementing best practices, CodeGuru Reviewer improves the overall quality and maintainability of\n your code base during the code review stage. For more information about CodeGuru Reviewer, see the\n \n Amazon CodeGuru Reviewer User Guide.\n

\n\n

To improve the security of your CodeGuru Reviewer API calls, you can establish a private connection\n between your VPC and CodeGuru Reviewer by creating an interface VPC endpoint. For\n more information, see CodeGuru Reviewer and interface VPC\n endpoints (Amazon Web Services PrivateLink) in the Amazon CodeGuru Reviewer User\n Guide.

", + "smithy.api#documentation": "

This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a\n service that uses program analysis and machine learning to detect potential defects that\n are difficult for developers to find and recommends fixes in your Java and Python\n code.

\n

By proactively detecting and providing recommendations for addressing code defects and\n implementing best practices, CodeGuru Reviewer improves the overall quality and maintainability of\n your code base during the code review stage. For more information about CodeGuru Reviewer, see the\n \n Amazon CodeGuru Reviewer User Guide.\n

\n

To improve the security of your CodeGuru Reviewer API calls, you can establish a private connection\n between your VPC and CodeGuru Reviewer by creating an interface VPC endpoint. For\n more information, see CodeGuru Reviewer and interface VPC\n endpoints (Amazon Web Services PrivateLink) in the Amazon CodeGuru Reviewer User\n Guide.

", "smithy.api#title": "Amazon CodeGuru Reviewer", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -150,52 +150,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -203,13 +207,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -219,224 +232,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codeguru-reviewer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://codeguru-reviewer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codeguru-reviewer-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://codeguru-reviewer-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codeguru-reviewer.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://codeguru-reviewer.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://codeguru-reviewer.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codeguru-reviewer.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -451,8 +415,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -464,8 +428,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -477,8 +441,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -490,8 +454,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -503,8 +467,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -516,8 +480,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -529,8 +493,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -542,8 +506,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -555,8 +519,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -568,8 +532,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -581,8 +545,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -594,8 +558,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -607,8 +571,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -620,8 +584,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -633,8 +597,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -646,8 +610,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -659,8 +623,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -672,8 +636,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -685,8 +649,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -698,8 +662,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -711,8 +675,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -724,8 +699,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -737,8 +723,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -750,8 +747,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -763,8 +771,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -776,8 +784,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -789,8 +797,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -801,8 +809,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -813,10 +821,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -895,7 +909,7 @@ } ], "traits": { - "smithy.api#documentation": "

Use to associate an Amazon Web Services CodeCommit repository or a repository managed by Amazon Web Services\n CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a repository, CodeGuru Reviewer reviews\n source code changes in the repository's pull requests and provides automatic\n recommendations. You can view recommendations using the CodeGuru Reviewer console. For more\n information, see Recommendations in\n Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide.\n

\n\n

If you associate a CodeCommit or S3 repository, it must be in the same Amazon Web Services Region and\n Amazon Web Services account where its CodeGuru Reviewer code reviews are configured.

\n\n

Bitbucket and GitHub Enterprise Server repositories are managed by Amazon Web Services CodeStar\n Connections to connect to CodeGuru Reviewer. For more information, see Associate a\n repository in the Amazon CodeGuru Reviewer User Guide.\n

\n\n \n

You cannot use the CodeGuru Reviewer SDK or the Amazon Web Services CLI to associate a GitHub repository with\n Amazon CodeGuru Reviewer. To associate a GitHub repository, use the console. For more information, see\n Getting started with\n CodeGuru Reviewer in the CodeGuru Reviewer User Guide.\n

\n
", + "smithy.api#documentation": "

Use to associate an Amazon Web Services CodeCommit repository or a repository managed by Amazon Web Services\n CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a repository, CodeGuru Reviewer reviews\n source code changes in the repository's pull requests and provides automatic\n recommendations. You can view recommendations using the CodeGuru Reviewer console. For more\n information, see Recommendations in\n Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide.\n

\n

If you associate a CodeCommit or S3 repository, it must be in the same Amazon Web Services Region and\n Amazon Web Services account where its CodeGuru Reviewer code reviews are configured.

\n

Bitbucket and GitHub Enterprise Server repositories are managed by Amazon Web Services CodeStar\n Connections to connect to CodeGuru Reviewer. For more information, see Associate a\n repository in the Amazon CodeGuru Reviewer User Guide.\n

\n \n

You cannot use the CodeGuru Reviewer SDK or the Amazon Web Services CLI to associate a GitHub repository with\n Amazon CodeGuru Reviewer. To associate a GitHub repository, use the console. For more information, see\n Getting started with\n CodeGuru Reviewer in the CodeGuru Reviewer User Guide.\n

\n
", "smithy.api#http": { "method": "POST", "uri": "/associations", @@ -923,7 +937,7 @@ "Tags": { "target": "com.amazonaws.codegurureviewer#TagMap", "traits": { - "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n\t\t " + "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n " } }, "KMSKeyDetails": { @@ -932,6 +946,9 @@ "smithy.api#documentation": "

A KMSKeyDetails object that contains:

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#AssociateRepositoryResponse": { @@ -946,9 +963,12 @@ "Tags": { "target": "com.amazonaws.codegurureviewer#TagMap", "traits": { - "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n\t\t " + "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n " } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#AssociationArn": { @@ -1093,7 +1113,7 @@ "State": { "target": "com.amazonaws.codegurureviewer#JobState", "traits": { - "smithy.api#documentation": "

The valid code review states are:

\n " + "smithy.api#documentation": "

The valid code review states are:

\n " } }, "StateReason": { @@ -1213,7 +1233,7 @@ "State": { "target": "com.amazonaws.codegurureviewer#JobState", "traits": { - "smithy.api#documentation": "

The state of the code review.

\n

The valid code review states are:

\n " + "smithy.api#documentation": "

The state of the code review.

\n

The valid code review states are:

\n " } }, "CreatedTimeStamp": { @@ -1424,6 +1444,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#CreateCodeReviewResponse": { @@ -1432,6 +1455,9 @@ "CodeReview": { "target": "com.amazonaws.codegurureviewer#CodeReview" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#DescribeCodeReview": { @@ -1517,6 +1543,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#DescribeCodeReviewResponse": { @@ -1528,6 +1557,9 @@ "smithy.api#documentation": "

Information about the code review.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#DescribeRecommendationFeedback": { @@ -1590,6 +1622,9 @@ "smithy.api#httpQuery": "UserId" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#DescribeRecommendationFeedbackResponse": { @@ -1601,6 +1636,9 @@ "smithy.api#documentation": "

The recommendation feedback given by the user.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#DescribeRepositoryAssociation": { @@ -1686,6 +1724,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#DescribeRepositoryAssociationResponse": { @@ -1700,9 +1741,12 @@ "Tags": { "target": "com.amazonaws.codegurureviewer#TagMap", "traits": { - "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n\t\t " + "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n " } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#DisassociateRepository": { @@ -1753,6 +1797,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#DisassociateRepositoryResponse": { @@ -1767,9 +1814,12 @@ "Tags": { "target": "com.amazonaws.codegurureviewer#TagMap", "traits": { - "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n\t\t " + "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n " } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#EncryptionOption": { @@ -1992,7 +2042,7 @@ "States": { "target": "com.amazonaws.codegurureviewer#JobStates", "traits": { - "smithy.api#documentation": "

List of states for filtering that needs to be applied before displaying the result. For\n example, states=[Pending] lists code reviews in the Pending state.

\n

The valid code review states are:

\n ", + "smithy.api#documentation": "

List of states for filtering that needs to be applied before displaying the result. For\n example, states=[Pending] lists code reviews in the Pending state.

\n

The valid code review states are:

\n ", "smithy.api#httpQuery": "States" } }, @@ -2025,6 +2075,9 @@ "smithy.api#httpQuery": "NextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#ListCodeReviewsResponse": { @@ -2042,6 +2095,9 @@ "smithy.api#documentation": "

Pagination token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#ListRecommendationFeedback": { @@ -2122,6 +2178,9 @@ "smithy.api#httpQuery": "RecommendationIds" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#ListRecommendationFeedbackResponse": { @@ -2139,6 +2198,9 @@ "smithy.api#documentation": "

If nextToken is returned, there are more results available. The value of\n nextToken is a unique pagination token for each page. Make the call again\n using the returned token to retrieve the next page. Keep all other arguments\n unchanged.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#ListRecommendations": { @@ -2214,6 +2276,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#ListRecommendationsResponse": { @@ -2231,6 +2296,9 @@ "smithy.api#documentation": "

Pagination token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#ListRepositoryAssociations": { @@ -2280,7 +2348,7 @@ "States": { "target": "com.amazonaws.codegurureviewer#RepositoryAssociationStates", "traits": { - "smithy.api#documentation": "

List of repository association states to use as a filter.

\n

The valid repository association states are:

\n ", + "smithy.api#documentation": "

List of repository association states to use as a filter.

\n

The valid repository association states are:

\n ", "smithy.api#httpQuery": "State" } }, @@ -2312,6 +2380,9 @@ "smithy.api#httpQuery": "NextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#ListRepositoryAssociationsResponse": { @@ -2329,6 +2400,9 @@ "smithy.api#documentation": "

The nextToken value to include in a future ListRecommendations\n request. When the results of a ListRecommendations request exceed\n maxResults, this value can be used to retrieve the next page of results.\n This value is null when there are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#ListTagsForResource": { @@ -2370,6 +2444,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#ListTagsForResourceResponse": { @@ -2378,9 +2455,12 @@ "Tags": { "target": "com.amazonaws.codegurureviewer#TagMap", "traits": { - "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n\t\t " + "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n " } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codegurureviewer#LongDescription": { @@ -2634,11 +2714,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#PutRecommendationFeedbackResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codegurureviewer#Reaction": { "type": "enum", @@ -2987,7 +3073,7 @@ "State": { "target": "com.amazonaws.codegurureviewer#RepositoryAssociationState", "traits": { - "smithy.api#documentation": "

The state of the repository association.

\n

The valid repository association states are:

\n " + "smithy.api#documentation": "

The state of the repository association.

\n

The valid repository association states are:

\n " } }, "StateReason": { @@ -3123,7 +3209,7 @@ "State": { "target": "com.amazonaws.codegurureviewer#RepositoryAssociationState", "traits": { - "smithy.api#documentation": "

The state of the repository association.

\n

The valid repository association states are:

\n " + "smithy.api#documentation": "

The state of the repository association.

\n

The valid repository association states are:

\n " } } }, @@ -3552,15 +3638,21 @@ "Tags": { "target": "com.amazonaws.codegurureviewer#TagMap", "traits": { - "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n\t\t ", + "smithy.api#documentation": "

An array of key-value pairs used to tag an associated repository. A tag is a custom attribute label with two parts:

\n ", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codegurureviewer#TagValue": { "type": "string", @@ -3689,11 +3781,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codegurureviewer#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codegurureviewer#UserId": { "type": "string", diff --git a/codegen/sdk-codegen/aws-models/codeguru-security.json b/codegen/sdk-codegen/aws-models/codeguru-security.json index a05f411fdf5..08cc347b4bf 100644 --- a/codegen/sdk-codegen/aws-models/codeguru-security.json +++ b/codegen/sdk-codegen/aws-models/codeguru-security.json @@ -522,55 +522,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://codeguru-security-fips.us-gov-east-1.api.aws" + "url": "https://codeguru-security-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://codeguru-security-fips.us-gov-east-1.amazonaws.com" + "url": "https://codeguru-security-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://codeguru-security.us-gov-east-1.api.aws" + "url": "https://codeguru-security.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://codeguru-security.us-gov-east-1.amazonaws.com" + "url": "https://codeguru-security.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -581,9 +581,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -594,9 +594,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -607,9 +607,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -620,109 +620,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://codeguru-security-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://codeguru-security-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://codeguru-security-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://codeguru-security.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://codeguru-security.us-iso-east-1.c2s.ic.gov" + "url": "https://codeguru-security.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://codeguru-security-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://codeguru-security-fips.us-east-1.amazonaws.com" + "url": "https://codeguru-security-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://codeguru-security.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://codeguru-security.us-east-1.amazonaws.com" + "url": "https://codeguru-security.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -731,9 +731,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -744,9 +744,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -755,9 +755,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -768,22 +768,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -793,9 +806,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -805,11 +818,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/codeguruprofiler.json b/codegen/sdk-codegen/aws-models/codeguruprofiler.json index 70c9c0c79d8..94dfa17d951 100644 --- a/codegen/sdk-codegen/aws-models/codeguruprofiler.json +++ b/codegen/sdk-codegen/aws-models/codeguruprofiler.json @@ -599,52 +599,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -652,13 +656,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -668,224 +681,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codeguru-profiler-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://codeguru-profiler-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codeguru-profiler-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://codeguru-profiler-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codeguru-profiler.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://codeguru-profiler.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://codeguru-profiler.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codeguru-profiler.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -900,8 +864,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -913,8 +877,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -926,8 +890,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -939,8 +903,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -952,8 +916,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -965,8 +929,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -978,8 +942,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -991,8 +955,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1004,8 +968,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1017,8 +981,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1030,8 +994,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1043,8 +1007,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1056,8 +1031,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1069,8 +1055,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1082,8 +1079,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1095,8 +1103,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1108,8 +1116,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1121,8 +1129,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1133,8 +1141,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1145,10 +1153,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3787,4 +3801,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/codepipeline.json b/codegen/sdk-codegen/aws-models/codepipeline.json index bc47757193f..4b007113bc0 100644 --- a/codegen/sdk-codegen/aws-models/codepipeline.json +++ b/codegen/sdk-codegen/aws-models/codepipeline.json @@ -1924,52 +1924,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1977,13 +1981,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1993,224 +2006,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codepipeline-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://codepipeline-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codepipeline-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://codepipeline-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codepipeline.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://codepipeline.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://codepipeline.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codepipeline.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/codestar-connections.json b/codegen/sdk-codegen/aws-models/codestar-connections.json index ec4ec621caf..bb29e1959bd 100644 --- a/codegen/sdk-codegen/aws-models/codestar-connections.json +++ b/codegen/sdk-codegen/aws-models/codestar-connections.json @@ -164,52 +164,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -217,13 +221,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -233,224 +246,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codestar-connections-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://codestar-connections-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codestar-connections-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://codestar-connections-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codestar-connections.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://codestar-connections.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://codestar-connections.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codestar-connections.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/codestar-notifications.json b/codegen/sdk-codegen/aws-models/codestar-notifications.json index 3239ef02770..a467c70814a 100644 --- a/codegen/sdk-codegen/aws-models/codestar-notifications.json +++ b/codegen/sdk-codegen/aws-models/codestar-notifications.json @@ -108,7 +108,7 @@ "name": "codestar-notifications" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

This AWS CodeStar Notifications API Reference provides descriptions and usage examples of the\n operations and data types for the AWS CodeStar Notifications API. You can use the AWS CodeStar Notifications API\n to work with the following objects:

\n \n

Notification rules, by calling the following:

\n \n \n

Targets, by calling the following:

\n \n \n

Events, by calling the following:

\n \n

Tags, by calling the following:

\n \n \n\n \n

For information about how to use AWS CodeStar Notifications, see the Amazon Web Services Developer Tools Console User Guide.\n

", + "smithy.api#documentation": "

This AWS CodeStar Notifications API Reference provides descriptions and usage examples of the\n operations and data types for the AWS CodeStar Notifications API. You can use the AWS CodeStar Notifications API\n to work with the following objects:

\n

Notification rules, by calling the following:

\n \n

Targets, by calling the following:

\n \n

Events, by calling the following:

\n \n

Tags, by calling the following:

\n \n

For information about how to use AWS CodeStar Notifications, see the Amazon Web Services Developer Tools Console User Guide.\n

", "smithy.api#title": "AWS CodeStar Notifications", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -170,52 +170,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -223,13 +227,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -239,224 +252,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codestar-notifications-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://codestar-notifications-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codestar-notifications-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://codestar-notifications-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codestar-notifications.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://codestar-notifications.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://codestar-notifications.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codestar-notifications.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -471,8 +435,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -484,8 +448,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -497,8 +461,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -510,8 +474,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -523,8 +487,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -536,8 +500,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -549,8 +513,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -562,8 +526,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -575,8 +539,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -588,8 +552,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -601,8 +565,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -614,8 +578,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -627,8 +602,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -640,8 +626,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -653,8 +650,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -666,8 +674,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -679,8 +687,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -692,8 +700,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -704,8 +712,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -716,10 +724,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -830,7 +844,7 @@ "ClientRequestToken": { "target": "com.amazonaws.codestarnotifications#ClientRequestToken", "traits": { - "smithy.api#documentation": "

A unique, client-generated idempotency token that, when provided in a request, ensures\n the request cannot be repeated with a changed parameter. If a request with the same\n parameters is received and a token is included, the request returns information about\n the initial request that used that token.

\n \n

The Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an\n idempotency token is created for you.

\n
", + "smithy.api#documentation": "

A unique, client-generated idempotency token that, when provided in a request, ensures\n the request cannot be repeated with a changed parameter. If a request with the same\n parameters is received and a token is included, the request returns information about\n the initial request that used that token.

\n \n

The Amazon Web Services SDKs prepopulate client request tokens. If you are using an Amazon Web Services SDK, an\n idempotency token is created for you.

\n
", "smithy.api#idempotencyToken": {} } }, @@ -846,6 +860,9 @@ "smithy.api#documentation": "

The status of the notification rule. The default value is ENABLED. If the status is\n set to DISABLED, notifications aren't sent for the notification rule.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#CreateNotificationRuleResult": { @@ -857,6 +874,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the notification rule.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#CreatedTimestamp": { @@ -900,6 +920,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#DeleteNotificationRuleResult": { @@ -911,6 +934,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the deleted notification rule.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#DeleteTarget": { @@ -952,11 +978,17 @@ "smithy.api#documentation": "

A Boolean value that can be used to delete all associations with this Chatbot topic. The\n default value is FALSE. If set to TRUE, all associations between that target and every\n notification rule in your Amazon Web Services account are deleted.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#DeleteTargetResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codestarnotifications#DescribeNotificationRule": { "type": "operation", @@ -993,6 +1025,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#DescribeNotificationRuleResult": { @@ -1065,6 +1100,9 @@ "smithy.api#documentation": "

The tags associated with the notification rule.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#DetailType": { @@ -1276,6 +1314,9 @@ "smithy.api#documentation": "

A non-negative integer used to limit the number of returned results. The default number is 50. The maximum number of\n results that can be returned is 100.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#ListEventTypesResult": { @@ -1293,6 +1334,9 @@ "smithy.api#documentation": "

An enumeration token that can be used in a request to return the next batch of the results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#ListNotificationRules": { @@ -1414,6 +1458,9 @@ "smithy.api#documentation": "

A non-negative integer used to limit the number of returned results. The maximum number of\n results that can be returned is 100.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#ListNotificationRulesResult": { @@ -1431,6 +1478,9 @@ "smithy.api#documentation": "

The list of notification rules for the Amazon Web Services account, by Amazon Resource Name (ARN) and ID.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#ListTagsForResource": { @@ -1468,6 +1518,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#ListTagsForResourceResult": { @@ -1479,6 +1532,9 @@ "smithy.api#documentation": "

The tags associated with the notification rule.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#ListTargets": { @@ -1594,6 +1650,9 @@ "smithy.api#documentation": "

A non-negative integer used to limit the number of returned results. The maximum number of\n results that can be returned is 100.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#ListTargetsResult": { @@ -1611,6 +1670,9 @@ "smithy.api#documentation": "

An enumeration token that can be used in a request to return the next batch of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#MaxResults": { @@ -1808,6 +1870,9 @@ "smithy.api#documentation": "

An enumeration token that, when provided in a request, returns the next batch of the\n results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#SubscribeResult": { @@ -1819,6 +1884,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the notification rule for which you have created assocations.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#TagKey": { @@ -1885,6 +1953,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#TagResourceResult": { @@ -1896,6 +1967,9 @@ "smithy.api#documentation": "

The list of tags associated with the resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#TagValue": { @@ -2071,6 +2145,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#UnsubscribeResult": { @@ -2083,6 +2160,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestarnotifications#UntagResource": { @@ -2135,11 +2215,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#UntagResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codestarnotifications#UpdateNotificationRule": { "type": "operation", @@ -2209,11 +2295,17 @@ "smithy.api#documentation": "

The level of detail to include in the notifications for this resource. BASIC will include only the \n contents of the event as it would appear in Amazon CloudWatch. FULL will include any supplemental information\n provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestarnotifications#UpdateNotificationRuleResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codestarnotifications#ValidationException": { "type": "structure", diff --git a/codegen/sdk-codegen/aws-models/codestar.json b/codegen/sdk-codegen/aws-models/codestar.json index 1dcd51259d1..43ecfad9d49 100644 --- a/codegen/sdk-codegen/aws-models/codestar.json +++ b/codegen/sdk-codegen/aws-models/codestar.json @@ -101,6 +101,9 @@ "smithy.api#documentation": "

Whether the team member is allowed to use an SSH public/private key pair to remotely\n access project resources, for example Amazon EC2 instances.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#AssociateTeamMemberResult": { @@ -112,6 +115,9 @@ "smithy.api#documentation": "

The user- or system-generated token from the initial request that can be used to repeat\n the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#BucketKey": { @@ -341,52 +347,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -394,13 +404,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -410,224 +429,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codestar-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://codestar-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codestar-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://codestar-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://codestar.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://codestar.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://codestar.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://codestar.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -642,8 +612,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -655,8 +625,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -668,8 +638,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -681,8 +651,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -694,8 +664,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -707,8 +677,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -720,8 +690,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -733,8 +703,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -746,8 +716,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -759,8 +729,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -772,8 +742,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -785,8 +755,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -798,8 +768,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -811,8 +781,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -824,8 +794,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -837,8 +807,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -850,8 +820,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -863,8 +833,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -876,8 +846,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -889,8 +859,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -902,8 +872,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -915,8 +885,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -928,8 +898,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -941,8 +911,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -954,8 +935,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -967,8 +959,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -980,8 +983,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -993,8 +1007,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1006,8 +1020,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1019,8 +1033,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1031,8 +1045,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1043,10 +1057,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1148,6 +1168,9 @@ "smithy.api#documentation": "

The tags created for the project.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#CreateProjectResult": { @@ -1179,6 +1202,9 @@ "smithy.api#documentation": "

Reserved for future use.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#CreateUserProfile": { @@ -1231,6 +1257,9 @@ "smithy.api#documentation": "

The SSH public key associated with the user in AWS CodeStar. If a project owner allows the\n user remote access to project resources, this public key will be used along with the user's\n private key for SSH access.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#CreateUserProfileResult": { @@ -1273,6 +1302,9 @@ "smithy.api#documentation": "

The date the user profile was last modified, in timestamp format.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#CreatedTimestamp": { @@ -1324,6 +1356,9 @@ "smithy.api#documentation": "

Whether to send a delete request for the primary stack in AWS CloudFormation originally\n used to generate the project and its resources. This option will delete all AWS resources for\n the project (except for any buckets in Amazon S3) as well as deleting the project itself.\n Recommended for most use cases.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#DeleteProjectResult": { @@ -1341,6 +1376,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the deleted project.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#DeleteStack": { @@ -1376,6 +1414,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#DeleteUserProfileResult": { @@ -1388,6 +1429,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#DescribeProject": { @@ -1429,6 +1473,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#DescribeProjectResult": { @@ -1488,6 +1535,9 @@ "smithy.api#documentation": "

The project creation or deletion status.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#DescribeUserProfile": { @@ -1520,6 +1570,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#DescribeUserProfileResult": { @@ -1564,6 +1617,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#DisassociateTeamMember": { @@ -1609,11 +1665,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#DisassociateTeamMemberResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codestar#Email": { "type": "string", @@ -1771,6 +1833,9 @@ "smithy.api#documentation": "

The maximum amount of data that can be contained in a single set of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#ListProjectsResult": { @@ -1789,6 +1854,9 @@ "smithy.api#documentation": "

The continuation token to use when requesting the next set of results, if there are\n more results to be returned.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#ListResources": { @@ -1837,6 +1905,9 @@ "smithy.api#documentation": "

The maximum amount of data that can be contained in a single set of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#ListResourcesResult": { @@ -1854,6 +1925,9 @@ "smithy.api#documentation": "

The continuation token to use when requesting the next set of results, if there are\n more results to be returned.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#ListTagsForProject": { @@ -1902,6 +1976,9 @@ "smithy.api#documentation": "

Reserved for future use.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#ListTagsForProjectResult": { @@ -1919,6 +1996,9 @@ "smithy.api#documentation": "

Reserved for future use.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#ListTeamMembers": { @@ -1967,6 +2047,9 @@ "smithy.api#documentation": "

The maximum number of team members you want returned in a response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#ListTeamMembersResult": { @@ -1985,6 +2068,9 @@ "smithy.api#documentation": "

The continuation token to use when requesting the next set of results, if there are\n more results to be returned.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#ListUserProfiles": { @@ -2023,6 +2109,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#ListUserProfilesResult": { @@ -2041,6 +2130,9 @@ "smithy.api#documentation": "

The continuation token to use when requesting the next set of results, if there are\n more results to be returned.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#MaxResults": { @@ -2302,7 +2394,7 @@ "smithy.api#length": { "min": 11 }, - "smithy.api#pattern": "^arn\\:aws\\:\\S.*\\:.*" + "smithy.api#pattern": "^arn\\:aws\\:\\S.*\\:" } }, "com.amazonaws.codestar#ResourcesResult": { @@ -2433,6 +2525,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#TagProjectResult": { @@ -2444,6 +2539,9 @@ "smithy.api#documentation": "

The tags for the project.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#TagValue": { @@ -2647,11 +2745,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#UntagProjectResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codestar#UpdateProject": { "type": "operation", @@ -2695,11 +2799,17 @@ "smithy.api#documentation": "

The description of the project, if any.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#UpdateProjectResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.codestar#UpdateTeamMember": { "type": "operation", @@ -2766,6 +2876,9 @@ "smithy.api#documentation": "

Whether a team member is allowed to remotely access project resources using the SSH\n public key associated with the user's profile. Even if this is set to True, the user must\n associate a public key with their profile before the user can access resources.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#UpdateTeamMemberResult": { @@ -2790,6 +2903,9 @@ "smithy.api#documentation": "

Whether a team member is allowed to remotely access project resources using the SSH\n public key associated with the user's profile.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#UpdateUserProfile": { @@ -2840,6 +2956,9 @@ "smithy.api#documentation": "

The SSH public key associated with the user in AWS CodeStar. If a project owner allows the\n user remote access to project resources, this public key will be used along with the user's\n private key for SSH access.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.codestar#UpdateUserProfileResult": { @@ -2882,6 +3001,9 @@ "smithy.api#documentation": "

The date the user profile was last modified, in timestamp format.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.codestar#UserArn": { diff --git a/codegen/sdk-codegen/aws-models/cognito-identity-provider.json b/codegen/sdk-codegen/aws-models/cognito-identity-provider.json index 2b2b21e4d0c..8f8ffffb633 100644 --- a/codegen/sdk-codegen/aws-models/cognito-identity-provider.json +++ b/codegen/sdk-codegen/aws-models/cognito-identity-provider.json @@ -359,6 +359,7 @@ "arnNamespace": "cognito-idp", "cloudFormationName": "Cognito", "cloudTrailEventSource": "cognitoidentityprovider.amazonaws.com", + "docId": "cognito-idp-2016-04-18", "endpointPrefix": "cognito-idp" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/cognito-identity.json b/codegen/sdk-codegen/aws-models/cognito-identity.json index ca5e04c5f8b..28f749f8e29 100644 --- a/codegen/sdk-codegen/aws-models/cognito-identity.json +++ b/codegen/sdk-codegen/aws-models/cognito-identity.json @@ -189,52 +189,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -242,13 +246,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -258,224 +271,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -490,8 +454,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -503,8 +467,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -516,8 +480,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -529,8 +493,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -542,8 +506,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -555,8 +519,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -568,8 +532,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -581,8 +545,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -594,8 +558,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -607,8 +571,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -620,8 +584,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -633,8 +597,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -646,8 +610,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -659,8 +623,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -672,8 +636,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -685,8 +649,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -698,8 +662,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -711,8 +675,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -724,8 +688,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -737,8 +701,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -750,8 +714,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -763,8 +727,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -776,8 +740,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -789,8 +753,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -802,8 +766,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -815,8 +779,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -828,8 +792,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -841,8 +805,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -854,8 +818,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -867,8 +831,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -880,8 +844,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -893,8 +857,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -906,8 +881,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -919,8 +905,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -932,8 +929,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -945,8 +953,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -958,8 +966,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -971,8 +979,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -983,8 +991,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -995,10 +1003,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1015,22 +1029,24 @@ "min": 1, "max": 15 }, - "smithy.api#pattern": "\\d+" + "smithy.api#pattern": "^\\d+$" } }, "com.amazonaws.cognitoidentity#AmbiguousRoleResolutionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AuthenticatedRole", - "name": "AUTHENTICATED_ROLE" - }, - { - "value": "Deny", - "name": "DENY" + "type": "enum", + "members": { + "AUTHENTICATED_ROLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AuthenticatedRole" + } + }, + "DENY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Deny" } - ] + } } }, "com.amazonaws.cognitoidentity#ClaimName": { @@ -1040,7 +1056,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+" + "smithy.api#pattern": "^[\\p{L}\\p{M}\\p{S}\\p{N}\\p{P}]+$" } }, "com.amazonaws.cognitoidentity#ClaimValue": { @@ -1089,7 +1105,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\w_]+" + "smithy.api#pattern": "^[\\w_]+$" } }, "com.amazonaws.cognitoidentity#CognitoIdentityProviderList": { @@ -1105,7 +1121,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\w._:/-]+" + "smithy.api#pattern": "^[\\w._:/-]+$" } }, "com.amazonaws.cognitoidentity#CognitoIdentityProviderTokenCheck": { @@ -1224,7 +1240,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the CreateIdentityPool action.

" + "smithy.api#documentation": "

Input to the CreateIdentityPool action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#Credentials": { @@ -1297,7 +1314,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the DeleteIdentities action.

" + "smithy.api#documentation": "

Input to the DeleteIdentities action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#DeleteIdentitiesResponse": { @@ -1311,7 +1329,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returned in response to a successful DeleteIdentities\n operation.

" + "smithy.api#documentation": "

Returned in response to a successful DeleteIdentities\n operation.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#DeleteIdentityPool": { @@ -1355,7 +1374,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the DeleteIdentityPool action.

" + "smithy.api#documentation": "

Input to the DeleteIdentityPool action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#DescribeIdentity": { @@ -1399,7 +1419,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the DescribeIdentity action.

" + "smithy.api#documentation": "

Input to the DescribeIdentity action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#DescribeIdentityPool": { @@ -1443,7 +1464,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the DescribeIdentityPool action.

" + "smithy.api#documentation": "

Input to the DescribeIdentityPool action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#DeveloperProviderName": { @@ -1453,7 +1475,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\w._-]+" + "smithy.api#pattern": "^[\\w._-]+$" } }, "com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException": { @@ -1488,18 +1510,20 @@ } }, "com.amazonaws.cognitoidentity#ErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AccessDenied", - "name": "ACCESS_DENIED" - }, - { - "value": "InternalServerError", - "name": "INTERNAL_SERVER_ERROR" + "type": "enum", + "members": { + "ACCESS_DENIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AccessDenied" } - ] + }, + "INTERNAL_SERVER_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalServerError" + } + } } }, "com.amazonaws.cognitoidentity#ExternalServiceException": { @@ -1582,7 +1606,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the GetCredentialsForIdentity action.

" + "smithy.api#documentation": "

Input to the GetCredentialsForIdentity action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#GetCredentialsForIdentityResponse": { @@ -1602,7 +1627,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returned in response to a successful GetCredentialsForIdentity\n operation.

" + "smithy.api#documentation": "

Returned in response to a successful GetCredentialsForIdentity\n operation.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#GetId": { @@ -1669,7 +1695,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the GetId action.

" + "smithy.api#documentation": "

Input to the GetId action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#GetIdResponse": { @@ -1683,7 +1710,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returned in response to a GetId request.

" + "smithy.api#documentation": "

Returned in response to a GetId request.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#GetIdentityPoolRoles": { @@ -1730,7 +1758,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the GetIdentityPoolRoles action.

" + "smithy.api#documentation": "

Input to the GetIdentityPoolRoles action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#GetIdentityPoolRolesResponse": { @@ -1756,7 +1785,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returned in response to a successful GetIdentityPoolRoles\n operation.

" + "smithy.api#documentation": "

Returned in response to a successful GetIdentityPoolRoles\n operation.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#GetOpenIdToken": { @@ -1868,7 +1898,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the GetOpenIdTokenForDeveloperIdentity action.

" + "smithy.api#documentation": "

Input to the GetOpenIdTokenForDeveloperIdentity action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#GetOpenIdTokenForDeveloperIdentityResponse": { @@ -1888,7 +1919,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returned in response to a successful GetOpenIdTokenForDeveloperIdentity\n request.

" + "smithy.api#documentation": "

Returned in response to a successful GetOpenIdTokenForDeveloperIdentity\n request.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#GetOpenIdTokenInput": { @@ -1909,7 +1941,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the GetOpenIdToken action.

" + "smithy.api#documentation": "

Input to the GetOpenIdToken action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#GetOpenIdTokenResponse": { @@ -1929,7 +1962,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returned in response to a successful GetOpenIdToken request.

" + "smithy.api#documentation": "

Returned in response to a successful GetOpenIdToken request.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#GetPrincipalTagAttributeMap": { @@ -1978,6 +2012,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#GetPrincipalTagAttributeMapResponse": { @@ -2007,6 +2044,9 @@ "smithy.api#documentation": "

You can use this operation to add principal tags. The PrincipalTagsoperation enables you to reference user attributes in your IAM permissions policy.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#HideDisabled": { @@ -2060,7 +2100,7 @@ "min": 1, "max": 55 }, - "smithy.api#pattern": "[\\w-]+:[0-9a-f-]+" + "smithy.api#pattern": "^[\\w-]+:[0-9a-f-]+$" } }, "com.amazonaws.cognitoidentity#IdentityIdList": { @@ -2154,7 +2194,7 @@ "min": 1, "max": 55 }, - "smithy.api#pattern": "[\\w-]+:[0-9a-f-]+" + "smithy.api#pattern": "^[\\w-]+:[0-9a-f-]+$" } }, "com.amazonaws.cognitoidentity#IdentityPoolName": { @@ -2164,7 +2204,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\w\\s+=,.@-]+" + "smithy.api#pattern": "^[\\w\\s+=,.@-]+$" } }, "com.amazonaws.cognitoidentity#IdentityPoolShortDescription": { @@ -2221,7 +2261,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\w.;_/-]+" + "smithy.api#pattern": "^[\\w.;_/-]+$" } }, "com.amazonaws.cognitoidentity#IdentityProviderName": { @@ -2382,7 +2422,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the ListIdentities action.

" + "smithy.api#documentation": "

Input to the ListIdentities action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#ListIdentitiesResponse": { @@ -2408,7 +2449,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a ListIdentities request.

" + "smithy.api#documentation": "

The response to a ListIdentities request.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#ListIdentityPools": { @@ -2465,7 +2507,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the ListIdentityPools action.

" + "smithy.api#documentation": "

Input to the ListIdentityPools action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#ListIdentityPoolsResponse": { @@ -2485,7 +2528,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a successful ListIdentityPools action.

" + "smithy.api#documentation": "

The result of a successful ListIdentityPools action.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#ListTagsForResource": { @@ -2527,6 +2571,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#ListTagsForResourceResponse": { @@ -2538,6 +2585,9 @@ "smithy.api#documentation": "

The tags that are assigned to the identity pool.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#LoginsList": { @@ -2630,7 +2680,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the LookupDeveloperIdentityInput action.

" + "smithy.api#documentation": "

Input to the LookupDeveloperIdentityInput action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#LookupDeveloperIdentityResponse": { @@ -2656,7 +2707,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returned in response to a successful LookupDeveloperIdentity\n action.

" + "smithy.api#documentation": "

Returned in response to a successful LookupDeveloperIdentity\n action.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#MappingRule": { @@ -2696,26 +2748,32 @@ } }, "com.amazonaws.cognitoidentity#MappingRuleMatchType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Equals", - "name": "EQUALS" - }, - { - "value": "Contains", - "name": "CONTAINS" - }, - { - "value": "StartsWith", - "name": "STARTS_WITH" - }, - { - "value": "NotEqual", - "name": "NOT_EQUAL" + "type": "enum", + "members": { + "EQUALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Equals" + } + }, + "CONTAINS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Contains" + } + }, + "STARTS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "StartsWith" + } + }, + "NOT_EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NotEqual" } - ] + } } }, "com.amazonaws.cognitoidentity#MappingRulesList": { @@ -2795,7 +2853,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the MergeDeveloperIdentities action.

" + "smithy.api#documentation": "

Input to the MergeDeveloperIdentities action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#MergeDeveloperIdentitiesResponse": { @@ -2809,7 +2868,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returned in response to a successful MergeDeveloperIdentities\n action.

" + "smithy.api#documentation": "

Returned in response to a successful MergeDeveloperIdentities\n action.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#NotAuthorizedException": { @@ -2844,7 +2904,7 @@ "min": 1, "max": 65535 }, - "smithy.api#pattern": "[\\S]+" + "smithy.api#pattern": "^[\\S]+$" } }, "com.amazonaws.cognitoidentity#PrincipalTagID": { @@ -2965,18 +3025,20 @@ } }, "com.amazonaws.cognitoidentity#RoleMappingType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Token", - "name": "TOKEN" - }, - { - "value": "Rules", - "name": "RULES" + "type": "enum", + "members": { + "TOKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Token" } - ] + }, + "RULES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Rules" + } + } } }, "com.amazonaws.cognitoidentity#RoleType": { @@ -2986,7 +3048,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "(un)?authenticated" + "smithy.api#pattern": "^(un)?authenticated$" } }, "com.amazonaws.cognitoidentity#RolesMap": { @@ -3091,7 +3153,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the SetIdentityPoolRoles action.

" + "smithy.api#documentation": "

Input to the SetIdentityPoolRoles action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#SetPrincipalTagAttributeMap": { @@ -3152,6 +3215,9 @@ "smithy.api#documentation": "

You can use this operation to add principal tags.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#SetPrincipalTagAttributeMapResponse": { @@ -3181,6 +3247,9 @@ "smithy.api#documentation": "

You can use this operation to add principal tags. The PrincipalTagsoperation enables you to reference user attributes in your IAM permissions policy.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.cognitoidentity#String": { @@ -3241,11 +3310,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.cognitoidentity#TagValueType": { "type": "string", @@ -3346,7 +3421,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the UnlinkDeveloperIdentity action.

" + "smithy.api#documentation": "

Input to the UnlinkDeveloperIdentity action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#UnlinkIdentity": { @@ -3412,7 +3488,8 @@ } }, "traits": { - "smithy.api#documentation": "

Input to the UnlinkIdentity action.

" + "smithy.api#documentation": "

Input to the UnlinkIdentity action.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#UnprocessedIdentityId": { @@ -3493,11 +3570,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.cognitoidentity#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.cognitoidentity#UpdateIdentityPool": { "type": "operation", diff --git a/codegen/sdk-codegen/aws-models/cognito-sync.json b/codegen/sdk-codegen/aws-models/cognito-sync.json index c88cded2047..6908dc56fcb 100644 --- a/codegen/sdk-codegen/aws-models/cognito-sync.json +++ b/codegen/sdk-codegen/aws-models/cognito-sync.json @@ -162,52 +162,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -215,13 +219,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -231,224 +244,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://cognito-sync-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://cognito-sync-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cognito-sync-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://cognito-sync-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cognito-sync.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://cognito-sync.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://cognito-sync.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://cognito-sync.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -463,8 +427,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -476,8 +440,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -489,8 +453,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -502,8 +466,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -515,8 +479,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -528,8 +492,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -541,8 +505,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -554,8 +518,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -567,8 +531,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -580,8 +544,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -593,8 +557,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -606,8 +570,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -619,8 +583,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -632,8 +596,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -645,8 +609,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -658,8 +622,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -671,8 +635,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -684,8 +648,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -697,8 +661,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -710,8 +674,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -723,8 +687,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -736,8 +700,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -749,8 +724,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -762,8 +748,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -775,8 +772,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -788,8 +796,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -801,8 +809,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -814,8 +822,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -826,8 +834,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -838,10 +846,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -860,6 +874,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "AlreadyStreamed", + "httpResponseCode": 400 + }, "smithy.api#documentation": "An exception thrown when a bulk publish operation is requested less than 24 hours after a previous bulk publish operation completed successfully.", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -868,7 +886,7 @@ "com.amazonaws.cognitosync#ApplicationArn": { "type": "string", "traits": { - "smithy.api#pattern": "arn:aws:sns:[-0-9a-z]+:\\d+:app/[A-Z_]+/[a-zA-Z0-9_.-]+" + "smithy.api#pattern": "^arn:aws:sns:[-0-9a-z]+:\\d+:app/[A-Z_]+/[a-zA-Z0-9_.-]+$" } }, "com.amazonaws.cognitosync#ApplicationArnList": { @@ -884,7 +902,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "arn:aws:iam::\\d+:role/.*" + "smithy.api#pattern": "^arn:aws:iam::\\d+:role/" } }, "com.amazonaws.cognitosync#Boolean": { @@ -943,7 +961,8 @@ } }, "traits": { - "smithy.api#documentation": "The input for the BulkPublish operation." + "smithy.api#documentation": "The input for the BulkPublish operation.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#BulkPublishResponse": { @@ -957,30 +976,37 @@ } }, "traits": { - "smithy.api#documentation": "The output for the BulkPublish operation." + "smithy.api#documentation": "The output for the BulkPublish operation.", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#BulkPublishStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NOT_STARTED", - "name": "NOT_STARTED" - }, - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" + "type": "enum", + "members": { + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_STARTED" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" } - ] + } } }, "com.amazonaws.cognitosync#ClientContext": { @@ -1027,6 +1053,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ConcurrentModification", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

Thrown if there are parallel requests to modify a resource.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1095,7 +1125,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[a-zA-Z0-9_.:-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.:-]+$" } }, "com.amazonaws.cognitosync#Date": { @@ -1167,7 +1197,8 @@ } }, "traits": { - "smithy.api#documentation": "A request to delete the specific\n dataset." + "smithy.api#documentation": "A request to delete the specific\n dataset.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#DeleteDatasetResponse": { @@ -1181,7 +1212,8 @@ } }, "traits": { - "smithy.api#documentation": "Response to a successful DeleteDataset\n request." + "smithy.api#documentation": "Response to a successful DeleteDataset\n request.", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#DescribeDataset": { @@ -1247,7 +1279,8 @@ } }, "traits": { - "smithy.api#documentation": "A request for meta data about a dataset (creation\n date, number of records, size) by owner and dataset name." + "smithy.api#documentation": "A request for meta data about a dataset (creation\n date, number of records, size) by owner and dataset name.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#DescribeDatasetResponse": { @@ -1261,7 +1294,8 @@ } }, "traits": { - "smithy.api#documentation": "Response to a successful DescribeDataset\n request." + "smithy.api#documentation": "Response to a successful DescribeDataset\n request.", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#DescribeIdentityPoolUsage": { @@ -1311,7 +1345,8 @@ } }, "traits": { - "smithy.api#documentation": "A request for usage information about\n the identity pool." + "smithy.api#documentation": "A request for usage information about\n the identity pool.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#DescribeIdentityPoolUsageResponse": { @@ -1325,7 +1360,8 @@ } }, "traits": { - "smithy.api#documentation": "Response to a successful\n DescribeIdentityPoolUsage request." + "smithy.api#documentation": "Response to a successful\n DescribeIdentityPoolUsage request.", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#DescribeIdentityUsage": { @@ -1383,7 +1419,8 @@ } }, "traits": { - "smithy.api#documentation": "A request for information about the usage of\n an identity pool." + "smithy.api#documentation": "A request for information about the usage of\n an identity pool.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#DescribeIdentityUsageResponse": { @@ -1397,7 +1434,8 @@ } }, "traits": { - "smithy.api#documentation": "The response to a successful\n DescribeIdentityUsage request." + "smithy.api#documentation": "The response to a successful\n DescribeIdentityUsage request.", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#DeviceId": { @@ -1421,6 +1459,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "DuplicateRequest", + "httpResponseCode": 400 + }, "smithy.api#documentation": "An exception thrown when there is an IN_PROGRESS bulk publish operation for the given identity pool.", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1488,7 +1530,8 @@ } }, "traits": { - "smithy.api#documentation": "The input for the GetBulkPublishDetails operation." + "smithy.api#documentation": "The input for the GetBulkPublishDetails operation.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#GetBulkPublishDetailsResponse": { @@ -1526,7 +1569,8 @@ } }, "traits": { - "smithy.api#documentation": "The output for the GetBulkPublishDetails operation." + "smithy.api#documentation": "The output for the GetBulkPublishDetails operation.", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#GetCognitoEvents": { @@ -1576,7 +1620,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request for a list of the configured Cognito Events

" + "smithy.api#documentation": "

A request for a list of the configured Cognito Events

", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#GetCognitoEventsResponse": { @@ -1590,7 +1635,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response from the GetCognitoEvents request

" + "smithy.api#documentation": "

The response from the GetCognitoEvents request

", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#GetIdentityPoolConfiguration": { @@ -1640,7 +1686,8 @@ } }, "traits": { - "smithy.api#documentation": "

The input for the GetIdentityPoolConfiguration operation.

" + "smithy.api#documentation": "

The input for the GetIdentityPoolConfiguration operation.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#GetIdentityPoolConfigurationResponse": { @@ -1666,7 +1713,8 @@ } }, "traits": { - "smithy.api#documentation": "

The output for the GetIdentityPoolConfiguration operation.

" + "smithy.api#documentation": "

The output for the GetIdentityPoolConfiguration operation.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#IdentityId": { @@ -1676,7 +1724,7 @@ "min": 1, "max": 55 }, - "smithy.api#pattern": "[\\w-]+:[0-9a-f-]+" + "smithy.api#pattern": "^[\\w-]+:[0-9a-f-]+$" } }, "com.amazonaws.cognitosync#IdentityPoolId": { @@ -1686,7 +1734,7 @@ "min": 1, "max": 55 }, - "smithy.api#pattern": "[\\w-]+:[0-9a-f-]+" + "smithy.api#pattern": "^[\\w-]+:[0-9a-f-]+$" } }, "com.amazonaws.cognitosync#IdentityPoolUsage": { @@ -1773,10 +1821,7 @@ } }, "com.amazonaws.cognitosync#IntegerString": { - "type": "integer", - "traits": { - "smithy.api#default": 0 - } + "type": "integer" }, "com.amazonaws.cognitosync#InternalErrorException": { "type": "structure", @@ -1790,6 +1835,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InternalError", + "httpResponseCode": 500 + }, "smithy.api#documentation": "Indicates an internal service\n error.", "smithy.api#error": "server", "smithy.api#httpError": 500 @@ -1807,6 +1856,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidConfiguration", + "httpResponseCode": 400 + }, "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -1823,6 +1876,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidLambdaFunctionOutput", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The AWS Lambda function returned invalid output or an exception.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1840,6 +1897,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidParameter", + "httpResponseCode": 400 + }, "smithy.api#documentation": "Thrown when a request parameter does not comply\n with the associated constraints.", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1860,6 +1921,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "LambdaThrottled", + "httpResponseCode": 429 + }, "smithy.api#documentation": "

AWS Lambda throttled your account, please contact AWS Support

", "smithy.api#error": "client", "smithy.api#httpError": 429 @@ -1877,6 +1942,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "LimitExceeded", + "httpResponseCode": 400 + }, "smithy.api#documentation": "Thrown when the limit on the number of objects or\n operations has been exceeded.", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1942,14 +2011,14 @@ "MaxResults": { "target": "com.amazonaws.cognitosync#IntegerString", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to be\n returned.", "smithy.api#httpQuery": "maxResults" } } }, "traits": { - "smithy.api#documentation": "Request for a list of datasets for an\n identity." + "smithy.api#documentation": "Request for a list of datasets for an\n identity.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#ListDatasetsResponse": { @@ -1976,7 +2045,8 @@ } }, "traits": { - "smithy.api#documentation": "Returned for a successful ListDatasets\n request." + "smithy.api#documentation": "Returned for a successful ListDatasets\n request.", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#ListIdentityPoolUsage": { @@ -2023,14 +2093,14 @@ "MaxResults": { "target": "com.amazonaws.cognitosync#IntegerString", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to\n be returned.", "smithy.api#httpQuery": "maxResults" } } }, "traits": { - "smithy.api#documentation": "A request for usage information on an\n identity pool." + "smithy.api#documentation": "A request for usage information on an\n identity pool.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#ListIdentityPoolUsageResponse": { @@ -2064,7 +2134,8 @@ } }, "traits": { - "smithy.api#documentation": "Returned for a successful\n ListIdentityPoolUsage request." + "smithy.api#documentation": "Returned for a successful\n ListIdentityPoolUsage request.", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#ListRecords": { @@ -2142,7 +2213,6 @@ "MaxResults": { "target": "com.amazonaws.cognitosync#IntegerString", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to be\n returned.", "smithy.api#httpQuery": "maxResults" } @@ -2156,7 +2226,8 @@ } }, "traits": { - "smithy.api#documentation": "A request for a list of records." + "smithy.api#documentation": "A request for a list of records.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#ListRecordsResponse": { @@ -2221,7 +2292,8 @@ } }, "traits": { - "smithy.api#documentation": "Returned for a successful\n ListRecordsRequest." + "smithy.api#documentation": "Returned for a successful\n ListRecordsRequest.", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#Long": { @@ -2245,47 +2317,59 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "NotAuthorizedError", + "httpResponseCode": 403 + }, "smithy.api#documentation": "Thrown when a user is not authorized to access the\n requested resource.", "smithy.api#error": "client", "smithy.api#httpError": 403 } }, "com.amazonaws.cognitosync#Operation": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "replace", - "name": "replace" - }, - { - "value": "remove", - "name": "remove" + "type": "enum", + "members": { + "replace": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "replace" } - ] + }, + "remove": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "remove" + } + } } }, "com.amazonaws.cognitosync#Platform": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "APNS", - "name": "APNS" - }, - { - "value": "APNS_SANDBOX", - "name": "APNS_SANDBOX" - }, - { - "value": "GCM", - "name": "GCM" - }, - { - "value": "ADM", - "name": "ADM" + "type": "enum", + "members": { + "APNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APNS" } - ] + }, + "APNS_SANDBOX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APNS_SANDBOX" + } + }, + "GCM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GCM" + } + }, + "ADM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADM" + } + } } }, "com.amazonaws.cognitosync#PushSync": { @@ -2498,7 +2582,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to RegisterDevice.

" + "smithy.api#documentation": "

A request to RegisterDevice.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#RegisterDeviceResponse": { @@ -2512,7 +2597,8 @@ } }, "traits": { - "smithy.api#documentation": "

Response to a RegisterDevice request.

" + "smithy.api#documentation": "

Response to a RegisterDevice request.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#ResourceConflictException": { @@ -2527,6 +2613,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ResourceConflict", + "httpResponseCode": 409 + }, "smithy.api#documentation": "Thrown if an update can't be applied because\n the resource was changed by another call and this would result in a conflict.", "smithy.api#error": "client", "smithy.api#httpError": 409 @@ -2544,6 +2634,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ResourceNotFound", + "httpResponseCode": 404 + }, "smithy.api#documentation": "Thrown if the resource doesn't\n exist.", "smithy.api#error": "client", "smithy.api#httpError": 404 @@ -2603,7 +2697,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to configure Cognito Events\"

\"" + "smithy.api#documentation": "

A request to configure Cognito Events\"

\"", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#SetIdentityPoolConfiguration": { @@ -2668,7 +2763,8 @@ } }, "traits": { - "smithy.api#documentation": "

The input for the SetIdentityPoolConfiguration operation.

" + "smithy.api#documentation": "

The input for the SetIdentityPoolConfiguration operation.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#SetIdentityPoolConfigurationResponse": { @@ -2694,7 +2790,8 @@ } }, "traits": { - "smithy.api#documentation": "

The output for the SetIdentityPoolConfiguration operation

" + "smithy.api#documentation": "

The output for the SetIdentityPoolConfiguration operation

", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#StreamName": { @@ -2707,18 +2804,20 @@ } }, "com.amazonaws.cognitosync#StreamingStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" } - ] + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } } }, "com.amazonaws.cognitosync#String": { @@ -2798,14 +2897,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to SubscribeToDatasetRequest.

" + "smithy.api#documentation": "

A request to SubscribeToDatasetRequest.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#SubscribeToDatasetResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Response to a SubscribeToDataset request.

" + "smithy.api#documentation": "

Response to a SubscribeToDataset request.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#SyncSessionToken": { @@ -2823,6 +2924,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "TooManyRequests", + "httpResponseCode": 429 + }, "smithy.api#documentation": "Thrown if the request is\n throttled.", "smithy.api#error": "client", "smithy.api#httpError": 429 @@ -2902,14 +3007,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to UnsubscribeFromDataset.

" + "smithy.api#documentation": "

A request to UnsubscribeFromDataset.

", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#UnsubscribeFromDatasetResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Response to an UnsubscribeFromDataset request.

" + "smithy.api#documentation": "

Response to an UnsubscribeFromDataset request.

", + "smithy.api#output": {} } }, "com.amazonaws.cognitosync#UpdateRecords": { @@ -3013,7 +3120,8 @@ } }, "traits": { - "smithy.api#documentation": "A request to post updates to records or add and\n delete records for a dataset and user." + "smithy.api#documentation": "A request to post updates to records or add and\n delete records for a dataset and user.", + "smithy.api#input": {} } }, "com.amazonaws.cognitosync#UpdateRecordsResponse": { @@ -3027,7 +3135,8 @@ } }, "traits": { - "smithy.api#documentation": "Returned for a successful\n UpdateRecordsRequest." + "smithy.api#documentation": "Returned for a successful\n UpdateRecordsRequest.", + "smithy.api#output": {} } } } diff --git a/codegen/sdk-codegen/aws-models/comprehend.json b/codegen/sdk-codegen/aws-models/comprehend.json index 2b8fb4d1de7..4b5591f9fe6 100644 --- a/codegen/sdk-codegen/aws-models/comprehend.json +++ b/codegen/sdk-codegen/aws-models/comprehend.json @@ -1471,52 +1471,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1524,13 +1528,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1540,224 +1553,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://comprehend-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://comprehend-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://comprehend-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://comprehend-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://comprehend.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://comprehend.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://comprehend.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://comprehend.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/comprehendmedical.json b/codegen/sdk-codegen/aws-models/comprehendmedical.json index a566ff30bc5..61a48ca1796 100644 --- a/codegen/sdk-codegen/aws-models/comprehendmedical.json +++ b/codegen/sdk-codegen/aws-models/comprehendmedical.json @@ -485,52 +485,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -538,13 +542,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -554,224 +567,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://comprehendmedical-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://comprehendmedical-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://comprehendmedical-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://comprehendmedical-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://comprehendmedical.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://comprehendmedical.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://comprehendmedical.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://comprehendmedical.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/config-service.json b/codegen/sdk-codegen/aws-models/config-service.json index 07c3bf0502c..d98e34a8d6b 100644 --- a/codegen/sdk-codegen/aws-models/config-service.json +++ b/codegen/sdk-codegen/aws-models/config-service.json @@ -14463,6 +14463,7 @@ "arnNamespace": "config", "cloudFormationName": "Config", "cloudTrailEventSource": "configservice.amazonaws.com", + "docId": "config-2014-11-12", "endpointPrefix": "config" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/connect-contact-lens.json b/codegen/sdk-codegen/aws-models/connect-contact-lens.json index 259c6d41d22..4b494369795 100644 --- a/codegen/sdk-codegen/aws-models/connect-contact-lens.json +++ b/codegen/sdk-codegen/aws-models/connect-contact-lens.json @@ -127,52 +127,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -180,13 +184,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -196,224 +209,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://contact-lens-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://contact-lens-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://contact-lens-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://contact-lens-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://contact-lens.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://contact-lens.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://contact-lens.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://contact-lens.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -428,8 +392,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -441,8 +405,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -454,8 +418,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -467,8 +431,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -480,8 +444,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -493,8 +457,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -506,8 +470,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -519,8 +483,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -532,8 +496,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -545,8 +509,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -558,8 +522,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -571,8 +535,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -584,8 +548,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -597,8 +561,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -610,8 +574,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -623,8 +587,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -636,8 +600,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -649,8 +613,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -662,8 +626,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -675,8 +650,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -688,8 +674,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -701,8 +698,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -714,8 +722,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -727,8 +735,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -740,8 +748,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -752,8 +760,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -764,10 +772,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -818,7 +832,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.connectcontactlens#CharacterOffset": { @@ -861,7 +875,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.connectcontactlens#InstanceId": { @@ -871,7 +885,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.connectcontactlens#InternalServiceException": { @@ -996,6 +1010,9 @@ "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.connectcontactlens#ListRealtimeContactAnalysisSegmentsResponse": { @@ -1014,6 +1031,9 @@ "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results. If response includes nextToken there are two possible scenarios:

\n \n

If response does not include nextToken, the analysis is completed (successfully or failed) and there are no more segments to retrieve.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.connectcontactlens#MatchedCategories": { @@ -1063,7 +1083,7 @@ "min": 1, "max": 131070 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.connectcontactlens#OffsetMillis": { @@ -1082,7 +1102,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.connectcontactlens#ParticipantRole": { @@ -1092,7 +1112,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.connectcontactlens#PointOfInterest": { @@ -1177,22 +1197,26 @@ } }, "com.amazonaws.connectcontactlens#SentimentValue": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "POSITIVE", - "name": "POSITIVE" - }, - { - "value": "NEUTRAL", - "name": "NEUTRAL" - }, - { - "value": "NEGATIVE", - "name": "NEGATIVE" + "type": "enum", + "members": { + "POSITIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "POSITIVE" + } + }, + "NEUTRAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEUTRAL" } - ] + }, + "NEGATIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEGATIVE" + } + } } }, "com.amazonaws.connectcontactlens#ThrottlingException": { @@ -1282,7 +1306,7 @@ "smithy.api#length": { "min": 1 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.connectcontactlens#TranscriptId": { @@ -1292,7 +1316,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } } } diff --git a/codegen/sdk-codegen/aws-models/connectcases.json b/codegen/sdk-codegen/aws-models/connectcases.json index ddb7a5bf308..e6e918b776b 100644 --- a/codegen/sdk-codegen/aws-models/connectcases.json +++ b/codegen/sdk-codegen/aws-models/connectcases.json @@ -429,54 +429,54 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cases-fips.us-gov-east-1.api.aws" + "url": "https://cases-fips.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cases-fips.us-gov-east-1.amazonaws.com" + "url": "https://cases-fips.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://cases.us-gov-east-1.api.aws" + "url": "https://cases.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cases.us-gov-east-1.amazonaws.com" + "url": "https://cases.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": false } }, @@ -488,8 +488,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -501,8 +501,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -514,8 +514,8 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -527,108 +527,108 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://cases-fips.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cases-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://cases-fips.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://cases.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cases.us-iso-east-1.c2s.ic.gov" + "url": "https://cases.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://cases-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cases-fips.us-east-1.amazonaws.com" + "url": "https://cases-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://cases.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://cases.us-east-1.amazonaws.com" + "url": "https://cases.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": false } }, @@ -638,8 +638,8 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -651,8 +651,8 @@ } }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -662,8 +662,8 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -675,21 +675,34 @@ } }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -700,8 +713,8 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -712,11 +725,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/controltower.json b/codegen/sdk-codegen/aws-models/controltower.json index 47265564f31..18e76c57a76 100644 --- a/codegen/sdk-codegen/aws-models/controltower.json +++ b/codegen/sdk-codegen/aws-models/controltower.json @@ -111,52 +111,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -164,13 +168,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -180,224 +193,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://controltower-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://controltower-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://controltower-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://controltower-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://controltower.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://controltower.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://controltower.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://controltower.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -412,8 +376,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -425,8 +389,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -438,8 +402,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -451,8 +415,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -464,8 +428,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -477,8 +441,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -490,8 +454,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -503,8 +467,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -516,8 +480,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -529,8 +493,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -542,8 +506,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -555,8 +519,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -568,8 +532,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -581,8 +545,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -594,8 +558,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -607,8 +571,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -620,8 +584,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -633,8 +597,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -646,8 +610,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -659,8 +623,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -672,8 +636,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -685,8 +649,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -698,8 +662,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -711,8 +675,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -724,8 +688,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -737,8 +701,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -750,8 +714,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -763,8 +727,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -776,8 +740,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -789,8 +764,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -802,8 +788,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -815,8 +812,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -828,8 +836,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -841,8 +849,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -854,8 +862,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -866,8 +874,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -878,10 +886,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1447,4 +1461,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/cost-and-usage-report-service.json b/codegen/sdk-codegen/aws-models/cost-and-usage-report-service.json index e9a1a4ec327..a58d5dd784a 100644 --- a/codegen/sdk-codegen/aws-models/cost-and-usage-report-service.json +++ b/codegen/sdk-codegen/aws-models/cost-and-usage-report-service.json @@ -52,6 +52,7 @@ "arnNamespace": "cur", "cloudFormationName": "CostandUsageReportService", "cloudTrailEventSource": "costandusagereportservice.amazonaws.com", + "docId": "cur-2017-01-06", "endpointPrefix": "cur" }, "aws.auth#sigv4": { @@ -120,52 +121,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -173,13 +178,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -189,224 +203,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cur-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://cur-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cur-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://cur-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cur.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://cur.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://cur.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://cur.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1003,7 +968,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified report.

" + "smithy.api#documentation": "

Deletes the specified report.

", + "smithy.api#examples": [ + { + "title": "To delete the AWS Cost and Usage report named ExampleReport.", + "documentation": "The following example deletes the AWS Cost and Usage report named ExampleReport.", + "input": { + "ReportName": "ExampleReport" + } + } + ] } }, "com.amazonaws.costandusagereportservice#DeleteReportDefinitionRequest": { @@ -1054,6 +1028,49 @@ ], "traits": { "smithy.api#documentation": "

Lists the AWS Cost and Usage reports available to this account.

", + "smithy.api#examples": [ + { + "title": "To list the AWS Cost and Usage reports for the account.", + "documentation": "The following example lists the AWS Cost and Usage reports for the account.", + "input": { + "MaxResults": 5 + }, + "output": { + "ReportDefinitions": [ + { + "AdditionalArtifacts": [ + "QUICKSIGHT" + ], + "AdditionalSchemaElements": [ + "RESOURCES" + ], + "Compression": "GZIP", + "Format": "textORcsv", + "ReportName": "ExampleReport", + "S3Bucket": "example-s3-bucket", + "S3Prefix": "exampleprefix", + "S3Region": "us-east-1", + "TimeUnit": "HOURLY" + }, + { + "AdditionalArtifacts": [ + "QUICKSIGHT" + ], + "AdditionalSchemaElements": [ + "RESOURCES" + ], + "Compression": "GZIP", + "Format": "textORcsv", + "ReportName": "ExampleReport2", + "S3Bucket": "example-s3-bucket", + "S3Prefix": "exampleprefix", + "S3Region": "us-east-1", + "TimeUnit": "HOURLY" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1215,7 +1232,31 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new report using the description that you provide.

" + "smithy.api#documentation": "

Creates a new report using the description that you provide.

", + "smithy.api#examples": [ + { + "title": "To create a report named ExampleReport.", + "documentation": "The following example creates a AWS Cost and Usage report named ExampleReport.", + "input": { + "ReportDefinition": { + "ReportName": "ExampleReport", + "TimeUnit": "DAILY", + "Format": "textORcsv", + "Compression": "ZIP", + "AdditionalSchemaElements": [ + "RESOURCES" + ], + "S3Bucket": "example-s3-bucket", + "S3Prefix": "exampleprefix", + "S3Region": "us-east-1", + "AdditionalArtifacts": [ + "REDSHIFT", + "QUICKSIGHT" + ] + } + } + } + ] } }, "com.amazonaws.costandusagereportservice#PutReportDefinitionRequest": { diff --git a/codegen/sdk-codegen/aws-models/cost-explorer.json b/codegen/sdk-codegen/aws-models/cost-explorer.json index 59af09a0136..f2bb12892f3 100644 --- a/codegen/sdk-codegen/aws-models/cost-explorer.json +++ b/codegen/sdk-codegen/aws-models/cost-explorer.json @@ -154,6 +154,7 @@ "arnNamespace": "ce", "cloudFormationName": "CostExplorer", "cloudTrailEventSource": "costexplorer.amazonaws.com", + "docId": "ce-2017-10-25", "endpointPrefix": "ce" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/data-pipeline.json b/codegen/sdk-codegen/aws-models/data-pipeline.json index 5e486d57132..491529167ba 100644 --- a/codegen/sdk-codegen/aws-models/data-pipeline.json +++ b/codegen/sdk-codegen/aws-models/data-pipeline.json @@ -79,14 +79,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for ActivatePipeline.

" + "smithy.api#documentation": "

Contains the parameters for ActivatePipeline.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#ActivatePipelineOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of ActivatePipeline.

" + "smithy.api#documentation": "

Contains the output of ActivatePipeline.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#AddTags": { @@ -134,14 +136,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for AddTags.

" + "smithy.api#documentation": "

Contains the parameters for AddTags.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#AddTagsOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of AddTags.

" + "smithy.api#documentation": "

Contains the output of AddTags.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#CreatePipeline": { @@ -195,7 +199,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for CreatePipeline.

" + "smithy.api#documentation": "

Contains the parameters for CreatePipeline.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#CreatePipelineOutput": { @@ -210,7 +215,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of CreatePipeline.

" + "smithy.api#documentation": "

Contains the output of CreatePipeline.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#DataPipeline": { @@ -281,6 +287,7 @@ "arnNamespace": "datapipeline", "cloudFormationName": "DataPipeline", "cloudTrailEventSource": "datapipeline.amazonaws.com", + "docId": "datapipeline-2012-10-29", "endpointPrefix": "datapipeline" }, "aws.auth#sigv4": { @@ -352,52 +359,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -405,13 +416,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -421,224 +441,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://datapipeline-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://datapipeline-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://datapipeline-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://datapipeline-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://datapipeline.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://datapipeline.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://datapipeline.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://datapipeline.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -653,8 +624,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -666,8 +637,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -679,8 +650,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -692,8 +663,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -705,8 +676,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -718,8 +689,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -731,8 +702,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -744,8 +715,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -757,8 +728,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -770,8 +741,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -783,8 +754,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -796,8 +767,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -809,8 +780,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -822,8 +793,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -835,8 +806,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -848,8 +819,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -861,8 +832,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -874,8 +856,30 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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-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 } }, { @@ -887,8 +891,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -900,8 +915,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -913,8 +928,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -926,8 +941,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -938,8 +953,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -950,10 +965,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1004,14 +1025,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DeactivatePipeline.

" + "smithy.api#documentation": "

Contains the parameters for DeactivatePipeline.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#DeactivatePipelineOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of DeactivatePipeline.

" + "smithy.api#documentation": "

Contains the output of DeactivatePipeline.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#DeletePipeline": { @@ -1049,7 +1072,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DeletePipeline.

" + "smithy.api#documentation": "

Contains the parameters for DeletePipeline.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#DescribeObjects": { @@ -1115,7 +1139,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DescribeObjects.

" + "smithy.api#documentation": "

Contains the parameters for DescribeObjects.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#DescribeObjectsOutput": { @@ -1143,7 +1168,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of DescribeObjects.

" + "smithy.api#documentation": "

Contains the output of DescribeObjects.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#DescribePipelines": { @@ -1184,7 +1210,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DescribePipelines.

" + "smithy.api#documentation": "

Contains the parameters for DescribePipelines.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#DescribePipelinesOutput": { @@ -1199,7 +1226,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of DescribePipelines.

" + "smithy.api#documentation": "

Contains the output of DescribePipelines.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#EvaluateExpression": { @@ -1257,7 +1285,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for EvaluateExpression.

" + "smithy.api#documentation": "

Contains the parameters for EvaluateExpression.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#EvaluateExpressionOutput": { @@ -1272,7 +1301,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of EvaluateExpression.

" + "smithy.api#documentation": "

Contains the output of EvaluateExpression.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#Field": { @@ -1346,7 +1376,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for GetPipelineDefinition.

" + "smithy.api#documentation": "

Contains the parameters for GetPipelineDefinition.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#GetPipelineDefinitionOutput": { @@ -1372,7 +1403,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of GetPipelineDefinition.

" + "smithy.api#documentation": "

Contains the output of GetPipelineDefinition.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#InstanceIdentity": { @@ -1461,7 +1493,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for ListPipelines.

" + "smithy.api#documentation": "

Contains the parameters for ListPipelines.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#ListPipelinesOutput": { @@ -1489,7 +1522,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of ListPipelines.

" + "smithy.api#documentation": "

Contains the output of ListPipelines.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#Operator": { @@ -1513,30 +1547,38 @@ } }, "com.amazonaws.datapipeline#OperatorType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EQ", - "name": "Equal" - }, - { - "value": "REF_EQ", - "name": "ReferenceEqual" - }, - { - "value": "LE", - "name": "LessThanOrEqual" - }, - { - "value": "GE", - "name": "GreaterThanOrEqual" - }, - { - "value": "BETWEEN", - "name": "Between" + "type": "enum", + "members": { + "Equal": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EQ" } - ] + }, + "ReferenceEqual": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REF_EQ" + } + }, + "LessThanOrEqual": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LE" + } + }, + "GreaterThanOrEqual": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GE" + } + }, + "Between": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BETWEEN" + } + } } }, "com.amazonaws.datapipeline#ParameterAttribute": { @@ -1811,7 +1853,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for PollForTask.

" + "smithy.api#documentation": "

Contains the parameters for PollForTask.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#PollForTaskOutput": { @@ -1825,7 +1868,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of PollForTask.

" + "smithy.api#documentation": "

Contains the output of PollForTask.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#PutPipelineDefinition": { @@ -1885,7 +1929,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for PutPipelineDefinition.

" + "smithy.api#documentation": "

Contains the parameters for PutPipelineDefinition.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#PutPipelineDefinitionOutput": { @@ -1913,7 +1958,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of PutPipelineDefinition.

" + "smithy.api#documentation": "

Contains the output of PutPipelineDefinition.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#Query": { @@ -1999,7 +2045,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for QueryObjects.

" + "smithy.api#documentation": "

Contains the parameters for QueryObjects.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#QueryObjectsOutput": { @@ -2026,7 +2073,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of QueryObjects.

" + "smithy.api#documentation": "

Contains the output of QueryObjects.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#RemoveTags": { @@ -2074,14 +2122,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for RemoveTags.

" + "smithy.api#documentation": "

Contains the parameters for RemoveTags.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#RemoveTagsOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of RemoveTags.

" + "smithy.api#documentation": "

Contains the output of RemoveTags.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#ReportTaskProgress": { @@ -2131,7 +2181,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for ReportTaskProgress.

" + "smithy.api#documentation": "

Contains the parameters for ReportTaskProgress.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#ReportTaskProgressOutput": { @@ -2147,7 +2198,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of ReportTaskProgress.

" + "smithy.api#documentation": "

Contains the output of ReportTaskProgress.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#ReportTaskRunnerHeartbeat": { @@ -2194,7 +2246,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for ReportTaskRunnerHeartbeat.

" + "smithy.api#documentation": "

Contains the parameters for ReportTaskRunnerHeartbeat.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#ReportTaskRunnerHeartbeatOutput": { @@ -2210,7 +2263,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of ReportTaskRunnerHeartbeat.

" + "smithy.api#documentation": "

Contains the output of ReportTaskRunnerHeartbeat.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#Selector": { @@ -2291,7 +2345,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for SetStatus.

" + "smithy.api#documentation": "

Contains the parameters for SetStatus.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#SetTaskStatus": { @@ -2360,14 +2415,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for SetTaskStatus.

" + "smithy.api#documentation": "

Contains the parameters for SetTaskStatus.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#SetTaskStatusOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of SetTaskStatus.

" + "smithy.api#documentation": "

Contains the output of SetTaskStatus.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#Tag": { @@ -2440,22 +2497,26 @@ } }, "com.amazonaws.datapipeline#TaskStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "FINISHED", - "name": "FINISHED" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "FALSE", - "name": "FALSE" + "type": "enum", + "members": { + "FINISHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FINISHED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + }, + "FALSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FALSE" + } + } } }, "com.amazonaws.datapipeline#ValidatePipelineDefinition": { @@ -2515,7 +2576,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for ValidatePipelineDefinition.

" + "smithy.api#documentation": "

Contains the parameters for ValidatePipelineDefinition.

", + "smithy.api#input": {} } }, "com.amazonaws.datapipeline#ValidatePipelineDefinitionOutput": { @@ -2543,7 +2605,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of ValidatePipelineDefinition.

" + "smithy.api#documentation": "

Contains the output of ValidatePipelineDefinition.

", + "smithy.api#output": {} } }, "com.amazonaws.datapipeline#ValidationError": { @@ -2605,7 +2668,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.datapipeline#attributeValueString": { @@ -2615,7 +2678,7 @@ "min": 0, "max": 10240 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.datapipeline#boolean": { @@ -2643,7 +2706,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.datapipeline#fieldStringValue": { @@ -2653,7 +2716,7 @@ "min": 0, "max": 10240 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.datapipeline#id": { @@ -2663,7 +2726,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.datapipeline#idList": { @@ -2682,7 +2745,7 @@ "min": 0, "max": 20971520 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.datapipeline#pipelineList": { @@ -2698,7 +2761,7 @@ "min": 0, "max": 1024 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.datapipeline#stringList": { @@ -2744,7 +2807,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.datapipeline#timestamp": { @@ -2757,7 +2820,7 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*" + "smithy.api#pattern": "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$" } }, "com.amazonaws.datapipeline#validationMessages": { diff --git a/codegen/sdk-codegen/aws-models/database-migration-service.json b/codegen/sdk-codegen/aws-models/database-migration-service.json index bcd6926bc86..a52cd5841bf 100644 --- a/codegen/sdk-codegen/aws-models/database-migration-service.json +++ b/codegen/sdk-codegen/aws-models/database-migration-service.json @@ -474,6 +474,7 @@ "arnNamespace": "dms", "cloudFormationName": "DMS", "cloudTrailEventSource": "databasemigrationservice.amazonaws.com", + "docId": "dms-2016-01-01", "endpointPrefix": "dms" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/databrew.json b/codegen/sdk-codegen/aws-models/databrew.json index 4250471ccda..2856d6e92e7 100644 --- a/codegen/sdk-codegen/aws-models/databrew.json +++ b/codegen/sdk-codegen/aws-models/databrew.json @@ -240,52 +240,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -293,13 +297,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -309,92 +322,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://databrew-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://databrew-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -403,149 +407,109 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://databrew.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "Region" }, - { - "conditions": [], - "endpoint": { - "url": "https://databrew-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "us-gov-west-1" ] } - ] + ], + "endpoint": { + "url": "https://databrew.us-gov-west-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://databrew-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://databrew.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://databrew.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://databrew.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://databrew.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -560,8 +524,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -573,8 +537,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -586,8 +550,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -599,8 +563,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -612,8 +576,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -625,8 +589,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -638,8 +602,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -651,8 +615,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -664,8 +628,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -677,8 +641,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -690,8 +654,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -703,8 +667,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -716,8 +680,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -729,8 +693,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -742,8 +706,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -755,8 +719,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -768,8 +732,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -781,8 +745,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -794,8 +758,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -807,8 +771,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -820,8 +784,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -833,8 +797,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -846,8 +810,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -859,8 +823,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -872,8 +836,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -885,8 +849,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -898,8 +862,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -911,8 +875,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -924,8 +888,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -937,8 +901,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -950,8 +914,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -963,8 +927,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -976,8 +940,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -989,8 +964,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1002,8 +988,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1015,8 +1012,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1028,8 +1036,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1041,8 +1049,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1054,8 +1062,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1066,8 +1074,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1078,10 +1086,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1223,6 +1237,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#BatchDeleteRecipeVersionResponse": { @@ -1241,6 +1258,9 @@ "smithy.api#documentation": "

Errors, if any, that occurred while attempting to delete the recipe versions.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#Bucket": { @@ -1574,6 +1594,9 @@ "smithy.api#documentation": "

Metadata tags to apply to this dataset.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#CreateDatasetResponse": { @@ -1586,6 +1609,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#CreateProfileJob": { @@ -1715,6 +1741,9 @@ "smithy.api#documentation": "

Sample configuration for profile jobs only. Determines the number of rows on which the\n profile job will be executed. If a JobSample value is not provided, the default value\n will be used. The default value is CUSTOM_ROWS for the mode parameter and 20000 for the\n size parameter.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#CreateProfileJobResponse": { @@ -1727,6 +1756,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#CreateProject": { @@ -1800,6 +1832,9 @@ "smithy.api#documentation": "

Metadata tags to apply to this project.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#CreateProjectResponse": { @@ -1812,6 +1847,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#CreateRecipe": { @@ -1971,6 +2009,9 @@ "smithy.api#documentation": "

The job's timeout in minutes. A job that attempts to run longer than this timeout\n period ends with a status of TIMEOUT.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#CreateRecipeJobResponse": { @@ -1983,6 +2024,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#CreateRecipeRequest": { @@ -2014,6 +2058,9 @@ "smithy.api#documentation": "

Metadata tags to apply to this recipe.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#CreateRecipeResponse": { @@ -2026,6 +2073,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#CreateRuleset": { @@ -2092,6 +2142,9 @@ "smithy.api#documentation": "

Metadata tags to apply to the ruleset.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#CreateRulesetResponse": { @@ -2104,6 +2157,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#CreateSchedule": { @@ -2163,6 +2219,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#CreateScheduleResponse": { @@ -2175,6 +2234,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#CreatedBy": { @@ -2656,6 +2718,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DeleteDatasetResponse": { @@ -2668,6 +2733,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DeleteJob": { @@ -2709,6 +2777,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DeleteJobResponse": { @@ -2721,6 +2792,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DeleteProject": { @@ -2762,6 +2836,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DeleteProjectResponse": { @@ -2774,6 +2851,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DeleteRecipeVersion": { @@ -2823,6 +2903,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DeleteRecipeVersionResponse": { @@ -2842,6 +2925,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DeleteRuleset": { @@ -2883,6 +2969,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DeleteRulesetResponse": { @@ -2895,6 +2984,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DeleteSchedule": { @@ -2933,6 +3025,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DeleteScheduleResponse": { @@ -2945,6 +3040,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#Delimiter": { @@ -2992,6 +3090,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DescribeDatasetResponse": { @@ -3067,6 +3168,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the dataset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DescribeJob": { @@ -3105,6 +3209,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DescribeJobResponse": { @@ -3255,6 +3362,9 @@ "smithy.api#documentation": "

Sample configuration for profile jobs only. Determines the number of rows on which the\n profile job will be executed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DescribeJobRun": { @@ -3301,6 +3411,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DescribeJobRunResponse": { @@ -3420,6 +3533,9 @@ "smithy.api#documentation": "

Sample configuration for profile jobs only. Determines the number of rows on which the\n profile job will be executed. If a JobSample value is not provided, the default value\n will be used. The default value is CUSTOM_ROWS for the mode parameter and 20000 for the\n size parameter.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DescribeProject": { @@ -3458,6 +3574,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DescribeProjectResponse": { @@ -3545,6 +3664,9 @@ "smithy.api#documentation": "

The date and time when the project was opened.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DescribeRecipe": { @@ -3590,6 +3712,9 @@ "smithy.api#httpQuery": "recipeVersion" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DescribeRecipeResponse": { @@ -3674,6 +3799,9 @@ "smithy.api#documentation": "

The recipe version identifier.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DescribeRuleset": { @@ -3712,6 +3840,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DescribeRulesetResponse": { @@ -3778,6 +3909,9 @@ "smithy.api#documentation": "

Metadata tags that have been applied to the ruleset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#DescribeSchedule": { @@ -3816,6 +3950,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#DescribeScheduleResponse": { @@ -3876,6 +4013,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#Disabled": { @@ -4652,6 +4792,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#ListDatasetsResponse": { @@ -4670,6 +4813,9 @@ "smithy.api#documentation": "

A token that you can use in a subsequent call to retrieve the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ListJobRuns": { @@ -4728,6 +4874,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#ListJobRunsResponse": { @@ -4746,6 +4895,9 @@ "smithy.api#documentation": "

A token that you can use in a subsequent call to retrieve the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ListJobs": { @@ -4807,6 +4959,9 @@ "smithy.api#httpQuery": "projectName" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#ListJobsResponse": { @@ -4825,6 +4980,9 @@ "smithy.api#documentation": "

A token that you can use in a subsequent call to retrieve the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ListProjects": { @@ -4872,6 +5030,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#ListProjectsResponse": { @@ -4890,6 +5051,9 @@ "smithy.api#documentation": "

A token that you can use in a subsequent call to retrieve the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ListRecipeVersions": { @@ -4945,6 +5109,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#ListRecipeVersionsResponse": { @@ -4963,6 +5130,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ListRecipes": { @@ -5017,6 +5187,9 @@ "smithy.api#httpQuery": "recipeVersion" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#ListRecipesResponse": { @@ -5035,6 +5208,9 @@ "smithy.api#documentation": "

A token that you can use in a subsequent call to retrieve the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ListRulesets": { @@ -5092,6 +5268,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#ListRulesetsResponse": { @@ -5110,6 +5289,9 @@ "smithy.api#documentation": "

A token that you can use in a subsequent call to retrieve the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ListSchedules": { @@ -5164,6 +5346,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#ListSchedulesResponse": { @@ -5182,6 +5367,9 @@ "smithy.api#documentation": "

A token that you can use in a subsequent call to retrieve the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ListTagsForResource": { @@ -5223,6 +5411,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#ListTagsForResourceResponse": { @@ -5234,6 +5425,9 @@ "smithy.api#documentation": "

A list of tags associated with the DataBrew resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#LocaleCode": { @@ -5817,6 +6011,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#PublishRecipeResponse": { @@ -5829,6 +6026,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#PublishedBy": { @@ -6535,6 +6735,9 @@ "ViewFrame": { "target": "com.amazonaws.databrew#ViewFrame" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#SendProjectSessionActionResponse": { @@ -6559,6 +6762,9 @@ "smithy.api#documentation": "

A unique identifier for the action that was performed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ServiceQuotaExceededException": { @@ -6754,6 +6960,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#StartJobRunResponse": { @@ -6766,6 +6975,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#StartProjectSession": { @@ -6817,6 +7029,9 @@ "smithy.api#documentation": "

A value that, if true, enables you to take control of a session, even if a different\n client is currently accessing the project.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#StartProjectSessionResponse": { @@ -6835,6 +7050,9 @@ "smithy.api#documentation": "

A system-generated identifier for the session.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#StartRowIndex": { @@ -6974,6 +7192,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#StopJobRunResponse": { @@ -6986,6 +7207,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#TableName": { @@ -7079,11 +7303,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.databrew#TagValue": { "type": "string", @@ -7252,11 +7482,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.databrew#UpdateDataset": { "type": "operation", @@ -7318,6 +7554,9 @@ "smithy.api#documentation": "

A set of options that defines how DataBrew interprets an Amazon S3 path of the dataset.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#UpdateDatasetResponse": { @@ -7330,6 +7569,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#UpdateProfileJob": { @@ -7441,6 +7683,9 @@ "smithy.api#documentation": "

Sample configuration for Profile Jobs only. Determines the number of rows on which the\n Profile job will be executed. If a JobSample value is not provided for profile jobs, the\n default value will be used. The default value is CUSTOM_ROWS for the mode parameter and\n 20000 for the size parameter.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#UpdateProfileJobResponse": { @@ -7453,6 +7698,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#UpdateProject": { @@ -7501,6 +7749,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#UpdateProjectResponse": { @@ -7519,6 +7770,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#UpdateRecipe": { @@ -7649,6 +7903,9 @@ "smithy.api#documentation": "

The job's timeout in minutes. A job that attempts to run longer than this timeout\n period ends with a status of TIMEOUT.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#UpdateRecipeJobResponse": { @@ -7661,6 +7918,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#UpdateRecipeRequest": { @@ -7686,6 +7946,9 @@ "smithy.api#documentation": "

One or more steps to be performed by the recipe. Each step consists of an action, and\n the conditions under which the action should succeed.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#UpdateRecipeResponse": { @@ -7698,6 +7961,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#UpdateRuleset": { @@ -7749,6 +8015,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#UpdateRulesetResponse": { @@ -7761,6 +8030,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#UpdateSchedule": { @@ -7815,6 +8087,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.databrew#UpdateScheduleResponse": { @@ -7827,6 +8102,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.databrew#ValidationConfiguration": { diff --git a/codegen/sdk-codegen/aws-models/dataexchange.json b/codegen/sdk-codegen/aws-models/dataexchange.json index 61bb414530f..62dc8900e8c 100644 --- a/codegen/sdk-codegen/aws-models/dataexchange.json +++ b/codegen/sdk-codegen/aws-models/dataexchange.json @@ -1159,52 +1159,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1212,13 +1216,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1228,224 +1241,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://dataexchange-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://dataexchange-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://dataexchange-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://dataexchange-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://dataexchange.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://dataexchange.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://dataexchange.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://dataexchange.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1460,8 +1424,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1473,8 +1437,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1486,8 +1450,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1499,8 +1463,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1512,8 +1476,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1525,8 +1489,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1538,8 +1502,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1551,8 +1515,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1564,8 +1528,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1577,8 +1541,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1590,8 +1554,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1603,8 +1567,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1616,8 +1580,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1629,8 +1593,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1642,8 +1606,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1655,8 +1619,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1668,8 +1632,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1681,8 +1645,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1694,8 +1658,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1707,8 +1671,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1720,8 +1684,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1733,8 +1697,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1744,8 +1708,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1757,8 +1721,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1768,8 +1732,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1781,8 +1745,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1792,8 +1756,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1805,8 +1769,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1816,8 +1780,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1829,8 +1793,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1842,8 +1806,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1855,8 +1819,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1867,8 +1831,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1879,8 +1843,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } }, diff --git a/codegen/sdk-codegen/aws-models/dax.json b/codegen/sdk-codegen/aws-models/dax.json index ac3ed6050e7..cecd8019353 100644 --- a/codegen/sdk-codegen/aws-models/dax.json +++ b/codegen/sdk-codegen/aws-models/dax.json @@ -174,52 +174,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -227,13 +231,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -243,224 +256,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://dax-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://dax-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://dax-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://dax-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://dax.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://dax.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://dax.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://dax.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -475,8 +439,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -488,8 +452,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -501,8 +465,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -514,8 +478,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -527,8 +491,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -540,8 +504,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -553,8 +517,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -566,8 +530,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -579,8 +543,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -592,8 +556,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -605,8 +569,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -618,8 +582,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -631,8 +595,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -644,8 +608,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -657,8 +621,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -670,8 +634,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -683,8 +647,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -696,8 +660,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -709,8 +673,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -722,8 +686,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -735,8 +699,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -748,8 +712,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -761,8 +725,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -774,8 +738,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -787,8 +751,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -800,8 +775,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -813,8 +799,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -826,8 +823,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -839,8 +847,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -852,8 +860,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -865,8 +873,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -877,8 +885,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -889,10 +897,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -909,18 +923,20 @@ "type": "string" }, "com.amazonaws.dax#ChangeType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IMMEDIATE", - "name": "IMMEDIATE" - }, - { - "value": "REQUIRES_REBOOT", - "name": "REQUIRES_REBOOT" + "type": "enum", + "members": { + "IMMEDIATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IMMEDIATE" + } + }, + "REQUIRES_REBOOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REQUIRES_REBOOT" } - ] + } } }, "com.amazonaws.dax#Cluster": { @@ -1047,24 +1063,30 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ClusterAlreadyExists", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

You already have a DAX cluster with the given identifier.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, "com.amazonaws.dax#ClusterEndpointEncryptionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "TLS", - "name": "TLS" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" } - ] + }, + "TLS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TLS" + } + } } }, "com.amazonaws.dax#ClusterList": { @@ -1087,6 +1109,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ClusterNotFound", + "httpResponseCode": 404 + }, "smithy.api#documentation": "

The requested cluster ID does not refer to an existing DAX cluster.

", "smithy.api#error": "client", "smithy.api#httpError": 404 @@ -1100,6 +1126,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ClusterQuotaForCustomerExceeded", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

You have attempted to exceed the maximum number of DAX clusters for your AWS\n account.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1256,6 +1286,9 @@ "smithy.api#documentation": "

The type of encryption the cluster's endpoint should support. Values are:

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#CreateClusterResponse": { @@ -1267,6 +1300,9 @@ "smithy.api#documentation": "

A description of the DAX cluster that you have created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#CreateParameterGroup": { @@ -1317,6 +1353,9 @@ "smithy.api#documentation": "

A description of the parameter group.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#CreateParameterGroupResponse": { @@ -1328,6 +1367,9 @@ "smithy.api#documentation": "

Represents the output of a CreateParameterGroup\n action.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#CreateSubnetGroup": { @@ -1382,6 +1424,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#CreateSubnetGroupResponse": { @@ -1393,6 +1438,9 @@ "smithy.api#documentation": "

Represents the output of a CreateSubnetGroup\n operation.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DecreaseReplicationFactor": { @@ -1457,6 +1505,9 @@ "smithy.api#documentation": "

The unique identifiers of the nodes to be removed from the cluster.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DecreaseReplicationFactorResponse": { @@ -1468,6 +1519,9 @@ "smithy.api#documentation": "

A description of the DAX cluster, after you have decreased its replication\n factor.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DeleteCluster": { @@ -1509,6 +1563,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DeleteClusterResponse": { @@ -1520,6 +1577,9 @@ "smithy.api#documentation": "

A description of the DAX cluster that is being deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DeleteParameterGroup": { @@ -1561,6 +1621,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DeleteParameterGroupResponse": { @@ -1572,6 +1635,9 @@ "smithy.api#documentation": "

A user-specified message for this action (i.e., a reason for deleting the parameter\n group).

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DeleteSubnetGroup": { @@ -1607,6 +1673,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DeleteSubnetGroupResponse": { @@ -1618,6 +1687,9 @@ "smithy.api#documentation": "

A user-specified message for this action (i.e., a reason for deleting the subnet\n group).

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DescribeClusters": { @@ -1667,6 +1739,9 @@ "smithy.api#documentation": "

An optional token returned from a prior request. Use this token for pagination of\n results from this action. If this parameter is specified, the response includes only\n results beyond the token, up to the value specified by\n MaxResults.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DescribeClustersResponse": { @@ -1684,6 +1759,9 @@ "smithy.api#documentation": "

The descriptions of your DAX clusters, in response to a\n DescribeClusters request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DescribeDefaultParameters": { @@ -1724,6 +1802,9 @@ "smithy.api#documentation": "

An optional token returned from a prior request. Use this token for pagination of\n results from this action. If this parameter is specified, the response includes only\n results beyond the token, up to the value specified by\n MaxResults.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DescribeDefaultParametersResponse": { @@ -1741,6 +1822,9 @@ "smithy.api#documentation": "

A list of parameters. Each element in the list represents one parameter.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DescribeEvents": { @@ -1811,6 +1895,9 @@ "smithy.api#documentation": "

An optional token returned from a prior request. Use this token for pagination of\n results from this action. If this parameter is specified, the response includes only\n results beyond the token, up to the value specified by\n MaxResults.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DescribeEventsResponse": { @@ -1828,6 +1915,9 @@ "smithy.api#documentation": "

An array of events. Each element in the array represents one event.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DescribeParameterGroups": { @@ -1877,6 +1967,9 @@ "smithy.api#documentation": "

An optional token returned from a prior request. Use this token for pagination of\n results from this action. If this parameter is specified, the response includes only\n results beyond the token, up to the value specified by\n MaxResults.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DescribeParameterGroupsResponse": { @@ -1894,6 +1987,9 @@ "smithy.api#documentation": "

An array of parameter groups. Each element in the array represents one parameter group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DescribeParameters": { @@ -1950,6 +2046,9 @@ "smithy.api#documentation": "

An optional token returned from a prior request. Use this token for pagination of\n results from this action. If this parameter is specified, the response includes only\n results beyond the token, up to the value specified by\n MaxResults.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DescribeParametersResponse": { @@ -1967,6 +2066,9 @@ "smithy.api#documentation": "

A list of parameters within a parameter group. Each element in the list represents one parameter.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#DescribeSubnetGroups": { @@ -2010,6 +2112,9 @@ "smithy.api#documentation": "

An optional token returned from a prior request. Use this token for pagination of\n results from this action. If this parameter is specified, the response includes only\n results beyond the token, up to the value specified by\n MaxResults.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#DescribeSubnetGroupsResponse": { @@ -2027,6 +2132,9 @@ "smithy.api#documentation": "

An array of subnet groups. Each element in the array represents a single subnet group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#Endpoint": { @@ -2162,6 +2270,9 @@ "smithy.api#documentation": "

The Availability Zones (AZs) in which the cluster nodes will be created. All nodes\n belonging to the cluster are placed in these Availability Zones. Use this parameter if you want\n to distribute the nodes across multiple AZs.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#IncreaseReplicationFactorResponse": { @@ -2173,6 +2284,9 @@ "smithy.api#documentation": "

A description of the DAX cluster. with its new replication factor.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#InsufficientClusterCapacityFault": { @@ -2183,6 +2297,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InsufficientClusterCapacity", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

There are not enough system resources to create the cluster you requested (or to\n resize an already-existing cluster).

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2205,6 +2323,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidARN", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The Amazon Resource Name (ARN) supplied in the request is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2218,6 +2340,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidClusterState", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The requested DAX cluster is not in the available\n state.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2231,6 +2357,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidParameterCombination", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

Two or more incompatible parameters were specified.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2244,6 +2374,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidParameterGroupState", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

One or more parameters in a parameter group are in an invalid state.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2257,6 +2391,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidParameterValue", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The value for a parameter is invalid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2270,6 +2408,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidSubnet", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

An invalid subnet identifier was specified.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2283,28 +2425,36 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidVPCNetworkStateFault", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The VPC network is in an invalid state.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, "com.amazonaws.dax#IsModifiable": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "TRUE", - "name": "TRUE" - }, - { - "value": "FALSE", - "name": "FALSE" - }, - { - "value": "CONDITIONAL", - "name": "CONDITIONAL" + "type": "enum", + "members": { + "TRUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TRUE" + } + }, + "FALSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FALSE" + } + }, + "CONDITIONAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONDITIONAL" } - ] + } } }, "com.amazonaws.dax#KeyList": { @@ -2361,6 +2511,9 @@ "smithy.api#documentation": "

An optional token returned from a prior request. Use this token for pagination of\n results from this action. If this parameter is specified, the response includes only\n results beyond the token.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#ListTagsResponse": { @@ -2378,6 +2531,9 @@ "smithy.api#documentation": "

If this value is present, there are additional results to be displayed. To retrieve them, call \n ListTags again, with NextToken set to this value.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#Node": { @@ -2444,6 +2600,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "NodeNotFound", + "httpResponseCode": 404 + }, "smithy.api#documentation": "

None of the nodes in the cluster have the given node ID.

", "smithy.api#error": "client", "smithy.api#httpError": 404 @@ -2457,6 +2617,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "NodeQuotaForClusterExceeded", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

You have attempted to exceed the maximum number of nodes for a DAX\n cluster.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2470,6 +2634,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "NodeQuotaForCustomerExceeded", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

You have attempted to exceed the maximum number of nodes for your AWS\n account.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2617,6 +2785,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ParameterGroupAlreadyExists", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The specified parameter group already exists.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2642,6 +2814,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ParameterGroupNotFound", + "httpResponseCode": 404 + }, "smithy.api#documentation": "

The specified parameter group does not exist.

", "smithy.api#error": "client", "smithy.api#httpError": 404 @@ -2655,6 +2831,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ParameterGroupQuotaExceeded", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

You have attempted to exceed the maximum number of parameter groups.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2719,18 +2899,20 @@ } }, "com.amazonaws.dax#ParameterType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DEFAULT", - "name": "DEFAULT" - }, - { - "value": "NODE_TYPE_SPECIFIC", - "name": "NODE_TYPE_SPECIFIC" + "type": "enum", + "members": { + "DEFAULT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEFAULT" + } + }, + "NODE_TYPE_SPECIFIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NODE_TYPE_SPECIFIC" } - ] + } } }, "com.amazonaws.dax#RebootNode": { @@ -2782,6 +2964,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#RebootNodeResponse": { @@ -2793,6 +2978,9 @@ "smithy.api#documentation": "

A description of the DAX cluster after a node has been rebooted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#SSEDescription": { @@ -2828,26 +3016,32 @@ } }, "com.amazonaws.dax#SSEStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENABLING", - "name": "ENABLING" - }, - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLING", - "name": "DISABLING" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "ENABLING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLING" + } + }, + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" } - ] + }, + "DISABLING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLING" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } } }, "com.amazonaws.dax#SecurityGroupIdentifierList": { @@ -2890,6 +3084,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ServiceLinkedRoleNotFoundFault", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The specified service linked role (SLR) was not found.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2899,28 +3097,36 @@ "type": "structure", "members": {}, "traits": { + "aws.protocols#awsQueryError": { + "code": "ServiceQuotaExceeded", + "httpResponseCode": 402 + }, "smithy.api#documentation": "

You have reached the maximum number of x509 certificates that can be created for\n encrypted clusters in a 30 day period. Contact AWS customer support to discuss options\n for continuing to create encrypted clusters.

", "smithy.api#error": "client", "smithy.api#httpError": 402 } }, "com.amazonaws.dax#SourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CLUSTER", - "name": "CLUSTER" - }, - { - "value": "PARAMETER_GROUP", - "name": "PARAMETER_GROUP" - }, - { - "value": "SUBNET_GROUP", - "name": "SUBNET_GROUP" + "type": "enum", + "members": { + "CLUSTER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLUSTER" } - ] + }, + "PARAMETER_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARAMETER_GROUP" + } + }, + "SUBNET_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUBNET_GROUP" + } + } } }, "com.amazonaws.dax#String": { @@ -2986,6 +3192,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "SubnetGroupAlreadyExists", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The specified subnet group already exists.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2999,6 +3209,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "SubnetGroupInUse", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The specified subnet group is currently in use.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -3024,6 +3238,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "SubnetGroupNotFoundFault", + "httpResponseCode": 404 + }, "smithy.api#documentation": "

The requested subnet group name does not refer to an existing subnet\n group.

", "smithy.api#error": "client", "smithy.api#httpError": 404 @@ -3037,6 +3255,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "SubnetGroupQuotaExceeded", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The request cannot be processed because it would exceed the allowed number of\n subnets in a subnet group.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -3056,6 +3278,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "SubnetInUse", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The requested subnet is being used by another subnet group.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -3075,6 +3301,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "SubnetQuotaExceededFault", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The request cannot be processed because it would exceed the allowed number of\n subnets in a subnet group.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -3117,6 +3347,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "TagNotFound", + "httpResponseCode": 404 + }, "smithy.api#documentation": "

The tag does not exist.

", "smithy.api#error": "client", "smithy.api#httpError": 404 @@ -3130,6 +3364,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "TagQuotaPerResourceExceeded", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

You have exceeded the maximum number of tags for this DAX cluster.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -3187,6 +3425,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#TagResourceResponse": { @@ -3198,6 +3439,9 @@ "smithy.api#documentation": "

The list of tags that are associated with the DAX resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#UntagResource": { @@ -3252,6 +3496,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#UntagResourceResponse": { @@ -3263,6 +3510,9 @@ "smithy.api#documentation": "

The tag keys that have been removed from the cluster.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#UpdateCluster": { @@ -3346,6 +3596,9 @@ "smithy.api#documentation": "

A list of user-specified security group IDs to be assigned to each node in the DAX cluster. If this parameter is not \n specified, DAX assigns the default VPC security group to each node.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#UpdateClusterResponse": { @@ -3357,6 +3610,9 @@ "smithy.api#documentation": "

A description of the DAX cluster, after it has been modified.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#UpdateParameterGroup": { @@ -3405,6 +3661,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#UpdateParameterGroupResponse": { @@ -3416,6 +3675,9 @@ "smithy.api#documentation": "

The parameter group that has been modified.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.dax#UpdateSubnetGroup": { @@ -3469,6 +3731,9 @@ "smithy.api#documentation": "

A list of subnet IDs in the subnet group.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.dax#UpdateSubnetGroupResponse": { @@ -3480,6 +3745,9 @@ "smithy.api#documentation": "

The subnet group that has been modified.

" } } + }, + "traits": { + "smithy.api#output": {} } } } diff --git a/codegen/sdk-codegen/aws-models/device-farm.json b/codegen/sdk-codegen/aws-models/device-farm.json index 1e81a23c978..2aee36c4bd4 100644 --- a/codegen/sdk-codegen/aws-models/device-farm.json +++ b/codegen/sdk-codegen/aws-models/device-farm.json @@ -527,7 +527,22 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a device pool.

" + "smithy.api#documentation": "

Creates a device pool.

", + "smithy.api#examples": [ + { + "title": "To create a new device pool", + "documentation": "The following example creates a new device pool named MyDevicePool inside an existing project.", + "input": { + "projectArn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456", + "name": "MyDevicePool", + "description": "My Android devices", + "rules": [] + }, + "output": { + "devicePool": {} + } + } + ] } }, "com.amazonaws.devicefarm#CreateDevicePoolRequest": { @@ -568,7 +583,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the create device pool operation.

" + "smithy.api#documentation": "

Represents a request to the create device pool operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#CreateDevicePoolResult": { @@ -582,7 +598,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a create device pool request.

" + "smithy.api#documentation": "

Represents the result of a create device pool request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#CreateInstanceProfile": { @@ -645,6 +662,9 @@ "smithy.api#documentation": "

When set to true, Device Farm reboots the instance after a test run. The default value is\n true.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#CreateInstanceProfileResult": { @@ -656,6 +676,9 @@ "smithy.api#documentation": "

An object that contains information about your instance profile.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#CreateNetworkProfile": { @@ -763,6 +786,9 @@ "smithy.api#documentation": "

Proportion of received packets that fail to arrive from 0 to 100 percent.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#CreateNetworkProfileResult": { @@ -774,6 +800,9 @@ "smithy.api#documentation": "

The network profile that is returned by the create network profile\n request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#CreateProject": { @@ -829,7 +858,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the create project operation.

" + "smithy.api#documentation": "

Represents a request to the create project operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#CreateProjectResult": { @@ -843,7 +873,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a create project request.

" + "smithy.api#documentation": "

Represents the result of a create project request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#CreateRemoteAccessSession": { @@ -869,7 +900,24 @@ } ], "traits": { - "smithy.api#documentation": "

Specifies and starts a remote access session.

" + "smithy.api#documentation": "

Specifies and starts a remote access session.

", + "smithy.api#examples": [ + { + "title": "To create a remote access session", + "documentation": "The following example creates a remote access session named MySession.", + "input": { + "projectArn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456", + "deviceArn": "arn:aws:devicefarm:us-west-2::device:123EXAMPLE", + "name": "MySession", + "configuration": { + "billingMethod": "METERED" + } + }, + "output": { + "remoteAccessSession": {} + } + } + ] } }, "com.amazonaws.devicefarm#CreateRemoteAccessSessionConfiguration": { @@ -971,7 +1019,8 @@ } }, "traits": { - "smithy.api#documentation": "

Creates and submits a request to start a remote access session.

" + "smithy.api#documentation": "

Creates and submits a request to start a remote access session.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#CreateRemoteAccessSessionResult": { @@ -985,7 +1034,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the server response from a request to create a remote access\n session.

" + "smithy.api#documentation": "

Represents the server response from a request to create a remote access\n session.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#CreateTestGridProject": { @@ -1033,6 +1083,9 @@ "smithy.api#documentation": "

The VPC security groups and subnets that are attached to a project.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#CreateTestGridProjectResult": { @@ -1044,6 +1097,9 @@ "smithy.api#documentation": "

ARN of the Selenium testing project that was created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#CreateTestGridUrl": { @@ -1086,6 +1142,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#CreateTestGridUrlResult": { @@ -1103,6 +1162,9 @@ "smithy.api#documentation": "

The number of seconds the URL from CreateTestGridUrlResult$url stays active.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#CreateUpload": { @@ -1163,7 +1225,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the create upload operation.

" + "smithy.api#documentation": "

Represents a request to the create upload operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#CreateUploadResult": { @@ -1177,7 +1240,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a create upload request.

" + "smithy.api#documentation": "

Represents the result of a create upload request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#CreateVPCEConfiguration": { @@ -1233,6 +1297,9 @@ "smithy.api#documentation": "

An optional description that provides details about your VPC endpoint configuration.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#CreateVPCEConfigurationResult": { @@ -1244,6 +1311,9 @@ "smithy.api#documentation": "

An object that contains information about your VPC endpoint configuration.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#CurrencyCode": { @@ -1309,7 +1379,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a device pool given the pool ARN. Does not allow deletion of curated pools\n owned by the system.

" + "smithy.api#documentation": "

Deletes a device pool given the pool ARN. Does not allow deletion of curated pools\n owned by the system.

", + "smithy.api#examples": [ + { + "title": "To delete a device pool", + "documentation": "The following example deletes a specific device pool.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2::devicepool:123-456-EXAMPLE-GUID" + }, + "output": {} + } + ] } }, "com.amazonaws.devicefarm#DeleteDevicePoolRequest": { @@ -1324,14 +1404,16 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the delete device pool operation.

" + "smithy.api#documentation": "

Represents a request to the delete device pool operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#DeleteDevicePoolResult": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the result of a delete device pool request.

" + "smithy.api#documentation": "

Represents the result of a delete device pool request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#DeleteInstanceProfile": { @@ -1370,11 +1452,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#DeleteInstanceProfileResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.devicefarm#DeleteNetworkProfile": { "type": "operation", @@ -1412,11 +1500,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#DeleteNetworkProfileResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.devicefarm#DeleteProject": { "type": "operation", @@ -1441,7 +1535,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an AWS Device Farm project, given the project ARN.

\n

Deleting this resource does not stop an in-progress run.

" + "smithy.api#documentation": "

Deletes an AWS Device Farm project, given the project ARN.

\n

Deleting this resource does not stop an in-progress run.

", + "smithy.api#examples": [ + { + "title": "To delete a project", + "documentation": "The following example deletes a specific project.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456" + }, + "output": {} + } + ] } }, "com.amazonaws.devicefarm#DeleteProjectRequest": { @@ -1456,14 +1560,16 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the delete project operation.

" + "smithy.api#documentation": "

Represents a request to the delete project operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#DeleteProjectResult": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the result of a delete project request.

" + "smithy.api#documentation": "

Represents the result of a delete project request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#DeleteRemoteAccessSession": { @@ -1489,7 +1595,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a completed remote access session and its results.

" + "smithy.api#documentation": "

Deletes a completed remote access session and its results.

", + "smithy.api#examples": [ + { + "title": "To delete a specific remote access session", + "documentation": "The following example deletes a specific remote access session.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:session:EXAMPLE-GUID-123-456" + }, + "output": {} + } + ] } }, "com.amazonaws.devicefarm#DeleteRemoteAccessSessionRequest": { @@ -1504,14 +1620,16 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to delete the specified remote access session.

" + "smithy.api#documentation": "

Represents the request to delete the specified remote access session.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#DeleteRemoteAccessSessionResult": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The response from the server when a request is made to delete the remote access\n session.

" + "smithy.api#documentation": "

The response from the server when a request is made to delete the remote access\n session.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#DeleteRun": { @@ -1537,7 +1655,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the run, given the run ARN.

\n

Deleting this resource does not stop an in-progress run.

" + "smithy.api#documentation": "

Deletes the run, given the run ARN.

\n

Deleting this resource does not stop an in-progress run.

", + "smithy.api#examples": [ + { + "title": "To delete a run", + "documentation": "The following example deletes a specific test run.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:run:EXAMPLE-GUID-123-456" + }, + "output": {} + } + ] } }, "com.amazonaws.devicefarm#DeleteRunRequest": { @@ -1552,14 +1680,16 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the delete run operation.

" + "smithy.api#documentation": "

Represents a request to the delete run operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#DeleteRunResult": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the result of a delete run request.

" + "smithy.api#documentation": "

Represents the result of a delete run request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#DeleteTestGridProject": { @@ -1598,11 +1728,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#DeleteTestGridProjectResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.devicefarm#DeleteUpload": { "type": "operation", @@ -1627,7 +1763,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an upload given the upload ARN.

" + "smithy.api#documentation": "

Deletes an upload given the upload ARN.

", + "smithy.api#examples": [ + { + "title": "To delete a specific upload", + "documentation": "The following example deletes a specific upload.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:upload:EXAMPLE-GUID-123-456" + }, + "output": {} + } + ] } }, "com.amazonaws.devicefarm#DeleteUploadRequest": { @@ -1642,14 +1788,16 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the delete upload operation.

" + "smithy.api#documentation": "

Represents a request to the delete upload operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#DeleteUploadResult": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the result of a delete upload request.

" + "smithy.api#documentation": "

Represents the result of a delete upload request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#DeleteVPCEConfiguration": { @@ -1688,11 +1836,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#DeleteVPCEConfigurationResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.devicefarm#Device": { "type": "structure", @@ -2192,6 +2346,7 @@ "arnNamespace": "devicefarm", "cloudFormationName": "DeviceFarm", "cloudTrailEventSource": "devicefarm.amazonaws.com", + "docId": "devicefarm-2015-06-23", "endpointPrefix": "devicefarm" }, "aws.auth#sigv4": { @@ -2263,52 +2418,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2316,13 +2475,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2332,224 +2500,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://devicefarm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://devicefarm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://devicefarm-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://devicefarm-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://devicefarm.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://devicefarm.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://devicefarm.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://devicefarm.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2564,8 +2683,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2577,8 +2696,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2590,8 +2709,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2603,8 +2722,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2616,8 +2735,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2629,8 +2748,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2642,8 +2761,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2655,8 +2774,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2668,8 +2787,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2681,8 +2800,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2694,8 +2813,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2707,8 +2826,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2720,34 +2839,67 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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://devicefarm-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 enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://devicefarm-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://devicefarm.us-iso-east-1.c2s.ic.gov" } }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://devicefarm.us-iso-east-1.c2s.ic.gov" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2759,8 +2911,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2772,8 +2935,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2785,8 +2948,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2798,8 +2961,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2810,8 +2973,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2822,10 +2985,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3418,14 +3587,30 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the number of unmetered iOS or unmetered Android devices that have been purchased by the\n account.

" + "smithy.api#documentation": "

Returns the number of unmetered iOS or unmetered Android devices that have been purchased by the\n account.

", + "smithy.api#examples": [ + { + "title": "To get information about account settings", + "documentation": "The following example returns information about your Device Farm account settings.", + "output": { + "accountSettings": { + "unmeteredDevices": { + "ANDROID": 1, + "IOS": 2 + }, + "awsAccountNumber": "123456789101" + } + } + } + ] } }, "com.amazonaws.devicefarm#GetAccountSettingsRequest": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Represents the request sent to retrieve the account settings.

" + "smithy.api#documentation": "

Represents the request sent to retrieve the account settings.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetAccountSettingsResult": { @@ -3439,7 +3624,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the account settings return values from the\n GetAccountSettings request.

" + "smithy.api#documentation": "

Represents the account settings return values from the\n GetAccountSettings request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetDevice": { @@ -3465,7 +3651,39 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a unique device type.

" + "smithy.api#documentation": "

Gets information about a unique device type.

", + "smithy.api#examples": [ + { + "title": "To get information about a device", + "documentation": "The following example returns information about a specific device.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2::device:123EXAMPLE" + }, + "output": { + "device": { + "formFactor": "PHONE", + "name": "LG G2 (Sprint)", + "resolution": { + "width": 1080, + "height": 1920 + }, + "image": "75B2B7EF6C12345EXAMPLE", + "platform": "ANDROID", + "heapSize": 256000000, + "memory": 16000000000, + "model": "G2 (Sprint)", + "os": "4.2.2", + "cpu": { + "frequency": "MHz", + "architecture": "armeabi-v7a", + "clock": 2265.6 + }, + "arn": "arn:aws:devicefarm:us-west-2::device:A0E6E6E1059E45918208DF75B2B7EF6C", + "manufacturer": "LG" + } + } + } + ] } }, "com.amazonaws.devicefarm#GetDeviceInstance": { @@ -3504,6 +3722,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetDeviceInstanceResult": { @@ -3515,6 +3736,9 @@ "smithy.api#documentation": "

An object that contains information about your device instance.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetDevicePool": { @@ -3540,7 +3764,19 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a device pool.

" + "smithy.api#documentation": "

Gets information about a device pool.

", + "smithy.api#examples": [ + { + "title": "To get information about a device pool", + "documentation": "The following example returns information about a specific device pool, given a project ARN.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456" + }, + "output": { + "devicePool": {} + } + } + ] } }, "com.amazonaws.devicefarm#GetDevicePoolCompatibility": { @@ -3566,7 +3802,22 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about compatibility with a device pool.

" + "smithy.api#documentation": "

Gets information about compatibility with a device pool.

", + "smithy.api#examples": [ + { + "title": "To get information about the compatibility of a device pool", + "documentation": "The following example returns information about the compatibility of a specific device pool, given its ARN.", + "input": { + "devicePoolArn": "arn:aws:devicefarm:us-west-2::devicepool:123-456-EXAMPLE-GUID", + "appArn": "arn:aws:devicefarm:us-west-2::app:123-456-EXAMPLE-GUID", + "testType": "APPIUM_PYTHON" + }, + "output": { + "compatibleDevices": [], + "incompatibleDevices": [] + } + } + ] } }, "com.amazonaws.devicefarm#GetDevicePoolCompatibilityRequest": { @@ -3605,7 +3856,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the get device pool compatibility operation.

" + "smithy.api#documentation": "

Represents a request to the get device pool compatibility operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetDevicePoolCompatibilityResult": { @@ -3625,7 +3877,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of describe device pool compatibility request.

" + "smithy.api#documentation": "

Represents the result of describe device pool compatibility request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetDevicePoolRequest": { @@ -3640,7 +3893,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the get device pool operation.

" + "smithy.api#documentation": "

Represents a request to the get device pool operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetDevicePoolResult": { @@ -3654,7 +3908,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a get device pool request.

" + "smithy.api#documentation": "

Represents the result of a get device pool request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetDeviceRequest": { @@ -3669,7 +3924,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the get device request.

" + "smithy.api#documentation": "

Represents a request to the get device request.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetDeviceResult": { @@ -3683,7 +3939,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a get device request.

" + "smithy.api#documentation": "

Represents the result of a get device request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetInstanceProfile": { @@ -3722,6 +3979,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetInstanceProfileResult": { @@ -3733,6 +3993,9 @@ "smithy.api#documentation": "

An object that contains information about an instance profile.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetJob": { @@ -3758,7 +4021,19 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a job.

" + "smithy.api#documentation": "

Gets information about a job.

", + "smithy.api#examples": [ + { + "title": "To get information about a job", + "documentation": "The following example returns information about a specific job.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2::job:123-456-EXAMPLE-GUID" + }, + "output": { + "job": {} + } + } + ] } }, "com.amazonaws.devicefarm#GetJobRequest": { @@ -3773,7 +4048,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the get job operation.

" + "smithy.api#documentation": "

Represents a request to the get job operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetJobResult": { @@ -3787,7 +4063,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a get job request.

" + "smithy.api#documentation": "

Represents the result of a get job request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetNetworkProfile": { @@ -3826,6 +4103,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetNetworkProfileResult": { @@ -3837,6 +4117,9 @@ "smithy.api#documentation": "

The network profile.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetOfferingStatus": { @@ -3883,7 +4166,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to retrieve the offering status for the specified customer\n or account.

" + "smithy.api#documentation": "

Represents the request to retrieve the offering status for the specified customer\n or account.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetOfferingStatusResult": { @@ -3909,7 +4193,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returns the status result for a device offering.

" + "smithy.api#documentation": "

Returns the status result for a device offering.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetProject": { @@ -3950,7 +4235,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the get project operation.

" + "smithy.api#documentation": "

Represents a request to the get project operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetProjectResult": { @@ -3964,7 +4250,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a get project request.

" + "smithy.api#documentation": "

Represents the result of a get project request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetRemoteAccessSession": { @@ -3990,7 +4277,19 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a link to a currently running remote access session.

" + "smithy.api#documentation": "

Returns a link to a currently running remote access session.

", + "smithy.api#examples": [ + { + "title": "To get a remote access session", + "documentation": "The following example gets a specific remote access session.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:session:EXAMPLE-GUID-123-456" + }, + "output": { + "remoteAccessSession": {} + } + } + ] } }, "com.amazonaws.devicefarm#GetRemoteAccessSessionRequest": { @@ -4005,7 +4304,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to get information about the specified remote access\n session.

" + "smithy.api#documentation": "

Represents the request to get information about the specified remote access\n session.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetRemoteAccessSessionResult": { @@ -4019,7 +4319,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server that lists detailed information about the\n remote access session.

" + "smithy.api#documentation": "

Represents the response from the server that lists detailed information about the\n remote access session.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetRun": { @@ -4060,7 +4361,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the get run operation.

" + "smithy.api#documentation": "

Represents a request to the get run operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetRunResult": { @@ -4074,7 +4376,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a get run request.

" + "smithy.api#documentation": "

Represents the result of a get run request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetSuite": { @@ -4100,7 +4403,19 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a suite.

" + "smithy.api#documentation": "

Gets information about a suite.

", + "smithy.api#examples": [ + { + "title": "To get information about a test suite", + "documentation": "The following example gets information about a specific test suite.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:suite:EXAMPLE-GUID-123-456" + }, + "output": { + "suite": {} + } + } + ] } }, "com.amazonaws.devicefarm#GetSuiteRequest": { @@ -4115,7 +4430,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the get suite operation.

" + "smithy.api#documentation": "

Represents a request to the get suite operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetSuiteResult": { @@ -4129,7 +4445,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a get suite request.

" + "smithy.api#documentation": "

Represents the result of a get suite request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetTest": { @@ -4155,7 +4472,19 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a test.

" + "smithy.api#documentation": "

Gets information about a test.

", + "smithy.api#examples": [ + { + "title": "To get information about a specific test", + "documentation": "The following example gets information about a specific test.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:test:EXAMPLE-GUID-123-456" + }, + "output": { + "test": {} + } + } + ] } }, "com.amazonaws.devicefarm#GetTestGridProject": { @@ -4191,6 +4520,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetTestGridProjectResult": { @@ -4202,6 +4534,9 @@ "smithy.api#documentation": "

A TestGridProject.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetTestGridSession": { @@ -4248,6 +4583,9 @@ "smithy.api#documentation": "

An ARN that uniquely identifies a TestGridSession.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetTestGridSessionResult": { @@ -4259,6 +4597,9 @@ "smithy.api#documentation": "

The TestGridSession that was requested.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetTestRequest": { @@ -4273,7 +4614,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the get test operation.

" + "smithy.api#documentation": "

Represents a request to the get test operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetTestResult": { @@ -4287,7 +4629,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a get test request.

" + "smithy.api#documentation": "

Represents the result of a get test request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetUpload": { @@ -4313,7 +4656,19 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about an upload.

" + "smithy.api#documentation": "

Gets information about an upload.

", + "smithy.api#examples": [ + { + "title": "To get information about a specific upload", + "documentation": "The following example gets information about a specific upload.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:upload:EXAMPLE-GUID-123-456" + }, + "output": { + "upload": {} + } + } + ] } }, "com.amazonaws.devicefarm#GetUploadRequest": { @@ -4328,7 +4683,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the get upload operation.

" + "smithy.api#documentation": "

Represents a request to the get upload operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetUploadResult": { @@ -4342,7 +4698,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a get upload request.

" + "smithy.api#documentation": "

Represents the result of a get upload request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#GetVPCEConfiguration": { @@ -4378,6 +4735,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#GetVPCEConfigurationResult": { @@ -4389,6 +4749,9 @@ "smithy.api#documentation": "

An object that contains information about your VPC endpoint configuration.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#HostAddress": { @@ -4464,7 +4827,20 @@ } ], "traits": { - "smithy.api#documentation": "

Installs an application to the device in a remote access session. For Android\n applications, the file must be in .apk format. For iOS applications, the file must be in\n .ipa format.

" + "smithy.api#documentation": "

Installs an application to the device in a remote access session. For Android\n applications, the file must be in .apk format. For iOS applications, the file must be in\n .ipa format.

", + "smithy.api#examples": [ + { + "title": "To install to a remote access session", + "documentation": "The following example installs a specific app to a device in a specific remote access session.", + "input": { + "remoteAccessSessionArn": "arn:aws:devicefarm:us-west-2:123456789101:session:EXAMPLE-GUID-123-456", + "appArn": "arn:aws:devicefarm:us-west-2:123456789101:app:EXAMPLE-GUID-123-456" + }, + "output": { + "appUpload": {} + } + } + ] } }, "com.amazonaws.devicefarm#InstallToRemoteAccessSessionRequest": { @@ -4486,7 +4862,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to install an Android application (in .apk format) or an iOS\n application (in .ipa format) as part of a remote access session.

" + "smithy.api#documentation": "

Represents the request to install an Android application (in .apk format) or an iOS\n application (in .ipa format) as part of a remote access session.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#InstallToRemoteAccessSessionResult": { @@ -4500,7 +4877,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server after AWS Device Farm makes a request to\n install to a remote access session.

" + "smithy.api#documentation": "

Represents the response from the server after AWS Device Farm makes a request to\n install to a remote access session.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#InstanceLabels": { @@ -4797,6 +5175,16 @@ ], "traits": { "smithy.api#documentation": "

Gets information about artifacts.

", + "smithy.api#examples": [ + { + "title": "To list artifacts for a resource", + "documentation": "The following example lists screenshot artifacts for a specific run.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:run:EXAMPLE-GUID-123-456", + "type": "SCREENSHOT" + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4829,7 +5217,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the list artifacts operation.

" + "smithy.api#documentation": "

Represents a request to the list artifacts operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListArtifactsResult": { @@ -4849,7 +5238,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list artifacts operation.

" + "smithy.api#documentation": "

Represents the result of a list artifacts operation.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListDeviceInstances": { @@ -4893,6 +5283,9 @@ "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListDeviceInstancesResult": { @@ -4910,6 +5303,9 @@ "smithy.api#documentation": "

An identifier that can be used in the next call to this operation to return the next\n set of items in the list.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListDevicePools": { @@ -4936,6 +5332,44 @@ ], "traits": { "smithy.api#documentation": "

Gets information about device pools.

", + "smithy.api#examples": [ + { + "title": "To get information about device pools", + "documentation": "The following example returns information about the private device pools in a specific project.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456", + "type": "PRIVATE" + }, + "output": { + "devicePools": [ + { + "rules": [ + { + "operator": "IN", + "attribute": "ARN", + "value": "[\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\"]" + } + ], + "name": "Top Devices", + "arn": "arn:aws:devicefarm:us-west-2::devicepool:082d10e5-d7d7-48a5-ba5c-12345EXAMPLE", + "description": "Top devices" + }, + { + "rules": [ + { + "operator": "IN", + "attribute": "ARN", + "value": "[\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\",\"arn:aws:devicefarm:us-west-2::device:123456789EXAMPLE\"]" + } + ], + "name": "My Android Device Pool", + "arn": "arn:aws:devicefarm:us-west-2:123456789101:devicepool:5e01a8c7-c861-4c0a-b1d5-5ec6e6c6dd23/bf96e75a-28f6-4e61-b6a7-12345EXAMPLE", + "description": "Samsung Galaxy Android devices" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4967,7 +5401,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list device pools request.

" + "smithy.api#documentation": "

Represents the result of a list device pools request.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListDevicePoolsResult": { @@ -4987,7 +5422,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list device pools request.

" + "smithy.api#documentation": "

Represents the result of a list device pools request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListDevices": { @@ -5014,6 +5450,16 @@ ], "traits": { "smithy.api#documentation": "

Gets information about unique device types.

", + "smithy.api#examples": [ + { + "title": "To get information about devices", + "documentation": "The following example returns information about the available devices in a specific project.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456" + }, + "output": {} + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -5044,7 +5490,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list devices request.

" + "smithy.api#documentation": "

Represents the result of a list devices request.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListDevicesResult": { @@ -5064,7 +5511,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list devices operation.

" + "smithy.api#documentation": "

Represents the result of a list devices operation.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListInstanceProfiles": { @@ -5108,6 +5556,9 @@ "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListInstanceProfilesResult": { @@ -5125,6 +5576,9 @@ "smithy.api#documentation": "

An identifier that can be used in the next call to this operation to return the next\n set of items in the list.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListJobs": { @@ -5151,6 +5605,15 @@ ], "traits": { "smithy.api#documentation": "

Gets information about jobs for a given test run.

", + "smithy.api#examples": [ + { + "title": "To get information about jobs", + "documentation": "The following example returns information about jobs in a specific project.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456" + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -5176,7 +5639,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the list jobs operation.

" + "smithy.api#documentation": "

Represents a request to the list jobs operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListJobsResult": { @@ -5196,7 +5660,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list jobs request.

" + "smithy.api#documentation": "

Represents the result of a list jobs request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListNetworkProfiles": { @@ -5247,6 +5712,9 @@ "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can\n be used to return the next set of items in the list.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListNetworkProfilesResult": { @@ -5264,6 +5732,9 @@ "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can\n be used to return the next set of items in the list.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListOfferingPromotions": { @@ -5304,6 +5775,9 @@ "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can\n be used to return the next set of items in the list.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListOfferingPromotionsResult": { @@ -5321,6 +5795,9 @@ "smithy.api#documentation": "

An identifier to be used in the next call to this operation, to return the next set\n of items in the list.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListOfferingTransactions": { @@ -5368,7 +5845,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to list the offering transaction history.

" + "smithy.api#documentation": "

Represents the request to list the offering transaction history.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListOfferingTransactionsResult": { @@ -5388,7 +5866,8 @@ } }, "traits": { - "smithy.api#documentation": "

Returns the transaction log of the specified offerings.

" + "smithy.api#documentation": "

Returns the transaction log of the specified offerings.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListOfferings": { @@ -5418,6 +5897,79 @@ ], "traits": { "smithy.api#documentation": "

Returns a list of products or offerings that the user can manage through the API. Each offering record\n indicates the recurring price per unit and the frequency for that offering. The API returns a\n NotEligible error if the user is not permitted to invoke the operation. If you must be\n able to invoke this operation, contact aws-devicefarm-support@amazon.com.

", + "smithy.api#examples": [ + { + "title": "To get information about device offerings", + "documentation": "The following example returns information about available device offerings.", + "input": { + "nextToken": "RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE=" + }, + "output": { + "offerings": [ + { + "recurringCharges": [ + { + "cost": { + "amount": 250, + "currencyCode": "USD" + }, + "frequency": "MONTHLY" + } + ], + "platform": "IOS", + "type": "RECURRING", + "id": "A53D4D73-A6F6-4B82-A0B0-12345EXAMPLE", + "description": "iOS Unmetered Device Slot" + }, + { + "recurringCharges": [ + { + "cost": { + "amount": 250, + "currencyCode": "USD" + }, + "frequency": "MONTHLY" + } + ], + "platform": "ANDROID", + "type": "RECURRING", + "id": "8980F81C-00D7-469D-8EC6-12345EXAMPLE", + "description": "Android Unmetered Device Slot" + }, + { + "recurringCharges": [ + { + "cost": { + "amount": 250, + "currencyCode": "USD" + }, + "frequency": "MONTHLY" + } + ], + "platform": "ANDROID", + "type": "RECURRING", + "id": "D68B3C05-1BA6-4360-BC69-12345EXAMPLE", + "description": "Android Remote Access Unmetered Device Slot" + }, + { + "recurringCharges": [ + { + "cost": { + "amount": 250, + "currencyCode": "USD" + }, + "frequency": "MONTHLY" + } + ], + "platform": "IOS", + "type": "RECURRING", + "id": "552B4DAD-A6C9-45C4-94FB-12345EXAMPLE", + "description": "iOS Remote Access Unmetered Device Slot" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -5436,7 +5988,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to list all offerings.

" + "smithy.api#documentation": "

Represents the request to list all offerings.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListOfferingsResult": { @@ -5456,7 +6009,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the return values of the list of offerings.

" + "smithy.api#documentation": "

Represents the return values of the list of offerings.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListProjects": { @@ -5507,7 +6061,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the list projects operation.

" + "smithy.api#documentation": "

Represents a request to the list projects operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListProjectsResult": { @@ -5527,7 +6082,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list projects request.

" + "smithy.api#documentation": "

Represents the result of a list projects request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListRemoteAccessSessions": { @@ -5553,7 +6109,20 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of all currently running remote access sessions.

" + "smithy.api#documentation": "

Returns a list of all currently running remote access sessions.

", + "smithy.api#examples": [ + { + "title": "To get information about a remote access session", + "documentation": "The following example returns information about a specific Device Farm remote access session.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:session:EXAMPLE-GUID-123-456", + "nextToken": "RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE=" + }, + "output": { + "remoteAccessSessions": [] + } + } + ] } }, "com.amazonaws.devicefarm#ListRemoteAccessSessionsRequest": { @@ -5574,7 +6143,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to return information about the remote access\n session.

" + "smithy.api#documentation": "

Represents the request to return information about the remote access\n session.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListRemoteAccessSessionsResult": { @@ -5594,7 +6164,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server after AWS Device Farm makes a request to\n return information about the remote access session.

" + "smithy.api#documentation": "

Represents the response from the server after AWS Device Farm makes a request to\n return information about the remote access session.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListRuns": { @@ -5646,7 +6217,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the list runs operation.

" + "smithy.api#documentation": "

Represents a request to the list runs operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListRunsResult": { @@ -5666,7 +6238,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list runs request.

" + "smithy.api#documentation": "

Represents the result of a list runs request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListSamples": { @@ -5693,6 +6266,19 @@ ], "traits": { "smithy.api#documentation": "

Gets information about samples, given an AWS Device Farm job ARN.

", + "smithy.api#examples": [ + { + "title": "To get information about samples", + "documentation": "The following example returns information about samples, given a specific Device Farm project.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456", + "nextToken": "RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE" + }, + "output": { + "samples": [] + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -5718,7 +6304,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the list samples operation.

" + "smithy.api#documentation": "

Represents a request to the list samples operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListSamplesResult": { @@ -5738,7 +6325,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list samples request.

" + "smithy.api#documentation": "

Represents the result of a list samples request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListSuites": { @@ -5765,6 +6353,19 @@ ], "traits": { "smithy.api#documentation": "

Gets information about test suites for a given job.

", + "smithy.api#examples": [ + { + "title": "To get information about suites", + "documentation": "The following example returns information about suites, given a specific Device Farm job.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:job:EXAMPLE-GUID-123-456", + "nextToken": "RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE" + }, + "output": { + "suites": [] + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -5790,7 +6391,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the list suites operation.

" + "smithy.api#documentation": "

Represents a request to the list suites operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListSuitesResult": { @@ -5810,7 +6412,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list suites request.

" + "smithy.api#documentation": "

Represents the result of a list suites request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListTagsForResource": { @@ -5846,6 +6449,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListTagsForResourceResponse": { @@ -5857,6 +6463,9 @@ "smithy.api#documentation": "

The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum\n character length of 128 characters. Tag values can have a maximum length of 256 characters.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListTestGridProjects": { @@ -5899,6 +6508,9 @@ "smithy.api#documentation": "

From a response, used to continue a paginated listing.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListTestGridProjectsResult": { @@ -5916,6 +6528,9 @@ "smithy.api#documentation": "

Used for pagination. Pass into ListTestGridProjects to get more results in a paginated\n request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListTestGridSessionActions": { @@ -5968,6 +6583,9 @@ "smithy.api#documentation": "

Pagination token.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListTestGridSessionActionsResult": { @@ -5985,6 +6603,9 @@ "smithy.api#documentation": "

Pagination token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListTestGridSessionArtifacts": { @@ -6043,6 +6664,9 @@ "smithy.api#documentation": "

Pagination token.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListTestGridSessionArtifactsResult": { @@ -6060,6 +6684,9 @@ "smithy.api#documentation": "

Pagination token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListTestGridSessions": { @@ -6142,6 +6769,9 @@ "smithy.api#documentation": "

Pagination token.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListTestGridSessionsResult": { @@ -6159,6 +6789,9 @@ "smithy.api#documentation": "

Pagination token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListTests": { @@ -6185,6 +6818,19 @@ ], "traits": { "smithy.api#documentation": "

Gets information about tests in a given test suite.

", + "smithy.api#examples": [ + { + "title": "To get information about tests", + "documentation": "The following example returns information about tests, given a specific Device Farm project.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456", + "nextToken": "RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE" + }, + "output": { + "tests": [] + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -6210,7 +6856,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the list tests operation.

" + "smithy.api#documentation": "

Represents a request to the list tests operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListTestsResult": { @@ -6230,7 +6877,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list tests request.

" + "smithy.api#documentation": "

Represents the result of a list tests request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListUniqueProblems": { @@ -6257,6 +6905,19 @@ ], "traits": { "smithy.api#documentation": "

Gets information about unique problems, such as exceptions or crashes.

\n

Unique problems are defined as a single instance of an error across a run, job, or suite. For example,\n if a call in your application consistently raises an exception (OutOfBoundsException in\n MyActivity.java:386), ListUniqueProblems returns a single entry instead of many\n individual entries for that exception.

", + "smithy.api#examples": [ + { + "title": "To get information about unique problems", + "documentation": "The following example returns information about unique problems, given a specific Device Farm project.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456", + "nextToken": "RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE" + }, + "output": { + "uniqueProblems": {} + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -6282,7 +6943,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the list unique problems operation.

" + "smithy.api#documentation": "

Represents a request to the list unique problems operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListUniqueProblemsResult": { @@ -6302,7 +6964,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list unique problems request.

" + "smithy.api#documentation": "

Represents the result of a list unique problems request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListUploads": { @@ -6329,6 +6992,19 @@ ], "traits": { "smithy.api#documentation": "

Gets information about uploads, given an AWS Device Farm project ARN.

", + "smithy.api#examples": [ + { + "title": "To get information about uploads", + "documentation": "The following example returns information about uploads, given a specific Device Farm project.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456", + "nextToken": "RW5DdDJkMWYwZjM2MzM2VHVpOHJIUXlDUXlhc2QzRGViYnc9SEXAMPLE" + }, + "output": { + "uploads": [] + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -6360,7 +7036,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the list uploads operation.

" + "smithy.api#documentation": "

Represents a request to the list uploads operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListUploadsResult": { @@ -6380,7 +7057,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a list uploads request.

" + "smithy.api#documentation": "

Represents the result of a list uploads request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ListVPCEConfigurations": { @@ -6418,6 +7096,9 @@ "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ListVPCEConfigurationsResult": { @@ -6435,6 +7116,9 @@ "smithy.api#documentation": "

An identifier that was returned from the previous call to this operation, which can be\n used to return the next set of items in the list.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#Location": { @@ -7076,7 +7760,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request for a purchase offering.

" + "smithy.api#documentation": "

Represents a request for a purchase offering.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#PurchaseOfferingResult": { @@ -7090,7 +7775,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of the purchase offering (for example, success or failure).

" + "smithy.api#documentation": "

The result of the purchase offering (for example, success or failure).

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#PurchasedDevicesMap": { @@ -7365,7 +8051,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request that represents an offering renewal.

" + "smithy.api#documentation": "

A request that represents an offering renewal.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#RenewOfferingResult": { @@ -7379,7 +8066,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a renewal offering.

" + "smithy.api#documentation": "

The result of a renewal offering.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#Resolution": { @@ -7888,7 +8576,25 @@ } ], "traits": { - "smithy.api#documentation": "

Schedules a run.

" + "smithy.api#documentation": "

Schedules a run.

", + "smithy.api#examples": [ + { + "title": "To schedule a test run", + "documentation": "The following example schedules a test run named MyRun.", + "input": { + "projectArn": "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456", + "devicePoolArn": "arn:aws:devicefarm:us-west-2:123456789101:pool:EXAMPLE-GUID-123-456", + "name": "MyRun", + "test": { + "type": "APPIUM_JAVA_JUNIT", + "testPackageArn": "arn:aws:devicefarm:us-west-2:123456789101:test:EXAMPLE-GUID-123-456" + } + }, + "output": { + "run": {} + } + } + ] } }, "com.amazonaws.devicefarm#ScheduleRunConfiguration": { @@ -8008,7 +8714,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the schedule run operation.

" + "smithy.api#documentation": "

Represents a request to the schedule run operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#ScheduleRunResult": { @@ -8022,7 +8729,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of a schedule run request.

" + "smithy.api#documentation": "

Represents the result of a schedule run request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#ScheduleRunTest": { @@ -8174,6 +8882,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#StopJobResult": { @@ -8185,6 +8896,9 @@ "smithy.api#documentation": "

The job that was stopped.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#StopRemoteAccessSession": { @@ -8225,7 +8939,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to stop the remote access session.

" + "smithy.api#documentation": "

Represents the request to stop the remote access session.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#StopRemoteAccessSessionResult": { @@ -8239,7 +8954,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the response from the server that describes the remote access session\n when AWS Device Farm stops the session.

" + "smithy.api#documentation": "

Represents the response from the server that describes the remote access session\n when AWS Device Farm stops the session.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#StopRun": { @@ -8265,7 +8981,19 @@ } ], "traits": { - "smithy.api#documentation": "

Initiates a stop request for the current test run. AWS Device Farm immediately stops the run on devices\n where tests have not started. You are not billed for these devices. On devices where tests have started\n executing, setup suite and teardown suite tests run to completion on those devices. You are billed for\n setup, teardown, and any tests that were in progress or already completed.

" + "smithy.api#documentation": "

Initiates a stop request for the current test run. AWS Device Farm immediately stops the run on devices\n where tests have not started. You are not billed for these devices. On devices where tests have started\n executing, setup suite and teardown suite tests run to completion on those devices. You are billed for\n setup, teardown, and any tests that were in progress or already completed.

", + "smithy.api#examples": [ + { + "title": "To stop a test run", + "documentation": "The following example stops a specific test run.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2:123456789101:run:EXAMPLE-GUID-123-456" + }, + "output": { + "run": {} + } + } + ] } }, "com.amazonaws.devicefarm#StopRunRequest": { @@ -8280,7 +9008,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the request to stop a specific run.

" + "smithy.api#documentation": "

Represents the request to stop a specific run.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#StopRunResult": { @@ -8294,7 +9023,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the results of your stop run attempt.

" + "smithy.api#documentation": "

Represents the results of your stop run attempt.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#String": { @@ -8535,11 +9265,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.devicefarm#TagValue": { "type": "string", @@ -9169,11 +9905,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.devicefarm#UpdateDeviceInstance": { "type": "operation", @@ -9223,6 +9965,9 @@ "smithy.api#documentation": "

An array of strings that you want to associate with the device instance.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#UpdateDeviceInstanceResult": { @@ -9234,6 +9979,9 @@ "smithy.api#documentation": "

An object that contains information about your device instance.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#UpdateDevicePool": { @@ -9259,7 +10007,28 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies the name, description, and rules in a device pool given the attributes and\n the pool ARN. Rule updates are all-or-nothing, meaning they can only be updated as a\n whole (or not at all).

" + "smithy.api#documentation": "

Modifies the name, description, and rules in a device pool given the attributes and\n the pool ARN. Rule updates are all-or-nothing, meaning they can only be updated as a\n whole (or not at all).

", + "smithy.api#examples": [ + { + "title": "To update a device pool", + "documentation": "The following example updates the specified device pool with a new name and description. It also enables remote access of devices in the device pool.", + "input": { + "arn": "arn:aws:devicefarm:us-west-2::devicepool:082d10e5-d7d7-48a5-ba5c-12345EXAMPLE", + "name": "NewName", + "description": "NewDescription", + "rules": [ + { + "attribute": "REMOTE_ACCESS_ENABLED", + "operator": "EQUALS", + "value": "True" + } + ] + }, + "output": { + "devicePool": {} + } + } + ] } }, "com.amazonaws.devicefarm#UpdateDevicePoolRequest": { @@ -9304,7 +10073,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the update device pool operation.

" + "smithy.api#documentation": "

Represents a request to the update device pool operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#UpdateDevicePoolResult": { @@ -9318,7 +10088,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of an update device pool request.

" + "smithy.api#documentation": "

Represents the result of an update device pool request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#UpdateInstanceProfile": { @@ -9387,6 +10158,9 @@ "smithy.api#documentation": "

The updated choice for whether you want to reboot the device after use. The default\n value is true.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#UpdateInstanceProfileResult": { @@ -9398,6 +10172,9 @@ "smithy.api#documentation": "

An object that contains information about your instance profile.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#UpdateNetworkProfile": { @@ -9504,6 +10281,9 @@ "smithy.api#documentation": "

Proportion of received packets that fail to arrive from 0 to 100 percent.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#UpdateNetworkProfileResult": { @@ -9515,6 +10295,9 @@ "smithy.api#documentation": "

A list of the available network profiles.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#UpdateProject": { @@ -9573,7 +10356,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a request to the update project operation.

" + "smithy.api#documentation": "

Represents a request to the update project operation.

", + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#UpdateProjectResult": { @@ -9587,7 +10371,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the result of an update project request.

" + "smithy.api#documentation": "

Represents the result of an update project request.

", + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#UpdateTestGridProject": { @@ -9644,6 +10429,9 @@ "smithy.api#documentation": "

The VPC security groups and subnets that are attached to a project.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#UpdateTestGridProjectResult": { @@ -9655,6 +10443,9 @@ "smithy.api#documentation": "

The project, including updated information.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#UpdateUpload": { @@ -9711,6 +10502,9 @@ "smithy.api#documentation": "

Set to true if the YAML file has changed and must be updated. Otherwise, set to false.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#UpdateUploadResult": { @@ -9722,6 +10516,9 @@ "smithy.api#documentation": "

A test spec uploaded to Device Farm.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#UpdateVPCEConfiguration": { @@ -9784,6 +10581,9 @@ "smithy.api#documentation": "

An optional description that provides details about your VPC endpoint configuration.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.devicefarm#UpdateVPCEConfigurationResult": { @@ -9795,6 +10595,9 @@ "smithy.api#documentation": "

An object that contains information about your VPC endpoint configuration.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.devicefarm#Upload": { diff --git a/codegen/sdk-codegen/aws-models/devops-guru.json b/codegen/sdk-codegen/aws-models/devops-guru.json index f6446d3d4f6..b4dcc843a10 100644 --- a/codegen/sdk-codegen/aws-models/devops-guru.json +++ b/codegen/sdk-codegen/aws-models/devops-guru.json @@ -628,52 +628,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -681,13 +685,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -697,224 +710,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://devops-guru-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://devops-guru-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://devops-guru-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://devops-guru-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://devops-guru.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://devops-guru.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://devops-guru.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://devops-guru.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/direct-connect.json b/codegen/sdk-codegen/aws-models/direct-connect.json index ef827489798..897ec293306 100644 --- a/codegen/sdk-codegen/aws-models/direct-connect.json +++ b/codegen/sdk-codegen/aws-models/direct-connect.json @@ -96,6 +96,9 @@ "directConnectGatewayAssociation": { "target": "com.amazonaws.directconnect#DirectConnectGatewayAssociation" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#AddressFamily": { @@ -442,6 +445,9 @@ "virtualInterface": { "target": "com.amazonaws.directconnect#VirtualInterface" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#AmazonAddress": { @@ -1603,6 +1609,9 @@ "smithy.api#documentation": "

Information about the Direct Connect gateway proposal.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#CreateDirectConnectGatewayAssociationRequest": { @@ -1647,6 +1656,9 @@ "smithy.api#documentation": "

The association to be created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#CreateDirectConnectGatewayRequest": { @@ -1679,6 +1691,9 @@ "smithy.api#documentation": "

The Direct Connect gateway.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#CreateInterconnect": { @@ -1997,6 +2012,9 @@ "virtualInterface": { "target": "com.amazonaws.directconnect#VirtualInterface" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#CustomerAddress": { @@ -2208,6 +2226,9 @@ "smithy.api#documentation": "

The ID of the associated gateway.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#DeleteDirectConnectGatewayAssociationRequest": { @@ -2245,6 +2266,9 @@ "smithy.api#documentation": "

Information about the deleted association.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#DeleteDirectConnectGatewayRequest": { @@ -2271,6 +2295,9 @@ "smithy.api#documentation": "

The Direct Connect gateway.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#DeleteInterconnect": { @@ -2651,6 +2678,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#DescribeDirectConnectGatewayAssociations": { @@ -2732,6 +2762,9 @@ "smithy.api#documentation": "

The token to retrieve the next page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#DescribeDirectConnectGatewayAttachments": { @@ -2801,6 +2834,9 @@ "smithy.api#documentation": "

The token to retrieve the next page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#DescribeDirectConnectGateways": { @@ -2864,6 +2900,9 @@ "smithy.api#documentation": "

The token to retrieve the next page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#DescribeHostedConnections": { @@ -5168,6 +5207,7 @@ "arnNamespace": "directconnect", "cloudFormationName": "DirectConnect", "cloudTrailEventSource": "directconnect.amazonaws.com", + "docId": "directconnect-2012-10-25", "endpointPrefix": "directconnect" }, "aws.auth#sigv4": { @@ -5239,52 +5279,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -5292,13 +5336,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -5308,224 +5361,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://directconnect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://directconnect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://directconnect-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://directconnect-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://directconnect.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://directconnect.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://directconnect.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://directconnect.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -6773,6 +6777,9 @@ "directConnectGatewayAssociation": { "target": "com.amazonaws.directconnect#DirectConnectGatewayAssociation" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directconnect#UpdateDirectConnectGatewayRequest": { diff --git a/codegen/sdk-codegen/aws-models/directory-service.json b/codegen/sdk-codegen/aws-models/directory-service.json index 54304f2bab2..e13320d38ba 100644 --- a/codegen/sdk-codegen/aws-models/directory-service.json +++ b/codegen/sdk-codegen/aws-models/directory-service.json @@ -82,6 +82,9 @@ "smithy.api#documentation": "

The shared directory in the directory consumer account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#AccessDeniedException": { @@ -174,7 +177,10 @@ }, "com.amazonaws.directoryservice#AddIpRoutesResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#AddRegion": { "type": "operation", @@ -250,7 +256,10 @@ }, "com.amazonaws.directoryservice#AddRegionResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#AddTagsToResource": { "type": "operation", @@ -305,7 +314,10 @@ }, "com.amazonaws.directoryservice#AddTagsToResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#AddedDateTime": { "type": "timestamp" @@ -440,7 +452,10 @@ }, "com.amazonaws.directoryservice#CancelSchemaExtensionResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#Certificate": { "type": "structure", @@ -970,7 +985,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the ConnectDirectory operation.

" + "smithy.api#documentation": "

Contains the results of the ConnectDirectory operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#ConnectPassword": { @@ -1058,7 +1074,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the CreateAlias operation.

" + "smithy.api#documentation": "

Contains the results of the CreateAlias operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#CreateComputer": { @@ -1152,7 +1169,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results for the CreateComputer operation.

" + "smithy.api#documentation": "

Contains the results for the CreateComputer operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#CreateConditionalForwarder": { @@ -1224,7 +1242,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The result of a CreateConditinalForwarder request.

" + "smithy.api#documentation": "

The result of a CreateConditinalForwarder request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#CreateDirectory": { @@ -1318,7 +1337,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the CreateDirectory operation.

" + "smithy.api#documentation": "

Contains the results of the CreateDirectory operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#CreateLogSubscription": { @@ -1377,7 +1397,10 @@ }, "com.amazonaws.directoryservice#CreateLogSubscriptionResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#CreateMicrosoftAD": { "type": "operation", @@ -1473,7 +1496,8 @@ } }, "traits": { - "smithy.api#documentation": "

Result of a CreateMicrosoftAD request.

" + "smithy.api#documentation": "

Result of a CreateMicrosoftAD request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#CreateSnapshot": { @@ -1550,7 +1574,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the CreateSnapshot operation.

" + "smithy.api#documentation": "

Contains the results of the CreateSnapshot operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#CreateTrust": { @@ -1651,7 +1676,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a CreateTrust request.

" + "smithy.api#documentation": "

The result of a CreateTrust request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#CreatedDateTime": { @@ -1738,7 +1764,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The result of a DeleteConditionalForwarder request.

" + "smithy.api#documentation": "

The result of a DeleteConditionalForwarder request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DeleteDirectory": { @@ -1791,7 +1818,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the DeleteDirectory operation.

" + "smithy.api#documentation": "

Contains the results of the DeleteDirectory operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DeleteLogSubscription": { @@ -1837,7 +1865,10 @@ }, "com.amazonaws.directoryservice#DeleteLogSubscriptionResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#DeleteSnapshot": { "type": "operation", @@ -1892,7 +1923,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the DeleteSnapshot operation.

" + "smithy.api#documentation": "

Contains the results of the DeleteSnapshot operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DeleteTrust": { @@ -1958,7 +1990,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DeleteTrust request.

" + "smithy.api#documentation": "

The result of a DeleteTrust request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DeregisterCertificate": { @@ -2023,7 +2056,10 @@ }, "com.amazonaws.directoryservice#DeregisterCertificateResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#DeregisterEventTopic": { "type": "operation", @@ -2078,7 +2114,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The result of a DeregisterEventTopic request.

" + "smithy.api#documentation": "

The result of a DeregisterEventTopic request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeCertificate": { @@ -2144,6 +2181,9 @@ "smithy.api#documentation": "

Information about the certificate, including registered date time, certificate state, the\n reason for the state, expiration date time, and certificate common name.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeClientAuthenticationSettings": { @@ -2232,6 +2272,9 @@ "smithy.api#documentation": "

The next token used to retrieve the client authentication settings if the number of setting types exceeds\n page limit and there is another page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeConditionalForwarders": { @@ -2299,7 +2342,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeConditionalForwarder request.

" + "smithy.api#documentation": "

The result of a DescribeConditionalForwarder request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeDirectories": { @@ -2381,7 +2425,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the DescribeDirectories operation.

" + "smithy.api#documentation": "

Contains the results of the DescribeDirectories operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeDomainControllers": { @@ -2469,6 +2514,9 @@ "smithy.api#documentation": "

If not null, more results are available. Pass this value for the NextToken\n parameter in a subsequent call to DescribeDomainControllers retrieve the\n next set of items.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeEventTopics": { @@ -2529,7 +2577,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeEventTopic request.

" + "smithy.api#documentation": "

The result of a DescribeEventTopic request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeLDAPSSettings": { @@ -2618,6 +2667,9 @@ "smithy.api#documentation": "

The next token used to retrieve the LDAPS settings if the number of setting types exceeds\n page limit and there is another page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeRegions": { @@ -2702,6 +2754,9 @@ "smithy.api#documentation": "

If not null, more results are available. Pass this value for the NextToken\n parameter in a subsequent call to DescribeRegions to retrieve the next set\n of items.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeSettings": { @@ -2784,6 +2839,9 @@ "smithy.api#documentation": "

If not null, token that indicates that more results are available. Pass this value for the NextToken parameter in a subsequent call to DescribeSettings to retrieve the next set of items.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeSharedDirectories": { @@ -2872,6 +2930,9 @@ "smithy.api#documentation": "

If not null, token that indicates that more results are available. Pass this value for the\n NextToken parameter in a subsequent call to DescribeSharedDirectories to retrieve the next set of items.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeSnapshots": { @@ -2959,7 +3020,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the DescribeSnapshots operation.

" + "smithy.api#documentation": "

Contains the results of the DescribeSnapshots operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeTrusts": { @@ -3050,7 +3112,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of a DescribeTrust request.

" + "smithy.api#documentation": "

The result of a DescribeTrust request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DescribeUpdateDirectory": { @@ -3139,6 +3202,9 @@ "smithy.api#documentation": "

\n If not null, more results are available. Pass this value for the NextToken parameter.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#Description": { @@ -3902,6 +3968,7 @@ "arnNamespace": "ds", "cloudFormationName": "DirectoryService", "cloudTrailEventSource": "directoryservice.amazonaws.com", + "docId": "ds-2015-04-16", "endpointPrefix": "ds" }, "aws.auth#sigv4": { @@ -3973,52 +4040,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -4026,13 +4097,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -4042,224 +4122,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ds-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://ds-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ds-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://ds-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ds.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://ds.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://ds.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://ds.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -5178,7 +5209,10 @@ }, "com.amazonaws.directoryservice#DisableClientAuthenticationResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#DisableLDAPS": { "type": "operation", @@ -5239,7 +5273,10 @@ }, "com.amazonaws.directoryservice#DisableLDAPSResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#DisableRadius": { "type": "operation", @@ -5284,7 +5321,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the results of the DisableRadius operation.

" + "smithy.api#documentation": "

Contains the results of the DisableRadius operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DisableSso": { @@ -5348,7 +5386,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the results of the DisableSso operation.

" + "smithy.api#documentation": "

Contains the results of the DisableSso operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#DnsIpAddrs": { @@ -5567,7 +5606,10 @@ }, "com.amazonaws.directoryservice#EnableClientAuthenticationResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#EnableLDAPS": { "type": "operation", @@ -5631,7 +5673,10 @@ }, "com.amazonaws.directoryservice#EnableLDAPSResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#EnableRadius": { "type": "operation", @@ -5689,7 +5734,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the results of the EnableRadius operation.

" + "smithy.api#documentation": "

Contains the results of the EnableRadius operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#EnableSso": { @@ -5753,7 +5799,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the results of the EnableSso operation.

" + "smithy.api#documentation": "

Contains the results of the EnableSso operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#EndDateTime": { @@ -5881,7 +5928,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the GetDirectoryLimits operation.

" + "smithy.api#documentation": "

Contains the results of the GetDirectoryLimits operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#GetSnapshotLimits": { @@ -5934,7 +5982,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the results of the GetSnapshotLimits operation.

" + "smithy.api#documentation": "

Contains the results of the GetSnapshotLimits operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#IncompatibleSettingsException": { @@ -6400,6 +6449,9 @@ "smithy.api#documentation": "

A list of certificates with basic details including certificate ID, certificate common\n name, certificate state.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#ListIpRoutes": { @@ -6479,6 +6531,9 @@ "smithy.api#documentation": "

If not null, more results are available. Pass this value for the\n NextToken parameter in a subsequent call to ListIpRoutes to retrieve the next set of items.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#ListLogSubscriptions": { @@ -6554,6 +6609,9 @@ "smithy.api#documentation": "

The token for the next set of items to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#ListSchemaExtensions": { @@ -6630,6 +6688,9 @@ "smithy.api#documentation": "

If not null, more results are available. Pass this value for the NextToken\n parameter in a subsequent call to ListSchemaExtensions to retrieve the next set\n of items.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#ListTagsForResource": { @@ -6709,6 +6770,9 @@ "smithy.api#documentation": "

Reserved for future use.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#LogGroupName": { @@ -7285,6 +7349,9 @@ "smithy.api#documentation": "

The identifier of the certificate.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#RegisterEventTopic": { @@ -7340,7 +7407,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The result of a RegisterEventTopic request.

" + "smithy.api#documentation": "

The result of a RegisterEventTopic request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#RejectSharedDirectory": { @@ -7396,6 +7464,9 @@ "smithy.api#documentation": "

Identifier of the shared directory in the directory consumer account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#RemoteDomainName": { @@ -7467,7 +7538,10 @@ }, "com.amazonaws.directoryservice#RemoveIpRoutesResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#RemoveRegion": { "type": "operation", @@ -7518,7 +7592,10 @@ }, "com.amazonaws.directoryservice#RemoveRegionResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#RemoveTagsFromResource": { "type": "operation", @@ -7570,7 +7647,10 @@ }, "com.amazonaws.directoryservice#RemoveTagsFromResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#ReplicationScope": { "type": "enum", @@ -7656,7 +7736,10 @@ }, "com.amazonaws.directoryservice#ResetUserPasswordResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#ResourceId": { "type": "string", @@ -7710,7 +7793,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the results of the RestoreFromSnapshot operation.

" + "smithy.api#documentation": "

Contains the results of the RestoreFromSnapshot operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#SID": { @@ -8096,6 +8180,9 @@ "smithy.api#documentation": "

Identifier of the directory that is stored in the directory consumer account that is\n shared from the specified directory (DirectoryId).

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#ShareLimitExceededException": { @@ -8529,6 +8616,9 @@ "smithy.api#documentation": "

The identifier of the schema extension that will be applied.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#StartTime": { @@ -8966,6 +9056,9 @@ "smithy.api#documentation": "

Identifier of the directory stored in the directory consumer account that is to be\n unshared from the specified directory (DirectoryId).

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#UnshareTarget": { @@ -9092,7 +9185,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The result of an UpdateConditionalForwarder request.

" + "smithy.api#documentation": "

The result of an UpdateConditionalForwarder request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#UpdateDirectorySetup": { @@ -9173,7 +9267,10 @@ }, "com.amazonaws.directoryservice#UpdateDirectorySetupResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#UpdateInfoEntry": { "type": "structure", @@ -9291,7 +9388,10 @@ }, "com.amazonaws.directoryservice#UpdateNumberOfDomainControllersResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.directoryservice#UpdateRadius": { "type": "operation", @@ -9346,7 +9446,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the results of the UpdateRadius operation.

" + "smithy.api#documentation": "

Contains the results of the UpdateRadius operation.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#UpdateSecurityGroupForDirectoryControllers": { @@ -9424,6 +9525,9 @@ "smithy.api#documentation": "

The identifier of the directory.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#UpdateStatus": { @@ -9511,6 +9615,9 @@ "smithy.api#documentation": "

Identifier of the trust relationship.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#UpdateType": { @@ -9634,7 +9741,8 @@ } }, "traits": { - "smithy.api#documentation": "

Result of a VerifyTrust request.

" + "smithy.api#documentation": "

Result of a VerifyTrust request.

", + "smithy.api#output": {} } }, "com.amazonaws.directoryservice#VpcId": { diff --git a/codegen/sdk-codegen/aws-models/dlm.json b/codegen/sdk-codegen/aws-models/dlm.json index 5760e2be688..cad254f3ffd 100644 --- a/codegen/sdk-codegen/aws-models/dlm.json +++ b/codegen/sdk-codegen/aws-models/dlm.json @@ -2157,52 +2157,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2210,13 +2214,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2226,92 +2239,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://dlm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://dlm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -2320,155 +2324,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://dlm.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://dlm-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://dlm.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://dlm-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://dlm.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://dlm.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://dlm.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://dlm.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/docdb-elastic.json b/codegen/sdk-codegen/aws-models/docdb-elastic.json index f544e6bb332..c1c8502014c 100644 --- a/codegen/sdk-codegen/aws-models/docdb-elastic.json +++ b/codegen/sdk-codegen/aws-models/docdb-elastic.json @@ -467,55 +467,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://docdb-elastic-fips.us-gov-east-1.api.aws" + "url": "https://docdb-elastic-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://docdb-elastic-fips.us-gov-east-1.amazonaws.com" + "url": "https://docdb-elastic-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://docdb-elastic.us-gov-east-1.api.aws" + "url": "https://docdb-elastic.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://docdb-elastic.us-gov-east-1.amazonaws.com" + "url": "https://docdb-elastic.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -526,9 +526,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -539,9 +539,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -552,9 +552,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -565,109 +565,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://docdb-elastic-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://docdb-elastic-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://docdb-elastic-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://docdb-elastic.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://docdb-elastic.us-iso-east-1.c2s.ic.gov" + "url": "https://docdb-elastic.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://docdb-elastic-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://docdb-elastic-fips.us-east-1.amazonaws.com" + "url": "https://docdb-elastic-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://docdb-elastic.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://docdb-elastic.us-east-1.amazonaws.com" + "url": "https://docdb-elastic.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -676,9 +676,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -689,9 +689,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -700,9 +700,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -713,22 +713,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -738,9 +751,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -750,11 +763,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2330,4 +2349,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/docdb.json b/codegen/sdk-codegen/aws-models/docdb.json index 82af29e7881..9aec53bb7e9 100644 --- a/codegen/sdk-codegen/aws-models/docdb.json +++ b/codegen/sdk-codegen/aws-models/docdb.json @@ -68,7 +68,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to AddSourceIdentifierToSubscription.\n

" + "smithy.api#documentation": "

Represents the input to AddSourceIdentifierToSubscription.\n

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#AddSourceIdentifierToSubscriptionResult": { @@ -124,7 +125,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to AddTagsToResource.\n

" + "smithy.api#documentation": "

Represents the input to AddTagsToResource.\n

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#AmazonRDSv19": { @@ -368,52 +370,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -421,13 +427,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -437,92 +452,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rds-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://rds-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -531,155 +537,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://rds.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://rds-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://rds.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://rds-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://rds.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://rds.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://rds.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://rds.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1442,7 +1408,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ApplyPendingMaintenanceAction.\n

" + "smithy.api#documentation": "

Represents the input to ApplyPendingMaintenanceAction.\n

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ApplyPendingMaintenanceActionResult": { @@ -1591,6 +1558,9 @@ "smithy.api#documentation": "

An optional pagination token provided if the number of records retrieved is greater than MaxRecords. If this parameter is specified, the marker specifies the next record in the list. Including the value of Marker in the next call to DescribeCertificates results in the next page of certificates.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.docdb#CertificateNotFoundFault": { @@ -1685,7 +1655,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to CopyDBClusterParameterGroup.\n

" + "smithy.api#documentation": "

Represents the input to CopyDBClusterParameterGroup.\n

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#CopyDBClusterParameterGroupResult": { @@ -1774,7 +1745,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to CopyDBClusterSnapshot.\n

" + "smithy.api#documentation": "

Represents the input to CopyDBClusterSnapshot.\n

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#CopyDBClusterSnapshotResult": { @@ -1980,7 +1952,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to CreateDBCluster.\n

" + "smithy.api#documentation": "

Represents the input to CreateDBCluster.\n

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#CreateDBClusterParameterGroup": { @@ -2035,7 +2008,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of CreateDBClusterParameterGroup.

" + "smithy.api#documentation": "

Represents the input of CreateDBClusterParameterGroup.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#CreateDBClusterParameterGroupResult": { @@ -2114,7 +2088,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of CreateDBClusterSnapshot.

" + "smithy.api#documentation": "

Represents the input of CreateDBClusterSnapshot.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#CreateDBClusterSnapshotResult": { @@ -2268,7 +2243,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to CreateDBInstance.

" + "smithy.api#documentation": "

Represents the input to CreateDBInstance.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#CreateDBInstanceResult": { @@ -2343,7 +2319,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to CreateDBSubnetGroup.

" + "smithy.api#documentation": "

Represents the input to CreateDBSubnetGroup.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#CreateDBSubnetGroupResult": { @@ -2441,7 +2418,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to CreateEventSubscription.

" + "smithy.api#documentation": "

Represents the input to CreateEventSubscription.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#CreateEventSubscriptionResult": { @@ -2529,7 +2507,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to CreateGlobalCluster.

" + "smithy.api#documentation": "

Represents the input to CreateGlobalCluster.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#CreateGlobalClusterResult": { @@ -2831,7 +2810,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribeDBClusters.

" + "smithy.api#documentation": "

Represents the output of DescribeDBClusters.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#DBClusterNotFoundFault": { @@ -2960,7 +2940,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DBClusterParameterGroups.

" + "smithy.api#documentation": "

Represents the output of DBClusterParameterGroups.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#DBClusterQuotaExceededFault": { @@ -3214,7 +3195,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribeDBClusterSnapshots.

" + "smithy.api#documentation": "

Represents the output of DescribeDBClusterSnapshots.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#DBClusterSnapshotNotFoundFault": { @@ -3317,7 +3299,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribeDBEngineVersions.

" + "smithy.api#documentation": "

Represents the output of DescribeDBEngineVersions.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#DBInstance": { @@ -3537,7 +3520,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribeDBInstances.

" + "smithy.api#documentation": "

Represents the output of DescribeDBInstances.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#DBInstanceNotFoundFault": { @@ -3796,7 +3780,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribeDBSubnetGroups.

" + "smithy.api#documentation": "

Represents the output of DescribeDBSubnetGroups.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#DBSubnetGroupNotFoundFault": { @@ -3930,7 +3915,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DeleteDBCluster.

" + "smithy.api#documentation": "

Represents the input to DeleteDBCluster.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DeleteDBClusterParameterGroup": { @@ -3965,7 +3951,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DeleteDBClusterParameterGroup.

" + "smithy.api#documentation": "

Represents the input to DeleteDBClusterParameterGroup.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DeleteDBClusterResult": { @@ -4011,7 +3998,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DeleteDBClusterSnapshot.

" + "smithy.api#documentation": "

Represents the input to DeleteDBClusterSnapshot.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DeleteDBClusterSnapshotResult": { @@ -4066,7 +4054,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DeleteDBInstance.

" + "smithy.api#documentation": "

Represents the input to DeleteDBInstance.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DeleteDBInstanceResult": { @@ -4115,7 +4104,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DeleteDBSubnetGroup.

" + "smithy.api#documentation": "

Represents the input to DeleteDBSubnetGroup.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DeleteEventSubscription": { @@ -4150,7 +4140,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DeleteEventSubscription.

" + "smithy.api#documentation": "

Represents the input to DeleteEventSubscription.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DeleteEventSubscriptionResult": { @@ -4196,7 +4187,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DeleteGlobalCluster.

" + "smithy.api#documentation": "

Represents the input to DeleteGlobalCluster.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DeleteGlobalClusterResult": { @@ -4260,6 +4252,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeCertificates request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeDBClusterParameterGroups": { @@ -4314,7 +4309,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeDBClusterParameterGroups.

" + "smithy.api#documentation": "

Represents the input to DescribeDBClusterParameterGroups.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeDBClusterParameters": { @@ -4376,7 +4372,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeDBClusterParameters.

" + "smithy.api#documentation": "

Represents the input to DescribeDBClusterParameters.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeDBClusterSnapshotAttributes": { @@ -4408,7 +4405,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeDBClusterSnapshotAttributes.

" + "smithy.api#documentation": "

Represents the input to DescribeDBClusterSnapshotAttributes.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeDBClusterSnapshotAttributesResult": { @@ -4500,7 +4498,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeDBClusterSnapshots.

" + "smithy.api#documentation": "

Represents the input to DescribeDBClusterSnapshots.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeDBClusters": { @@ -4555,7 +4554,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeDBClusters.

" + "smithy.api#documentation": "

Represents the input to DescribeDBClusters.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeDBEngineVersions": { @@ -4636,7 +4636,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeDBEngineVersions.

" + "smithy.api#documentation": "

Represents the input to DescribeDBEngineVersions.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeDBInstances": { @@ -4822,7 +4823,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeDBInstances.

" + "smithy.api#documentation": "

Represents the input to DescribeDBInstances.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeDBSubnetGroups": { @@ -4877,7 +4879,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeDBSubnetGroups.

" + "smithy.api#documentation": "

Represents the input to DescribeDBSubnetGroups.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeEngineDefaultClusterParameters": { @@ -4922,7 +4925,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeEngineDefaultClusterParameters.

" + "smithy.api#documentation": "

Represents the input to DescribeEngineDefaultClusterParameters.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeEngineDefaultClusterParametersResult": { @@ -4965,7 +4969,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeEventCategories.

" + "smithy.api#documentation": "

Represents the input to DescribeEventCategories.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeEventSubscriptions": { @@ -5020,7 +5025,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeEventSubscriptions.

" + "smithy.api#documentation": "

Represents the input to DescribeEventSubscriptions.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeEvents": { @@ -5100,7 +5106,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeEvents.

" + "smithy.api#documentation": "

Represents the input to DescribeEvents.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeGlobalClusters": { @@ -5153,6 +5160,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeGlobalClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribeOrderableDBInstanceOptions": { @@ -5227,7 +5237,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribeOrderableDBInstanceOptions.

" + "smithy.api#documentation": "

Represents the input to DescribeOrderableDBInstanceOptions.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#DescribePendingMaintenanceActions": { @@ -5282,7 +5293,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to DescribePendingMaintenanceActions.

" + "smithy.api#documentation": "

Represents the input to DescribePendingMaintenanceActions.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#Endpoint": { @@ -5431,7 +5443,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribeEventCategories.

" + "smithy.api#documentation": "

Represents the output of DescribeEventCategories.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#EventList": { @@ -5555,7 +5568,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribeEventSubscriptions.

" + "smithy.api#documentation": "

Represents the output of DescribeEventSubscriptions.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#EventsMessage": { @@ -5575,7 +5589,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribeEvents.

" + "smithy.api#documentation": "

Represents the output of DescribeEvents.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#ExceptionMessage": { @@ -5621,7 +5636,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to FailoverDBCluster.

" + "smithy.api#documentation": "

Represents the input to FailoverDBCluster.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#FailoverDBClusterResult": { @@ -5864,6 +5880,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.docdb#InstanceQuotaExceededFault": { @@ -6228,7 +6247,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ListTagsForResource.

" + "smithy.api#documentation": "

Represents the input to ListTagsForResource.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#LogTypeList": { @@ -6376,7 +6396,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ModifyDBCluster.

" + "smithy.api#documentation": "

Represents the input to ModifyDBCluster.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ModifyDBClusterParameterGroup": { @@ -6418,7 +6439,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ModifyDBClusterParameterGroup.

" + "smithy.api#documentation": "

Represents the input to ModifyDBClusterParameterGroup.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ModifyDBClusterResult": { @@ -6486,7 +6508,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ModifyDBClusterSnapshotAttribute.

" + "smithy.api#documentation": "

Represents the input to ModifyDBClusterSnapshotAttribute.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ModifyDBClusterSnapshotAttributeResult": { @@ -6626,7 +6649,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ModifyDBInstance.

" + "smithy.api#documentation": "

Represents the input to ModifyDBInstance.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ModifyDBInstanceResult": { @@ -6694,7 +6718,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ModifyDBSubnetGroup.

" + "smithy.api#documentation": "

Represents the input to ModifyDBSubnetGroup.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ModifyDBSubnetGroupResult": { @@ -6776,7 +6801,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ModifyEventSubscription.

" + "smithy.api#documentation": "

Represents the input to ModifyEventSubscription.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ModifyEventSubscriptionResult": { @@ -6834,7 +6860,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ModifyGlobalCluster.

" + "smithy.api#documentation": "

Represents the input to ModifyGlobalCluster.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ModifyGlobalClusterResult": { @@ -6919,7 +6946,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribeOrderableDBInstanceOptions.

" + "smithy.api#documentation": "

Represents the output of DescribeOrderableDBInstanceOptions.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#Parameter": { @@ -7099,7 +7127,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of DescribePendingMaintenanceActions.

" + "smithy.api#documentation": "

Represents the output of DescribePendingMaintenanceActions.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#PendingModifiedValues": { @@ -7247,7 +7276,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to RebootDBInstance.

" + "smithy.api#documentation": "

Represents the input to RebootDBInstance.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#RebootDBInstanceResult": { @@ -7303,7 +7333,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to RemoveFromGlobalCluster.

" + "smithy.api#documentation": "

Represents the input to RemoveFromGlobalCluster.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#RemoveFromGlobalClusterResult": { @@ -7356,7 +7387,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to RemoveSourceIdentifierFromSubscription.

" + "smithy.api#documentation": "

Represents the input to RemoveSourceIdentifierFromSubscription.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#RemoveSourceIdentifierFromSubscriptionResult": { @@ -7412,7 +7444,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to RemoveTagsFromResource.

" + "smithy.api#documentation": "

Represents the input to RemoveTagsFromResource.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ResetDBClusterParameterGroup": { @@ -7460,7 +7493,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to ResetDBClusterParameterGroup.

" + "smithy.api#documentation": "

Represents the input to ResetDBClusterParameterGroup.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#ResourceNotFoundFault": { @@ -7642,7 +7676,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to RestoreDBClusterFromSnapshot.

" + "smithy.api#documentation": "

Represents the input to RestoreDBClusterFromSnapshot.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#RestoreDBClusterFromSnapshotResult": { @@ -7795,7 +7830,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input to RestoreDBClusterToPointInTime.

" + "smithy.api#documentation": "

Represents the input to RestoreDBClusterToPointInTime.

", + "smithy.api#input": {} } }, "com.amazonaws.docdb#RestoreDBClusterToPointInTimeResult": { @@ -7994,6 +8030,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.docdb#StartDBClusterResult": { @@ -8040,6 +8079,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.docdb#StopDBClusterResult": { @@ -8245,7 +8287,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of ListTagsForResource.

" + "smithy.api#documentation": "

Represents the output of ListTagsForResource.

", + "smithy.api#output": {} } }, "com.amazonaws.docdb#UpgradeTarget": { diff --git a/codegen/sdk-codegen/aws-models/dynamodb-streams.json b/codegen/sdk-codegen/aws-models/dynamodb-streams.json index aefb201e259..17a1eb8b9f0 100644 --- a/codegen/sdk-codegen/aws-models/dynamodb-streams.json +++ b/codegen/sdk-codegen/aws-models/dynamodb-streams.json @@ -216,6 +216,7 @@ "arnNamespace": "dynamodb", "cloudFormationName": "DynamoDBStreams", "cloudTrailEventSource": "dynamodbstreams.amazonaws.com", + "docId": "streams-dynamodb-2012-08-10", "endpointPrefix": "streams.dynamodb" }, "aws.auth#sigv4": { @@ -287,52 +288,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -340,13 +345,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -356,226 +370,86 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://streams.dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://streams.dynamodb.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://streams.dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://streams.dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://streams.dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { @@ -583,34 +457,7 @@ { "fn": "stringEquals", "argv": [ - { - "ref": "Region" - }, - "local" - ] - } - ], - "endpoint": { - "url": "http://localhost:8000", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "dynamodb", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", + "aws-us-gov", { "fn": "getAttr", "argv": [ @@ -631,126 +478,244 @@ "type": "endpoint" }, { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-cn", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://streams.dynamodb.{Region}.amazonaws.com.cn", + "url": "https://streams.dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ - "aws-us-gov", { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } - ], + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], "endpoint": { - "url": "https://streams.dynamodb.{Region}.amazonaws.com", + "url": "https://streams.dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" }, + "local" + ] + } + ], + "endpoint": { + "url": "http://localhost:8000", + "properties": { + "authSchemes": [ { - "conditions": [ + "name": "sigv4", + "signingName": "dynamodb", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ { - "fn": "stringEquals", - "argv": [ - "aws-iso", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://streams.dynamodb.{Region}.c2s.ic.gov", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://streams.dynamodb.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-cn", { - "conditions": [ + "fn": "getAttr", + "argv": [ { - "fn": "stringEquals", - "argv": [ - "aws-iso-b", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://streams.dynamodb.{Region}.sc2s.sgov.gov", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://streams.dynamodb.{Region}.amazonaws.com.cn", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", { - "conditions": [], - "endpoint": { - "url": "https://streams.dynamodb.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] } ] } - ] + ], + "endpoint": { + "url": "https://streams.dynamodb.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-iso", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://streams.dynamodb.{Region}.c2s.ic.gov", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-iso-b", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://streams.dynamodb.{Region}.sc2s.sgov.gov", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://streams.dynamodb.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1514,7 +1479,21 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a shard iterator. A shard iterator provides information\n about how to retrieve the stream records from within a shard. Use\n the shard iterator in a subsequent \n GetRecords request to read the stream records\n from the shard.

\n \n

A shard iterator expires 15 minutes after it is returned to the requester.

\n
" + "smithy.api#documentation": "

Returns a shard iterator. A shard iterator provides information\n about how to retrieve the stream records from within a shard. Use\n the shard iterator in a subsequent \n GetRecords request to read the stream records\n from the shard.

\n \n

A shard iterator expires 15 minutes after it is returned to the requester.

\n
", + "smithy.api#examples": [ + { + "title": "To obtain a shard iterator for the provided stream ARN and shard ID", + "documentation": "The following example returns a shard iterator for the provided stream ARN and shard ID.", + "input": { + "StreamArn": "arn:aws:dynamodb:us-west-2:111122223333:table/Forum/stream/2015-05-20T20:51:10.252", + "ShardId": "00000001414576573621-f55eea83", + "ShardIteratorType": "TRIM_HORIZON" + }, + "output": { + "ShardIterator": "arn:aws:dynamodb:us-west-2:111122223333:table/Forum/stream/2015-05-20T20:51:10.252|1|AAAAAAAAAAEvJp6D+zaQ... ..." + } + } + ] } }, "com.amazonaws.dynamodbstreams#GetShardIteratorInput": { @@ -1701,7 +1680,32 @@ } ], "traits": { - "smithy.api#documentation": "

Returns an array of stream ARNs associated with the current account and endpoint. If the\n TableName parameter is present, then ListStreams will return only the\n streams ARNs for that table.

\n \n

You can call ListStreams at a maximum rate of 5 times per second.

\n
" + "smithy.api#documentation": "

Returns an array of stream ARNs associated with the current account and endpoint. If the\n TableName parameter is present, then ListStreams will return only the\n streams ARNs for that table.

\n \n

You can call ListStreams at a maximum rate of 5 times per second.

\n
", + "smithy.api#examples": [ + { + "title": "To list all of the stream ARNs ", + "documentation": "The following example lists all of the stream ARNs.", + "output": { + "Streams": [ + { + "StreamArn": "arn:aws:dynamodb:us-wesst-2:111122223333:table/Forum/stream/2015-05-20T20:51:10.252", + "TableName": "Forum", + "StreamLabel": "2015-05-20T20:51:10.252" + }, + { + "StreamArn": "arn:aws:dynamodb:us-west-2:111122223333:table/Forum/stream/2015-05-20T20:50:02.714", + "TableName": "Forum", + "StreamLabel": "2015-05-20T20:50:02.714" + }, + { + "StreamArn": "arn:aws:dynamodb:us-west-2:111122223333:table/Forum/stream/2015-05-19T23:03:50.641", + "TableName": "Forum", + "StreamLabel": "2015-05-19T23:03:50.641" + } + ] + } + } + ] } }, "com.amazonaws.dynamodbstreams#ListStreamsInput": { diff --git a/codegen/sdk-codegen/aws-models/dynamodb.json b/codegen/sdk-codegen/aws-models/dynamodb.json index a1537f04c20..c4e51dc02fb 100644 --- a/codegen/sdk-codegen/aws-models/dynamodb.json +++ b/codegen/sdk-codegen/aws-models/dynamodb.json @@ -833,7 +833,67 @@ "aws.api#clientDiscoveredEndpoint": { "required": false }, - "smithy.api#documentation": "

The BatchGetItem operation returns the attributes of one or more items\n from one or more tables. You identify requested items by primary key.

\n

A single operation can retrieve up to 16 MB of data, which can contain as many as 100\n items. BatchGetItem returns a partial result if the response size limit is\n exceeded, the table's provisioned throughput is exceeded, more than 1MB per partition is requested,\n or an internal processing failure occurs. If a partial result is returned, the operation returns a value for\n UnprocessedKeys. You can use this value to retry the operation starting\n with the next item to get.

\n \n

If you request more than 100 items, BatchGetItem returns a\n ValidationException with the message \"Too many items requested for\n the BatchGetItem call.\"

\n
\n

For example, if you ask to retrieve 100 items, but each individual item is 300 KB in\n size, the system returns 52 items (so as not to exceed the 16 MB limit). It also returns\n an appropriate UnprocessedKeys value so you can get the next page of\n results. If desired, your application can include its own logic to assemble the pages of\n results into one dataset.

\n

If none of the items can be processed due to insufficient\n provisioned throughput on all of the tables in the request, then\n BatchGetItem returns a\n ProvisionedThroughputExceededException. If at least\n one of the items is successfully processed, then\n BatchGetItem completes successfully, while returning the keys of the\n unread items in UnprocessedKeys.

\n \n

If DynamoDB returns any unprocessed items, you should retry the batch operation on\n those items. However, we strongly recommend that you use an exponential\n backoff algorithm. If you retry the batch operation immediately, the\n underlying read or write requests can still fail due to throttling on the individual\n tables. If you delay the batch operation using exponential backoff, the individual\n requests in the batch are much more likely to succeed.

\n

For more information, see Batch Operations and Error Handling in the Amazon DynamoDB\n Developer Guide.

\n
\n

By default, BatchGetItem performs eventually consistent reads on every\n table in the request. If you want strongly consistent reads instead, you can set\n ConsistentRead to true for any or all tables.

\n

In order to minimize response latency, BatchGetItem may retrieve items in\n parallel.

\n

When designing your application, keep in mind that DynamoDB does not return items in\n any particular order. To help parse the response by item, include the primary key values\n for the items in your request in the ProjectionExpression parameter.

\n

If a requested item does not exist, it is not returned in the result. Requests for\n nonexistent items consume the minimum read capacity units according to the type of read.\n For more information, see Working with Tables in the Amazon DynamoDB Developer\n Guide.

" + "smithy.api#documentation": "

The BatchGetItem operation returns the attributes of one or more items\n from one or more tables. You identify requested items by primary key.

\n

A single operation can retrieve up to 16 MB of data, which can contain as many as 100\n items. BatchGetItem returns a partial result if the response size limit is\n exceeded, the table's provisioned throughput is exceeded, more than 1MB per partition is requested,\n or an internal processing failure occurs. If a partial result is returned, the operation returns a value for\n UnprocessedKeys. You can use this value to retry the operation starting\n with the next item to get.

\n \n

If you request more than 100 items, BatchGetItem returns a\n ValidationException with the message \"Too many items requested for\n the BatchGetItem call.\"

\n
\n

For example, if you ask to retrieve 100 items, but each individual item is 300 KB in\n size, the system returns 52 items (so as not to exceed the 16 MB limit). It also returns\n an appropriate UnprocessedKeys value so you can get the next page of\n results. If desired, your application can include its own logic to assemble the pages of\n results into one dataset.

\n

If none of the items can be processed due to insufficient\n provisioned throughput on all of the tables in the request, then\n BatchGetItem returns a\n ProvisionedThroughputExceededException. If at least\n one of the items is successfully processed, then\n BatchGetItem completes successfully, while returning the keys of the\n unread items in UnprocessedKeys.

\n \n

If DynamoDB returns any unprocessed items, you should retry the batch operation on\n those items. However, we strongly recommend that you use an exponential\n backoff algorithm. If you retry the batch operation immediately, the\n underlying read or write requests can still fail due to throttling on the individual\n tables. If you delay the batch operation using exponential backoff, the individual\n requests in the batch are much more likely to succeed.

\n

For more information, see Batch Operations and Error Handling in the Amazon DynamoDB\n Developer Guide.

\n
\n

By default, BatchGetItem performs eventually consistent reads on every\n table in the request. If you want strongly consistent reads instead, you can set\n ConsistentRead to true for any or all tables.

\n

In order to minimize response latency, BatchGetItem may retrieve items in\n parallel.

\n

When designing your application, keep in mind that DynamoDB does not return items in\n any particular order. To help parse the response by item, include the primary key values\n for the items in your request in the ProjectionExpression parameter.

\n

If a requested item does not exist, it is not returned in the result. Requests for\n nonexistent items consume the minimum read capacity units according to the type of read.\n For more information, see Working with Tables in the Amazon DynamoDB Developer\n Guide.

", + "smithy.api#examples": [ + { + "title": "To retrieve multiple items from a table", + "documentation": "This example reads multiple items from the Music table using a batch of three GetItem requests. Only the AlbumTitle attribute is returned.", + "input": { + "RequestItems": { + "Music": { + "Keys": [ + { + "Artist": { + "S": "No One You Know" + }, + "SongTitle": { + "S": "Call Me Today" + } + }, + { + "Artist": { + "S": "Acme Band" + }, + "SongTitle": { + "S": "Happy Day" + } + }, + { + "Artist": { + "S": "No One You Know" + }, + "SongTitle": { + "S": "Scared of My Shadow" + } + } + ], + "ProjectionExpression": "AlbumTitle" + } + } + }, + "output": { + "Responses": { + "Music": [ + { + "AlbumTitle": { + "S": "Somewhat Famous" + } + }, + { + "AlbumTitle": { + "S": "Blue Sky Blues" + } + }, + { + "AlbumTitle": { + "S": "Louder Than Ever" + } + } + ] + } + } + } + ] } }, "com.amazonaws.dynamodb#BatchGetItemInput": { @@ -1094,7 +1154,65 @@ "aws.api#clientDiscoveredEndpoint": { "required": false }, - "smithy.api#documentation": "

The BatchWriteItem operation puts or deletes multiple items in one or\n more tables. A single call to BatchWriteItem can transmit up to 16MB of\n data over the network, consisting of up to 25 item put or delete operations. While\n individual items can be up to 400 KB once stored, it's important to note that an item's\n representation might be greater than 400KB while being sent in DynamoDB's JSON format\n for the API call. For more details on this distinction, see Naming Rules and Data Types.

\n \n

\n BatchWriteItem cannot update items. If you perform a BatchWriteItem\n operation on an existing item, that item's values will be overwritten by the\n operation and it will appear like it was updated. To update items, we recommend you\n use the UpdateItem action.

\n
\n

The individual PutItem and DeleteItem operations specified\n in BatchWriteItem are atomic; however BatchWriteItem as a\n whole is not. If any requested operations fail because the table's provisioned\n throughput is exceeded or an internal processing failure occurs, the failed operations\n are returned in the UnprocessedItems response parameter. You can\n investigate and optionally resend the requests. Typically, you would call\n BatchWriteItem in a loop. Each iteration would check for unprocessed\n items and submit a new BatchWriteItem request with those unprocessed items\n until all items have been processed.

\n

If none of the items can be processed due to insufficient\n provisioned throughput on all of the tables in the request, then\n BatchWriteItem returns a\n ProvisionedThroughputExceededException.

\n \n

If DynamoDB returns any unprocessed items, you should retry the batch operation on\n those items. However, we strongly recommend that you use an exponential\n backoff algorithm. If you retry the batch operation immediately, the\n underlying read or write requests can still fail due to throttling on the individual\n tables. If you delay the batch operation using exponential backoff, the individual\n requests in the batch are much more likely to succeed.

\n

For more information, see Batch Operations and Error Handling in the Amazon DynamoDB\n Developer Guide.

\n
\n

With BatchWriteItem, you can efficiently write or delete large amounts of\n data, such as from Amazon EMR, or copy data from another database into DynamoDB. In\n order to improve performance with these large-scale operations,\n BatchWriteItem does not behave in the same way as individual\n PutItem and DeleteItem calls would. For example, you\n cannot specify conditions on individual put and delete requests, and\n BatchWriteItem does not return deleted items in the response.

\n

If you use a programming language that supports concurrency, you can use threads to\n write items in parallel. Your application must include the necessary logic to manage the\n threads. With languages that don't support threading, you must update or delete the\n specified items one at a time. In both situations, BatchWriteItem performs\n the specified put and delete operations in parallel, giving you the power of the thread\n pool approach without having to introduce complexity into your application.

\n

Parallel processing reduces latency, but each specified put and delete request\n consumes the same number of write capacity units whether it is processed in parallel or\n not. Delete operations on nonexistent items consume one write capacity unit.

\n

If one or more of the following is true, DynamoDB rejects the entire batch write\n operation:

\n " + "smithy.api#documentation": "

The BatchWriteItem operation puts or deletes multiple items in one or\n more tables. A single call to BatchWriteItem can transmit up to 16MB of\n data over the network, consisting of up to 25 item put or delete operations. While\n individual items can be up to 400 KB once stored, it's important to note that an item's\n representation might be greater than 400KB while being sent in DynamoDB's JSON format\n for the API call. For more details on this distinction, see Naming Rules and Data Types.

\n \n

\n BatchWriteItem cannot update items. If you perform a BatchWriteItem\n operation on an existing item, that item's values will be overwritten by the\n operation and it will appear like it was updated. To update items, we recommend you\n use the UpdateItem action.

\n
\n

The individual PutItem and DeleteItem operations specified\n in BatchWriteItem are atomic; however BatchWriteItem as a\n whole is not. If any requested operations fail because the table's provisioned\n throughput is exceeded or an internal processing failure occurs, the failed operations\n are returned in the UnprocessedItems response parameter. You can\n investigate and optionally resend the requests. Typically, you would call\n BatchWriteItem in a loop. Each iteration would check for unprocessed\n items and submit a new BatchWriteItem request with those unprocessed items\n until all items have been processed.

\n

If none of the items can be processed due to insufficient\n provisioned throughput on all of the tables in the request, then\n BatchWriteItem returns a\n ProvisionedThroughputExceededException.

\n \n

If DynamoDB returns any unprocessed items, you should retry the batch operation on\n those items. However, we strongly recommend that you use an exponential\n backoff algorithm. If you retry the batch operation immediately, the\n underlying read or write requests can still fail due to throttling on the individual\n tables. If you delay the batch operation using exponential backoff, the individual\n requests in the batch are much more likely to succeed.

\n

For more information, see Batch Operations and Error Handling in the Amazon DynamoDB\n Developer Guide.

\n
\n

With BatchWriteItem, you can efficiently write or delete large amounts of\n data, such as from Amazon EMR, or copy data from another database into DynamoDB. In\n order to improve performance with these large-scale operations,\n BatchWriteItem does not behave in the same way as individual\n PutItem and DeleteItem calls would. For example, you\n cannot specify conditions on individual put and delete requests, and\n BatchWriteItem does not return deleted items in the response.

\n

If you use a programming language that supports concurrency, you can use threads to\n write items in parallel. Your application must include the necessary logic to manage the\n threads. With languages that don't support threading, you must update or delete the\n specified items one at a time. In both situations, BatchWriteItem performs\n the specified put and delete operations in parallel, giving you the power of the thread\n pool approach without having to introduce complexity into your application.

\n

Parallel processing reduces latency, but each specified put and delete request\n consumes the same number of write capacity units whether it is processed in parallel or\n not. Delete operations on nonexistent items consume one write capacity unit.

\n

If one or more of the following is true, DynamoDB rejects the entire batch write\n operation:

\n ", + "smithy.api#examples": [ + { + "title": "To add multiple items to a table", + "documentation": "This example adds three new items to the Music table using a batch of three PutItem requests.", + "input": { + "RequestItems": { + "Music": [ + { + "PutRequest": { + "Item": { + "AlbumTitle": { + "S": "Somewhat Famous" + }, + "SongTitle": { + "S": "Call Me Today" + }, + "Artist": { + "S": "No One You Know" + } + } + } + }, + { + "PutRequest": { + "Item": { + "AlbumTitle": { + "S": "Songs About Life" + }, + "SongTitle": { + "S": "Happy Day" + }, + "Artist": { + "S": "Acme Band" + } + } + } + }, + { + "PutRequest": { + "Item": { + "AlbumTitle": { + "S": "Blue Sky Blues" + }, + "SongTitle": { + "S": "Scared of My Shadow" + }, + "Artist": { + "S": "No One You Know" + } + } + } + } + ] + } + }, + "output": {} + } + ] } }, "com.amazonaws.dynamodb#BatchWriteItemInput": { @@ -2289,7 +2407,30 @@ "aws.api#clientDiscoveredEndpoint": { "required": false }, - "smithy.api#documentation": "

Deletes a single item in a table by primary key. You can perform a conditional delete\n operation that deletes the item if it exists, or if it has an expected attribute\n value.

\n

In addition to deleting an item, you can also return the item's attribute values in\n the same operation, using the ReturnValues parameter.

\n

Unless you specify conditions, the DeleteItem is an idempotent operation;\n running it multiple times on the same item or attribute does not\n result in an error response.

\n

Conditional deletes are useful for deleting items only if specific conditions are met.\n If those conditions are met, DynamoDB performs the delete. Otherwise, the item is not\n deleted.

" + "smithy.api#documentation": "

Deletes a single item in a table by primary key. You can perform a conditional delete\n operation that deletes the item if it exists, or if it has an expected attribute\n value.

\n

In addition to deleting an item, you can also return the item's attribute values in\n the same operation, using the ReturnValues parameter.

\n

Unless you specify conditions, the DeleteItem is an idempotent operation;\n running it multiple times on the same item or attribute does not\n result in an error response.

\n

Conditional deletes are useful for deleting items only if specific conditions are met.\n If those conditions are met, DynamoDB performs the delete. Otherwise, the item is not\n deleted.

", + "smithy.api#examples": [ + { + "title": "To delete an item", + "documentation": "This example deletes an item from the Music table.", + "input": { + "TableName": "Music", + "Key": { + "Artist": { + "S": "No One You Know" + }, + "SongTitle": { + "S": "Scared of My Shadow" + } + } + }, + "output": { + "ConsumedCapacity": { + "CapacityUnits": 1, + "TableName": "Music" + } + } + } + ] } }, "com.amazonaws.dynamodb#DeleteItemInput": { @@ -2467,7 +2608,29 @@ "aws.api#clientDiscoveredEndpoint": { "required": false }, - "smithy.api#documentation": "

The DeleteTable operation deletes a table and all of its items. After a\n DeleteTable request, the specified table is in the\n DELETING state until DynamoDB completes the deletion. If the table is\n in the ACTIVE state, you can delete it. If a table is in\n CREATING or UPDATING states, then DynamoDB returns a\n ResourceInUseException. If the specified table does not exist, DynamoDB\n returns a ResourceNotFoundException. If table is already in the\n DELETING state, no error is returned.

\n \n

This operation only applies to Version 2019.11.21 (Current) \n of global tables.\n

\n
\n \n

DynamoDB might continue to accept data read and write operations, such as\n GetItem and PutItem, on a table in the\n DELETING state until the table deletion is complete.

\n
\n

When you delete a table, any indexes on that table are also deleted.

\n

If you have DynamoDB Streams enabled on the table, then the corresponding stream on\n that table goes into the DISABLED state, and the stream is automatically\n deleted after 24 hours.

\n

Use the DescribeTable action to check the status of the table.

" + "smithy.api#documentation": "

The DeleteTable operation deletes a table and all of its items. After a\n DeleteTable request, the specified table is in the\n DELETING state until DynamoDB completes the deletion. If the table is\n in the ACTIVE state, you can delete it. If a table is in\n CREATING or UPDATING states, then DynamoDB returns a\n ResourceInUseException. If the specified table does not exist, DynamoDB\n returns a ResourceNotFoundException. If table is already in the\n DELETING state, no error is returned.

\n \n

This operation only applies to Version 2019.11.21 (Current) \n of global tables.\n

\n
\n \n

DynamoDB might continue to accept data read and write operations, such as\n GetItem and PutItem, on a table in the\n DELETING state until the table deletion is complete.

\n
\n

When you delete a table, any indexes on that table are also deleted.

\n

If you have DynamoDB Streams enabled on the table, then the corresponding stream on\n that table goes into the DISABLED state, and the stream is automatically\n deleted after 24 hours.

\n

Use the DescribeTable action to check the status of the table.

", + "smithy.api#examples": [ + { + "title": "To delete a table", + "documentation": "This example deletes the Music table.", + "input": { + "TableName": "Music" + }, + "output": { + "TableDescription": { + "TableStatus": "DELETING", + "TableSizeBytes": 0, + "ItemCount": 0, + "TableName": "Music", + "ProvisionedThroughput": { + "NumberOfDecreasesToday": 1, + "WriteCapacityUnits": 5, + "ReadCapacityUnits": 5 + } + } + } + } + ] } }, "com.amazonaws.dynamodb#DeleteTableInput": { @@ -3029,7 +3192,19 @@ "aws.api#clientDiscoveredEndpoint": { "required": false }, - "smithy.api#documentation": "

Returns the current provisioned-capacity quotas for your Amazon Web Services account in\n a Region, both for the Region as a whole and for any one DynamoDB table that you create\n there.

\n

When you establish an Amazon Web Services account, the account has initial quotas on\n the maximum read capacity units and write capacity units that you can provision across\n all of your DynamoDB tables in a given Region. Also, there are per-table\n quotas that apply when you create a table there. For more information, see Service,\n Account, and Table Quotas page in the Amazon DynamoDB\n Developer Guide.

\n

Although you can increase these quotas by filing a case at Amazon Web Services Support Center, obtaining the\n increase is not instantaneous. The DescribeLimits action lets you write\n code to compare the capacity you are currently using to those quotas imposed by your\n account so that you have enough time to apply for an increase before you hit a\n quota.

\n

For example, you could use one of the Amazon Web Services SDKs to do the\n following:

\n
    \n
  1. \n

    Call DescribeLimits for a particular Region to obtain your\n current account quotas on provisioned capacity there.

    \n
  2. \n
  3. \n

    Create a variable to hold the aggregate read capacity units provisioned for\n all your tables in that Region, and one to hold the aggregate write capacity\n units. Zero them both.

    \n
  4. \n
  5. \n

    Call ListTables to obtain a list of all your DynamoDB\n tables.

    \n
  6. \n
  7. \n

    For each table name listed by ListTables, do the\n following:

    \n
      \n
    • \n

      Call DescribeTable with the table name.

      \n
    • \n
    • \n

      Use the data returned by DescribeTable to add the read\n capacity units and write capacity units provisioned for the table itself\n to your variables.

      \n
    • \n
    • \n

      If the table has one or more global secondary indexes (GSIs), loop\n over these GSIs and add their provisioned capacity values to your\n variables as well.

      \n
    • \n
    \n
  8. \n
  9. \n

    Report the account quotas for that Region returned by\n DescribeLimits, along with the total current provisioned\n capacity levels you have calculated.

    \n
  10. \n
\n

This will let you see whether you are getting close to your account-level\n quotas.

\n

The per-table quotas apply only when you are creating a new table. They restrict the\n sum of the provisioned capacity of the new table itself and all its global secondary\n indexes.

\n

For existing tables and their GSIs, DynamoDB doesn't let you increase provisioned\n capacity extremely rapidly, but the only quota that applies is that the aggregate\n provisioned capacity over all your tables and GSIs cannot exceed either of the\n per-account quotas.

\n \n

\n DescribeLimits should only be called periodically. You can expect\n throttling errors if you call it more than once in a minute.

\n
\n

The DescribeLimits Request element has no content.

" + "smithy.api#documentation": "

Returns the current provisioned-capacity quotas for your Amazon Web Services account in\n a Region, both for the Region as a whole and for any one DynamoDB table that you create\n there.

\n

When you establish an Amazon Web Services account, the account has initial quotas on\n the maximum read capacity units and write capacity units that you can provision across\n all of your DynamoDB tables in a given Region. Also, there are per-table\n quotas that apply when you create a table there. For more information, see Service,\n Account, and Table Quotas page in the Amazon DynamoDB\n Developer Guide.

\n

Although you can increase these quotas by filing a case at Amazon Web Services Support Center, obtaining the\n increase is not instantaneous. The DescribeLimits action lets you write\n code to compare the capacity you are currently using to those quotas imposed by your\n account so that you have enough time to apply for an increase before you hit a\n quota.

\n

For example, you could use one of the Amazon Web Services SDKs to do the\n following:

\n
    \n
  1. \n

    Call DescribeLimits for a particular Region to obtain your\n current account quotas on provisioned capacity there.

    \n
  2. \n
  3. \n

    Create a variable to hold the aggregate read capacity units provisioned for\n all your tables in that Region, and one to hold the aggregate write capacity\n units. Zero them both.

    \n
  4. \n
  5. \n

    Call ListTables to obtain a list of all your DynamoDB\n tables.

    \n
  6. \n
  7. \n

    For each table name listed by ListTables, do the\n following:

    \n
      \n
    • \n

      Call DescribeTable with the table name.

      \n
    • \n
    • \n

      Use the data returned by DescribeTable to add the read\n capacity units and write capacity units provisioned for the table itself\n to your variables.

      \n
    • \n
    • \n

      If the table has one or more global secondary indexes (GSIs), loop\n over these GSIs and add their provisioned capacity values to your\n variables as well.

      \n
    • \n
    \n
  8. \n
  9. \n

    Report the account quotas for that Region returned by\n DescribeLimits, along with the total current provisioned\n capacity levels you have calculated.

    \n
  10. \n
\n

This will let you see whether you are getting close to your account-level\n quotas.

\n

The per-table quotas apply only when you are creating a new table. They restrict the\n sum of the provisioned capacity of the new table itself and all its global secondary\n indexes.

\n

For existing tables and their GSIs, DynamoDB doesn't let you increase provisioned\n capacity extremely rapidly, but the only quota that applies is that the aggregate\n provisioned capacity over all your tables and GSIs cannot exceed either of the\n per-account quotas.

\n \n

\n DescribeLimits should only be called periodically. You can expect\n throttling errors if you call it more than once in a minute.

\n
\n

The DescribeLimits Request element has no content.

", + "smithy.api#examples": [ + { + "title": "To determine capacity limits per table and account, in the current AWS region", + "documentation": "The following example returns the maximum read and write capacity units per table, and for the AWS account, in the current AWS region.", + "output": { + "TableMaxWriteCapacityUnits": 10000, + "TableMaxReadCapacityUnits": 10000, + "AccountMaxReadCapacityUnits": 20000, + "AccountMaxWriteCapacityUnits": 20000 + } + } + ] } }, "com.amazonaws.dynamodb#DescribeLimitsInput": { @@ -3595,52 +3770,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3648,13 +3827,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3664,175 +3852,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://dynamodb.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -3841,99 +3937,142 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://dynamodb.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "local" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "http://localhost:8000", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "dynamodb", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://dynamodb.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "local" + ] + } + ], + "endpoint": { + "url": "http://localhost:8000", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "dynamodb", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://dynamodb.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -5439,7 +5578,37 @@ "aws.api#clientDiscoveredEndpoint": { "required": false }, - "smithy.api#documentation": "

The GetItem operation returns a set of attributes for the item with the\n given primary key. If there is no matching item, GetItem does not return\n any data and there will be no Item element in the response.

\n

\n GetItem provides an eventually consistent read by default. If your\n application requires a strongly consistent read, set ConsistentRead to\n true. Although a strongly consistent read might take more time than an\n eventually consistent read, it always returns the last updated value.

" + "smithy.api#documentation": "

The GetItem operation returns a set of attributes for the item with the\n given primary key. If there is no matching item, GetItem does not return\n any data and there will be no Item element in the response.

\n

\n GetItem provides an eventually consistent read by default. If your\n application requires a strongly consistent read, set ConsistentRead to\n true. Although a strongly consistent read might take more time than an\n eventually consistent read, it always returns the last updated value.

", + "smithy.api#examples": [ + { + "title": "To read an item from a table", + "documentation": "This example retrieves an item from the Music table. The table has a partition key and a sort key (Artist and SongTitle), so you must specify both of these attributes.", + "input": { + "TableName": "Music", + "Key": { + "Artist": { + "S": "Acme Band" + }, + "SongTitle": { + "S": "Happy Day" + } + } + }, + "output": { + "Item": { + "AlbumTitle": { + "S": "Songs About Life" + }, + "SongTitle": { + "S": "Happy Day" + }, + "Artist": { + "S": "Acme Band" + } + } + } + } + ] } }, "com.amazonaws.dynamodb#GetItemInput": { @@ -7187,6 +7356,20 @@ "required": false }, "smithy.api#documentation": "

Returns an array of table names associated with the current account and endpoint. The\n output from ListTables is paginated, with each page returning a maximum of\n 100 table names.

", + "smithy.api#examples": [ + { + "title": "To list tables", + "documentation": "This example lists all of the tables associated with the current AWS account and endpoint.", + "output": { + "TableNames": [ + "Forum", + "ProductCatalog", + "Reply", + "Thread" + ] + } + } + ], "smithy.api#paginated": { "inputToken": "ExclusiveStartTableName", "outputToken": "LastEvaluatedTableName", @@ -7892,7 +8075,34 @@ "aws.api#clientDiscoveredEndpoint": { "required": false }, - "smithy.api#documentation": "

Creates a new item, or replaces an old item with a new item. If an item that has the\n same primary key as the new item already exists in the specified table, the new item\n completely replaces the existing item. You can perform a conditional put operation (add\n a new item if one with the specified primary key doesn't exist), or replace an existing\n item if it has certain attribute values. You can return the item's attribute values in\n the same operation, using the ReturnValues parameter.

\n

When you add an item, the primary key attributes are the only required attributes.\n

\n

Empty String and Binary attribute values are allowed. Attribute values of type String\n and Binary must have a length greater than zero if the attribute is used as a key\n attribute for a table or index. Set type attributes cannot be empty.

\n

Invalid Requests with empty values will be rejected with a\n ValidationException exception.

\n \n

To prevent a new item from replacing an existing item, use a conditional\n expression that contains the attribute_not_exists function with the\n name of the attribute being used as the partition key for the table. Since every\n record must contain that attribute, the attribute_not_exists function\n will only succeed if no matching item exists.

\n
\n

For more information about PutItem, see Working with\n Items in the Amazon DynamoDB Developer Guide.

" + "smithy.api#documentation": "

Creates a new item, or replaces an old item with a new item. If an item that has the\n same primary key as the new item already exists in the specified table, the new item\n completely replaces the existing item. You can perform a conditional put operation (add\n a new item if one with the specified primary key doesn't exist), or replace an existing\n item if it has certain attribute values. You can return the item's attribute values in\n the same operation, using the ReturnValues parameter.

\n

When you add an item, the primary key attributes are the only required attributes.\n

\n

Empty String and Binary attribute values are allowed. Attribute values of type String\n and Binary must have a length greater than zero if the attribute is used as a key\n attribute for a table or index. Set type attributes cannot be empty.

\n

Invalid Requests with empty values will be rejected with a\n ValidationException exception.

\n \n

To prevent a new item from replacing an existing item, use a conditional\n expression that contains the attribute_not_exists function with the\n name of the attribute being used as the partition key for the table. Since every\n record must contain that attribute, the attribute_not_exists function\n will only succeed if no matching item exists.

\n
\n

For more information about PutItem, see Working with\n Items in the Amazon DynamoDB Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To add an item to a table", + "documentation": "This example adds a new item to the Music table.", + "input": { + "TableName": "Music", + "Item": { + "AlbumTitle": { + "S": "Somewhat Famous" + }, + "SongTitle": { + "S": "Call Me Today" + }, + "Artist": { + "S": "No One You Know" + } + }, + "ReturnConsumedCapacity": "TOTAL" + }, + "output": { + "ConsumedCapacity": { + "CapacityUnits": 1, + "TableName": "Music" + } + } + } + ] } }, "com.amazonaws.dynamodb#PutItemInput": { @@ -8050,6 +8260,34 @@ "required": false }, "smithy.api#documentation": "

You must provide the name of the partition key attribute and a single value for that\n attribute. Query returns all items with that partition key value.\n Optionally, you can provide a sort key attribute and use a comparison operator to refine\n the search results.

\n

Use the KeyConditionExpression parameter to provide a specific value for\n the partition key. The Query operation will return all of the items from\n the table or index with that partition key value. You can optionally narrow the scope of\n the Query operation by specifying a sort key value and a comparison\n operator in KeyConditionExpression. To further refine the\n Query results, you can optionally provide a\n FilterExpression. A FilterExpression determines which\n items within the results should be returned to you. All of the other results are\n discarded.

\n

A Query operation always returns a result set. If no matching items are\n found, the result set will be empty. Queries that do not return results consume the\n minimum number of read capacity units for that type of read operation.

\n \n

DynamoDB calculates the number of read capacity units consumed based on item\n size, not on the amount of data that is returned to an application. The number of\n capacity units consumed will be the same whether you request all of the attributes\n (the default behavior) or just some of them (using a projection expression). The\n number will also be the same whether or not you use a FilterExpression.\n

\n
\n

\n Query results are always sorted by the sort key value. If the data type of\n the sort key is Number, the results are returned in numeric order; otherwise, the\n results are returned in order of UTF-8 bytes. By default, the sort order is ascending.\n To reverse the order, set the ScanIndexForward parameter to false.

\n

A single Query operation will read up to the maximum number of items set\n (if using the Limit parameter) or a maximum of 1 MB of data and then apply\n any filtering to the results using FilterExpression. If\n LastEvaluatedKey is present in the response, you will need to paginate\n the result set. For more information, see Paginating\n the Results in the Amazon DynamoDB Developer Guide.

\n

\n FilterExpression is applied after a Query finishes, but before\n the results are returned. A FilterExpression cannot contain partition key\n or sort key attributes. You need to specify those attributes in the\n KeyConditionExpression.

\n \n

A Query operation can return an empty result set and a\n LastEvaluatedKey if all the items read for the page of results are\n filtered out.

\n
\n

You can query a table, a local secondary index, or a global secondary index. For a\n query on a table or on a local secondary index, you can set the\n ConsistentRead parameter to true and obtain a strongly\n consistent result. Global secondary indexes support eventually consistent reads only, so\n do not specify ConsistentRead when querying a global secondary\n index.

", + "smithy.api#examples": [ + { + "title": "To query an item", + "documentation": "This example queries items in the Music table. The table has a partition key and sort key (Artist and SongTitle), but this query only specifies the partition key value. It returns song titles by the artist named \"No One You Know\".", + "input": { + "TableName": "Music", + "ProjectionExpression": "SongTitle", + "KeyConditionExpression": "Artist = :v1", + "ExpressionAttributeValues": { + ":v1": { + "S": "No One You Know" + } + } + }, + "output": { + "Count": 2, + "Items": [ + { + "SongTitle": { + "S": "Call Me Today" + } + } + ], + "ScannedCount": 2, + "ConsumedCapacity": {} + } + } + ], "smithy.api#paginated": { "inputToken": "ExclusiveStartKey", "outputToken": "LastEvaluatedKey", @@ -9487,6 +9725,49 @@ "required": false }, "smithy.api#documentation": "

The Scan operation returns one or more items and item attributes by\n accessing every item in a table or a secondary index. To have DynamoDB return fewer\n items, you can provide a FilterExpression operation.

\n

If the total size of scanned items exceeds the maximum dataset size limit of 1 MB,\n the scan completes and results are returned to the user. The LastEvaluatedKey \n value is also returned and the requestor can use the LastEvaluatedKey to continue \n the scan in a subsequent operation. Each scan response also includes number of items that were \n scanned (ScannedCount) as part of the request. If using a FilterExpression, a scan result \n can result in no items meeting the criteria and the Count will result in zero. If \n you did not use a FilterExpression in the scan request, then Count is \n the same as ScannedCount.

\n \n

\n Count and ScannedCount only return the count of items specific to a \n single scan request and, unless the table is less than 1MB, do not represent the total number \n of items in the table.\n

\n
\n

A single Scan operation first reads up to the maximum number of items set (if\n using the Limit parameter) or a maximum of 1 MB of data and then applies any\n filtering to the results if a FilterExpression is provided. If\n LastEvaluatedKey is present in the response, pagination is required to complete the\n full table scan. For more information, see Paginating the\n Results in the Amazon DynamoDB Developer Guide.

\n

\n Scan operations proceed sequentially; however, for faster performance on\n a large table or secondary index, applications can request a parallel Scan\n operation by providing the Segment and TotalSegments\n parameters. For more information, see Parallel\n Scan in the Amazon DynamoDB Developer Guide.

\n

By default, a Scan uses eventually consistent reads when accessing the items in a table. \n Therefore, the results from an eventually consistent Scan may not include the latest item \n changes at the time the scan iterates through each item in the table. If you require a strongly consistent \n read of each item as the scan iterates through the items in the table, you can set the ConsistentRead \n parameter to true. Strong consistency only relates to the consistency of the read at the item level.

\n \n

\n DynamoDB does not provide snapshot isolation for a scan operation when the ConsistentRead \n parameter is set to true. Thus, a DynamoDB scan operation does not guarantee that all reads in a scan \n see a consistent snapshot of the table when the scan operation was requested.\n

\n
", + "smithy.api#examples": [ + { + "title": "To scan a table", + "documentation": "This example scans the entire Music table, and then narrows the results to songs by the artist \"No One You Know\". For each item, only the album title and song title are returned.", + "input": { + "TableName": "Music", + "FilterExpression": "Artist = :a", + "ProjectionExpression": "#ST, #AT", + "ExpressionAttributeNames": { + "#ST": "SongTitle", + "#AT": "AlbumTitle" + }, + "ExpressionAttributeValues": { + ":a": { + "S": "No One You Know" + } + } + }, + "output": { + "Count": 2, + "Items": [ + { + "SongTitle": { + "S": "Call Me Today" + }, + "AlbumTitle": { + "S": "Somewhat Famous" + } + }, + { + "SongTitle": { + "S": "Scared of My Shadow" + }, + "AlbumTitle": { + "S": "Blue Sky Blues" + } + } + ], + "ScannedCount": 3, + "ConsumedCapacity": {} + } + } + ], "smithy.api#paginated": { "inputToken": "ExclusiveStartKey", "outputToken": "LastEvaluatedKey", @@ -11203,7 +11484,54 @@ "aws.api#clientDiscoveredEndpoint": { "required": false }, - "smithy.api#documentation": "

Edits an existing item's attributes, or adds a new item to the table if it does not\n already exist. You can put, delete, or add attribute values. You can also perform a\n conditional update on an existing item (insert a new attribute name-value pair if it\n doesn't exist, or replace an existing name-value pair if it has certain expected\n attribute values).

\n

You can also return the item's attribute values in the same UpdateItem\n operation using the ReturnValues parameter.

" + "smithy.api#documentation": "

Edits an existing item's attributes, or adds a new item to the table if it does not\n already exist. You can put, delete, or add attribute values. You can also perform a\n conditional update on an existing item (insert a new attribute name-value pair if it\n doesn't exist, or replace an existing name-value pair if it has certain expected\n attribute values).

\n

You can also return the item's attribute values in the same UpdateItem\n operation using the ReturnValues parameter.

", + "smithy.api#examples": [ + { + "title": "To update an item in a table", + "documentation": "This example updates an item in the Music table. It adds a new attribute (Year) and modifies the AlbumTitle attribute. All of the attributes in the item, as they appear after the update, are returned in the response.", + "input": { + "TableName": "Music", + "Key": { + "Artist": { + "S": "Acme Band" + }, + "SongTitle": { + "S": "Happy Day" + } + }, + "UpdateExpression": "SET #Y = :y, #AT = :t", + "ExpressionAttributeNames": { + "#Y": "Year", + "#AT": "AlbumTitle" + }, + "ExpressionAttributeValues": { + ":y": { + "N": "2015" + }, + ":t": { + "S": "Louder Than Ever" + } + }, + "ReturnValues": "ALL_NEW" + }, + "output": { + "Attributes": { + "AlbumTitle": { + "S": "Louder Than Ever" + }, + "Artist": { + "S": "Acme Band" + }, + "Year": { + "N": "2015" + }, + "SongTitle": { + "S": "Happy Day" + } + } + } + } + ] } }, "com.amazonaws.dynamodb#UpdateItemInput": { diff --git a/codegen/sdk-codegen/aws-models/ebs.json b/codegen/sdk-codegen/aws-models/ebs.json index a310cbbd5e8..71521a842da 100644 --- a/codegen/sdk-codegen/aws-models/ebs.json +++ b/codegen/sdk-codegen/aws-models/ebs.json @@ -445,52 +445,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -498,13 +502,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -514,224 +527,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ebs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://ebs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://ebs-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://ebs-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ebs.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://ebs.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://ebs.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://ebs.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/ec2-instance-connect.json b/codegen/sdk-codegen/aws-models/ec2-instance-connect.json index 859eb7887f7..c41d4bc08ff 100644 --- a/codegen/sdk-codegen/aws-models/ec2-instance-connect.json +++ b/codegen/sdk-codegen/aws-models/ec2-instance-connect.json @@ -114,52 +114,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -167,13 +171,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -183,224 +196,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ec2-instance-connect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://ec2-instance-connect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://ec2-instance-connect-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://ec2-instance-connect-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ec2-instance-connect.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://ec2-instance-connect.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://ec2-instance-connect.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://ec2-instance-connect.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -415,8 +379,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -428,8 +392,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -441,8 +405,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -454,8 +418,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -467,8 +431,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -480,8 +444,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -493,8 +457,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -506,8 +470,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -519,8 +483,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -532,8 +496,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -545,8 +509,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -558,8 +522,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -571,8 +546,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -584,8 +570,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -597,8 +594,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -610,8 +618,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -623,8 +631,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -636,8 +644,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -648,8 +656,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -660,10 +668,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -846,7 +860,23 @@ } ], "traits": { - "smithy.api#documentation": "

Pushes an SSH public key to the specified EC2 instance for use by the specified user.\n The key remains for 60 seconds. For more information, see Connect to\n your Linux instance using EC2 Instance Connect in the Amazon EC2\n User Guide.

" + "smithy.api#documentation": "

Pushes an SSH public key to the specified EC2 instance for use by the specified user.\n The key remains for 60 seconds. For more information, see Connect to\n your Linux instance using EC2 Instance Connect in the Amazon EC2\n User Guide.

", + "smithy.api#examples": [ + { + "title": "To push an SSH key to an EC2 instance", + "documentation": "The following example pushes a sample SSH public key to the EC2 instance i-abcd1234 in AZ us-west-2b for use by the instance OS user ec2-user.", + "input": { + "InstanceId": "i-abcd1234", + "InstanceOSUser": "ec2-user", + "SSHPublicKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3FlHqj2eqCdrGHuA6dRjfZXQ4HX5lXEIRHaNbxEwE5Te7xNF7StwhrDtiV7IdT5fDqbRyGw/szPj3xGkNTVoElCZ2dDFb2qYZ1WLIpZwj/UhO9l2mgfjR56UojjQut5Jvn2KZ1OcyrNO0J83kCaJCV7JoVbXY79FBMUccYNY45zmv9+1FMCfY6i2jdIhwR6+yLk8oubL8lIPyq7X+6b9S0yKCkB7Peml1DvghlybpAIUrC9vofHt6XP4V1i0bImw1IlljQS+DUmULRFSccATDscCX9ajnj7Crhm0HAZC0tBPXpFdHkPwL3yzYo546SCS9LKEwz62ymxxbL9k7h09t", + "AvailabilityZone": "us-west-2a" + }, + "output": { + "RequestId": "abcd1234-abcd-1234-abcd-1234abcd1234", + "Success": true + } + } + ] } }, "com.amazonaws.ec2instanceconnect#SendSSHPublicKeyRequest": { @@ -879,6 +909,9 @@ "smithy.api#documentation": "

The Availability Zone in which the EC2 instance was launched.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ec2instanceconnect#SendSSHPublicKeyResponse": { @@ -897,6 +930,9 @@ "smithy.api#documentation": "

Is true if the request succeeds and an error otherwise.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ec2instanceconnect#SendSerialConsoleSSHPublicKey": { @@ -970,6 +1006,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ec2instanceconnect#SendSerialConsoleSSHPublicKeyResponse": { @@ -988,6 +1027,9 @@ "smithy.api#documentation": "

Is true if the request succeeds and an error otherwise.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ec2instanceconnect#SerialConsoleAccessDisabledException": { diff --git a/codegen/sdk-codegen/aws-models/ecr-public.json b/codegen/sdk-codegen/aws-models/ecr-public.json index 2ef48a9efed..c0d80f9bc10 100644 --- a/codegen/sdk-codegen/aws-models/ecr-public.json +++ b/codegen/sdk-codegen/aws-models/ecr-public.json @@ -2919,52 +2919,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2972,13 +2976,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2988,224 +3001,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.ecr-public-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://api.ecr-public-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.ecr-public-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://api.ecr-public-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.ecr-public.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://api.ecr-public.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://api.ecr-public.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://api.ecr-public.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3220,8 +3184,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3233,8 +3197,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3246,8 +3210,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3259,8 +3223,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3272,8 +3236,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3285,8 +3249,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3298,8 +3262,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3311,8 +3275,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3324,8 +3288,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3337,8 +3301,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3350,8 +3314,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3363,8 +3327,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3374,8 +3338,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3387,8 +3351,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3398,8 +3362,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3411,8 +3375,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3422,8 +3386,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3435,8 +3399,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3446,8 +3410,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3459,8 +3423,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3472,8 +3436,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3485,8 +3449,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3497,8 +3461,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3509,8 +3473,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } }, diff --git a/codegen/sdk-codegen/aws-models/efs.json b/codegen/sdk-codegen/aws-models/efs.json index 56f669179d9..4b84dddbc18 100644 --- a/codegen/sdk-codegen/aws-models/efs.json +++ b/codegen/sdk-codegen/aws-models/efs.json @@ -525,6 +525,25 @@ ], "traits": { "smithy.api#documentation": "

Creates a mount target for a file system. You can then mount the file system on EC2\n instances by using the mount target.

\n

You can create one mount target in each Availability Zone in your VPC. All EC2\n instances in a VPC within a given Availability Zone share a single mount target for a given\n file system. If you have multiple subnets in an Availability Zone, you create a mount target\n in one of the subnets. EC2 instances do not need to be in the same subnet as the mount target\n in order to access their file system.

\n

You can create only one mount target for an EFS file system using One Zone storage\n classes. You must create that mount target in the same Availability Zone in which the file\n system is located. Use the AvailabilityZoneName and\n AvailabiltyZoneId properties in the DescribeFileSystems\n response object to get this information. Use the subnetId associated with the\n file system's Availability Zone when creating the mount target.

\n

For more information, see Amazon EFS: How it Works.

\n

To create a mount target for a file system, the file system's lifecycle state must be\n available. For more information, see DescribeFileSystems.

\n

In the request, provide the following:

\n \n

After creating the mount target, Amazon EFS returns a response that includes, a\n MountTargetId and an IpAddress. You use this IP address when\n mounting the file system in an EC2 instance. You can also use the mount target's DNS name\n when mounting the file system. The EC2 instance on which you mount the file system by using\n the mount target can resolve the mount target's DNS name to its IP address. For more\n information, see How it Works:\n Implementation Overview.

\n

Note that you can create mount targets for a file system in only one VPC, and there can\n be only one mount target per Availability Zone. That is, if the file system already has one or\n more mount targets created for it, the subnet specified in the request to add another mount\n target must meet the following requirements:

\n \n

If the request satisfies the requirements, Amazon EFS does the following:

\n \n \n

The CreateMountTarget call returns only after creating the network\n interface, but while the mount target state is still creating, you can check\n the mount target creation status by calling the DescribeMountTargets operation, which among other things returns the mount\n target state.

\n
\n

We recommend that you create a mount target in each of the Availability Zones. There\n are cost considerations for using a file system in an Availability Zone through a mount target\n created in another Availability Zone. For more information, see Amazon EFS. In addition, by always using a mount target local to the\n instance's Availability Zone, you eliminate a partial failure scenario. If the\n Availability Zone in which your mount target is created goes down, then you can't access\n your file system through that mount target.

\n

This operation requires permissions for the following action on the file\n system:

\n \n

This operation also requires permissions for the following Amazon EC2\n actions:

\n ", + "smithy.api#examples": [ + { + "title": "To create a new mount target", + "documentation": "This operation creates a new mount target for an EFS file system.", + "input": { + "FileSystemId": "fs-01234567", + "SubnetId": "subnet-1234abcd" + }, + "output": { + "OwnerId": "012345678912", + "MountTargetId": "fsmt-12340abc", + "FileSystemId": "fs-01234567", + "SubnetId": "subnet-1234abcd", + "LifeCycleState": "creating", + "IpAddress": "192.0.0.2", + "NetworkInterfaceId": "eni-cedf6789" + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/2015-02-01/mount-targets", @@ -663,6 +682,21 @@ "message": "Use TagResource." }, "smithy.api#documentation": "\n

DEPRECATED - CreateTags is deprecated and not maintained. To create tags for EFS\n resources, use the API action.

\n
\n

Creates or overwrites tags associated with a file system. Each tag is a key-value pair. If\n a tag key specified in the request already exists on the file system, this operation\n overwrites its value with the value provided in the request. If you add the Name\n tag to your file system, Amazon EFS returns it in the response to the DescribeFileSystems operation.

\n

This operation requires permission for the elasticfilesystem:CreateTags\n action.

", + "smithy.api#examples": [ + { + "title": "To create a new tag", + "documentation": "This operation creates a new tag for an EFS file system.", + "input": { + "FileSystemId": "fs-01234567", + "Tags": [ + { + "Key": "Name", + "Value": "MyFileSystem" + } + ] + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/2015-02-01/create-tags/{FileSystemId}", @@ -801,6 +835,15 @@ ], "traits": { "smithy.api#documentation": "

Deletes a file system, permanently severing access to its contents. Upon return, the\n file system no longer exists and you can't access any contents of the deleted file\n system.

\n

You need to manually delete mount targets attached to a file system before you can delete\n an EFS file system. This step is performed for you when you use the Amazon Web Services console \n to delete a file system.

\n \n

You cannot delete a file system that is part of an EFS Replication configuration. \n You need to delete the replication configuration first.

\n
\n

You can't delete a file system that is in use. That is, if the file system has\n any mount targets, you must first delete them. For more information, see DescribeMountTargets and DeleteMountTarget.

\n \n

The DeleteFileSystem call returns while the file system state is still\n deleting. You can check the file system deletion status by calling the DescribeFileSystems operation, which returns a list of file systems in your\n account. If you pass file system ID or creation token for the deleted file system, the DescribeFileSystems returns a 404 FileSystemNotFound\n error.

\n
\n

This operation requires permissions for the\n elasticfilesystem:DeleteFileSystem action.

", + "smithy.api#examples": [ + { + "title": "To delete a file system", + "documentation": "This operation deletes an EFS file system.", + "input": { + "FileSystemId": "fs-01234567" + } + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/2015-02-01/file-systems/{FileSystemId}", @@ -896,6 +939,15 @@ ], "traits": { "smithy.api#documentation": "

Deletes the specified mount target.

\n

This operation forcibly breaks any mounts of the file system by using the mount target\n that is being deleted, which might disrupt instances or applications using those mounts. To\n avoid applications getting cut off abruptly, you might consider unmounting any mounts of the\n mount target, if feasible. The operation also deletes the associated network interface.\n Uncommitted writes might be lost, but breaking a mount target using this operation does not\n corrupt the file system itself. The file system you created remains. You can mount an EC2\n instance in your VPC by using another mount target.

\n

This operation requires permissions for the following action on the file\n system:

\n \n \n

The DeleteMountTarget call returns while the mount target state is still\n deleting. You can check the mount target deletion by calling the DescribeMountTargets operation, which returns a list of mount target\n descriptions for the given file system.

\n
\n

The operation also requires permissions for the following Amazon EC2 action on the\n mount target's network interface:

\n ", + "smithy.api#examples": [ + { + "title": "To delete a mount target", + "documentation": "This operation deletes a mount target.", + "input": { + "MountTargetId": "fsmt-12340abc" + } + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/2015-02-01/mount-targets/{MountTargetId}", @@ -991,6 +1043,18 @@ "message": "Use UntagResource." }, "smithy.api#documentation": "\n

DEPRECATED - DeleteTags is deprecated and not maintained. To remove tags from EFS\n resources, use the API action.

\n
\n

Deletes the specified tags from a file system. If the DeleteTags request\n includes a tag key that doesn't exist, Amazon EFS ignores it and doesn't cause an\n error. For more information about tags and related restrictions, see Tag restrictions in the\n Billing and Cost Management User Guide.

\n

This operation requires permissions for the elasticfilesystem:DeleteTags\n action.

", + "smithy.api#examples": [ + { + "title": "To delete tags for an EFS file system", + "documentation": "This operation deletes tags for an EFS file system.", + "input": { + "FileSystemId": "fs-01234567", + "TagKeys": [ + "Name" + ] + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/2015-02-01/delete-tags/{FileSystemId}", @@ -1409,6 +1473,22 @@ ], "traits": { "smithy.api#documentation": "

Returns the current LifecycleConfiguration object for the specified Amazon\n EFS file system. EFS lifecycle management uses the LifecycleConfiguration object\n to identify which files to move to the EFS Infrequent Access (IA) storage class. For a file system\n without a LifecycleConfiguration object, the call returns an empty array in the\n response.

\n

When EFS Intelligent-Tiering is enabled, TransitionToPrimaryStorageClass has\n a value of AFTER_1_ACCESS.

\n

This operation requires permissions for the\n elasticfilesystem:DescribeLifecycleConfiguration operation.

", + "smithy.api#examples": [ + { + "title": "To describe the lifecycle configuration for a file system", + "documentation": "This operation describes a file system's LifecycleConfiguration. EFS lifecycle management uses the LifecycleConfiguration object to identify which files to move to the EFS Infrequent Access (IA) storage class. ", + "input": { + "FileSystemId": "fs-01234567" + }, + "output": { + "LifecyclePolicies": [ + { + "TransitionToIA": "AFTER_30_DAYS" + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration", @@ -1456,6 +1536,20 @@ ], "traits": { "smithy.api#documentation": "

Returns the security groups currently in effect for a mount target. This operation\n requires that the network interface of the mount target has been created and the lifecycle\n state of the mount target is not deleted.

\n

This operation requires permissions for the following actions:

\n ", + "smithy.api#examples": [ + { + "title": "To describe the security groups for a mount target", + "documentation": "This operation describes all of the security groups for a file system's mount target.", + "input": { + "MountTargetId": "fsmt-12340abc" + }, + "output": { + "SecurityGroups": [ + "sg-4567abcd" + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/2015-02-01/mount-targets/{MountTargetId}/security-groups", @@ -1522,6 +1616,28 @@ ], "traits": { "smithy.api#documentation": "

Returns the descriptions of all the current mount targets, or a specific mount target,\n for a file system. When requesting all of the current mount targets, the order of mount\n targets returned in the response is unspecified.

\n

This operation requires permissions for the\n elasticfilesystem:DescribeMountTargets action, on either the file system ID\n that you specify in FileSystemId, or on the file system of the mount target that\n you specify in MountTargetId.

", + "smithy.api#examples": [ + { + "title": "To describe the mount targets for a file system", + "documentation": "This operation describes all of a file system's mount targets.", + "input": { + "FileSystemId": "fs-01234567" + }, + "output": { + "MountTargets": [ + { + "MountTargetId": "fsmt-12340abc", + "NetworkInterfaceId": "eni-cedf6789", + "FileSystemId": "fs-01234567", + "LifeCycleState": "available", + "SubnetId": "subnet-1234abcd", + "OwnerId": "012345678912", + "IpAddress": "192.0.0.2" + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/2015-02-01/mount-targets", @@ -1707,6 +1823,23 @@ "message": "Use ListTagsForResource." }, "smithy.api#documentation": "\n

DEPRECATED - The DescribeTags action is deprecated and not maintained. To view\n tags associated with EFS resources, use the ListTagsForResource API\n action.

\n
\n

Returns the tags associated with a file system. The order of tags returned in the\n response of one DescribeTags call and the order of tags returned across the\n responses of a multiple-call iteration (when using pagination) is unspecified.

\n

This operation requires permissions for the\n elasticfilesystem:DescribeTags action.

", + "smithy.api#examples": [ + { + "title": "To describe the tags for a file system", + "documentation": "This operation describes all of a file system's tags.", + "input": { + "FileSystemId": "fs-01234567" + }, + "output": { + "Tags": [ + { + "Key": "Name", + "Value": "MyFileSystem" + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/2015-02-01/tags/{FileSystemId}", @@ -2569,6 +2702,7 @@ "arnNamespace": "elasticfilesystem", "cloudFormationName": "EFS", "cloudTrailEventSource": "efs.amazonaws.com", + "docId": "elasticfilesystem-2015-02-01", "endpointPrefix": "elasticfilesystem" }, "aws.auth#sigv4": { @@ -2637,52 +2771,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2690,13 +2828,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2706,224 +2853,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://elasticfilesystem-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://elasticfilesystem-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elasticfilesystem-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://elasticfilesystem-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elasticfilesystem.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://elasticfilesystem.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://elasticfilesystem.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://elasticfilesystem.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3898,6 +3996,18 @@ ], "traits": { "smithy.api#documentation": "

Modifies the set of security groups in effect for a mount target.

\n

When you create a mount target, Amazon EFS also creates a new network interface. For\n more information, see CreateMountTarget. This operation replaces the security groups in effect for the\n network interface associated with a mount target, with the SecurityGroups\n provided in the request. This operation requires that the network interface of the mount\n target has been created and the lifecycle state of the mount target is not\n deleted.

\n

The operation requires permissions for the following actions:

\n ", + "smithy.api#examples": [ + { + "title": "To modify the security groups associated with a mount target for a file system", + "documentation": "This operation modifies the security groups associated with a mount target for a file system.", + "input": { + "MountTargetId": "fsmt-12340abc", + "SecurityGroups": [ + "sg-abcd1234" + ] + } + } + ], "smithy.api#http": { "method": "PUT", "uri": "/2015-02-01/mount-targets/{MountTargetId}/security-groups", @@ -4420,6 +4530,27 @@ ], "traits": { "smithy.api#documentation": "

Use this action to manage EFS lifecycle management and EFS Intelligent-Tiering. A\n LifecycleConfiguration consists of one or more LifecyclePolicy\n objects that define the following:

\n \n

For more information, see EFS Lifecycle Management.

\n

Each Amazon EFS file system supports one lifecycle configuration, which applies to\n all files in the file system. If a LifecycleConfiguration object already exists\n for the specified file system, a PutLifecycleConfiguration call modifies the\n existing configuration. A PutLifecycleConfiguration call with an empty\n LifecyclePolicies array in the request body deletes any existing\n LifecycleConfiguration and turns off lifecycle management and EFS\n Intelligent-Tiering for the file system.

\n

In the request, specify the following:

\n \n

This operation requires permissions for the elasticfilesystem:PutLifecycleConfiguration operation.

\n

To apply a LifecycleConfiguration object to an encrypted file system, you\n need the same Key Management Service permissions as when you created the encrypted file system.

", + "smithy.api#examples": [ + { + "title": "Creates a new lifecycleconfiguration object for a file system", + "documentation": "This operation enables lifecycle management on a file system by creating a new LifecycleConfiguration object. A LifecycleConfiguration object defines when files in an Amazon EFS file system are automatically transitioned to the lower-cost EFS Infrequent Access (IA) storage class. A LifecycleConfiguration applies to all files in a file system.", + "input": { + "FileSystemId": "fs-01234567", + "LifecyclePolicies": [ + { + "TransitionToIA": "AFTER_30_DAYS" + } + ] + }, + "output": { + "LifecyclePolicies": [ + { + "TransitionToIA": "AFTER_30_DAYS" + } + ] + } + } + ], "smithy.api#http": { "method": "PUT", "uri": "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration", diff --git a/codegen/sdk-codegen/aws-models/eks.json b/codegen/sdk-codegen/aws-models/eks.json index e6afaa5ddf1..eda5db598ad 100644 --- a/codegen/sdk-codegen/aws-models/eks.json +++ b/codegen/sdk-codegen/aws-models/eks.json @@ -290,52 +290,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -343,13 +347,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -359,92 +372,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://eks-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://eks-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -453,180 +457,140 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://fips.eks.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://eks.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://eks-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://fips.eks.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://eks.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://eks.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://eks-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "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://eks.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://eks.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://eks.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2510,6 +2474,28 @@ ], "traits": { "smithy.api#documentation": "

Creates an Amazon EKS control plane.

\n

The Amazon EKS control plane consists of control plane instances that run the\n Kubernetes software, such as etcd and the API server. The control plane\n runs in an account managed by Amazon Web Services, and the Kubernetes API is exposed by\n the Amazon EKS API server endpoint. Each Amazon EKS cluster control\n plane is single tenant and unique. It runs on its own set of Amazon EC2\n instances.

\n

The cluster control plane is provisioned across multiple Availability Zones and\n fronted by an Elastic Load Balancing\n Network Load Balancer. Amazon EKS also provisions elastic network interfaces in\n your VPC subnets to provide connectivity from the control plane instances to the nodes\n (for example, to support kubectl exec, logs, and\n proxy data flows).

\n

Amazon EKS nodes run in your Amazon Web Services account and connect to your\n cluster's control plane over the Kubernetes API server endpoint and a certificate file\n that is created for your cluster.

\n

In most cases, it takes several minutes to create a cluster. After you create an\n Amazon EKS cluster, you must configure your Kubernetes tooling to\n communicate with the API server and launch nodes into your cluster. For more\n information, see Managing Cluster Authentication and Launching\n Amazon EKS nodes in the Amazon EKS User Guide.

", + "smithy.api#examples": [ + { + "title": "To create a new cluster", + "documentation": "The following example creates an Amazon EKS cluster called prod.", + "input": { + "name": "prod", + "version": "1.10", + "roleArn": "arn:aws:iam::012345678910:role/eks-service-role-AWSServiceRoleForAmazonEKS-J7ONKE3BQ4PI", + "resourcesVpcConfig": { + "subnetIds": [ + "subnet-6782e71e", + "subnet-e7e761ac" + ], + "securityGroupIds": [ + "sg-6979fe18" + ] + }, + "clientRequestToken": "1d2129a1-3d38-460a-9756-e5b91fddb951" + }, + "output": {} + } + ], "smithy.api#http": { "method": "POST", "uri": "/clusters", @@ -2989,6 +2975,16 @@ ], "traits": { "smithy.api#documentation": "

Deletes the Amazon EKS cluster control plane.

\n

If you have active services in your cluster that are associated with a load balancer,\n you must delete those services before deleting the cluster so that the load balancers\n are deleted properly. Otherwise, you can have orphaned resources in your VPC that\n prevent you from being able to delete the VPC. For more information, see Deleting a\n Cluster in the Amazon EKS User Guide.

\n

If you have managed node groups or Fargate profiles attached to the\n cluster, you must delete them first. For more information, see DeleteNodegroup and DeleteFargateProfile.

", + "smithy.api#examples": [ + { + "title": "To delete a cluster", + "documentation": "This example command deletes a cluster named `devel` in your default region.", + "input": { + "name": "devel" + }, + "output": {} + } + ], "smithy.api#http": { "method": "DELETE", "uri": "/clusters/{name}", @@ -3583,6 +3579,39 @@ ], "traits": { "smithy.api#documentation": "

Returns descriptive information about an Amazon EKS cluster.

\n

The API server endpoint and certificate authority data returned by this operation are\n required for kubelet and kubectl to communicate with your\n Kubernetes API server. For more information, see Create a\n kubeconfig for Amazon EKS.

\n \n

The API server endpoint and certificate authority data aren't available until the\n cluster reaches the ACTIVE state.

\n
", + "smithy.api#examples": [ + { + "title": "To describe a cluster", + "documentation": "This example command provides a description of the specified cluster in your default region.", + "input": { + "name": "devel" + }, + "output": { + "cluster": { + "name": "devel", + "arn": "arn:aws:eks:us-west-2:012345678910:cluster/devel", + "createdAt": 1.527807879988E9, + "version": "1.10", + "endpoint": "https://A0DCCD80A04F01705DD065655C30CC3D.yl4.us-west-2.eks.amazonaws.com", + "roleArn": "arn:aws:iam::012345678910:role/eks-service-role-AWSServiceRoleForAmazonEKS-J7ONKE3BQ4PI", + "resourcesVpcConfig": { + "subnetIds": [ + "subnet-6782e71e", + "subnet-e7e761ac" + ], + "securityGroupIds": [ + "sg-6979fe18" + ], + "vpcId": "vpc-950809ec" + }, + "status": "ACTIVE", + "certificateAuthority": { + "data": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFNE1EVXpNVEl6TVRFek1Wb1hEVEk0TURVeU9ESXpNVEV6TVZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTTZWCjVUaG4rdFcySm9Xa2hQMzRlVUZMNitaRXJOZGIvWVdrTmtDdWNGS2RaaXl2TjlMVmdvUmV2MjlFVFZlN1ZGbSsKUTJ3ZURyRXJiQyt0dVlibkFuN1ZLYmE3ay9hb1BHekZMdmVnb0t6b0M1N2NUdGVwZzRIazRlK2tIWHNaME10MApyb3NzcjhFM1ROeExETnNJTThGL1cwdjhsTGNCbWRPcjQyV2VuTjFHZXJnaDNSZ2wzR3JIazBnNTU0SjFWenJZCm9hTi8zODFUczlOTFF2QTBXb0xIcjBFRlZpTFdSZEoyZ3lXaC9ybDVyOFNDOHZaQXg1YW1BU0hVd01aTFpWRC8KTDBpOW4wRVM0MkpVdzQyQmxHOEdpd3NhTkJWV3lUTHZKclNhRXlDSHFtVVZaUTFDZkFXUjl0L3JleVVOVXM3TApWV1FqM3BFbk9RMitMSWJrc0RzQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFNZ3RsQ1dIQ2U2YzVHMXl2YlFTS0Q4K2hUalkKSm1NSG56L2EvRGt0WG9YUjFVQzIrZUgzT1BZWmVjRVZZZHVaSlZCckNNQ2VWR0ZkeWdBYlNLc1FxWDg0S2RXbAp1MU5QaERDSmEyRHliN2pVMUV6VThTQjFGZUZ5ZFE3a0hNS1E1blpBRVFQOTY4S01hSGUrSm0yQ2x1UFJWbEJVCjF4WlhTS1gzTVZ0K1Q0SU1EV2d6c3JRSjVuQkRjdEtLcUZtM3pKdVVubHo5ZEpVckdscEltMjVJWXJDckxYUFgKWkUwRUtRNWEzMHhkVWNrTHRGQkQrOEtBdFdqSS9yZUZPNzM1YnBMdVoyOTBaNm42QlF3elRrS0p4cnhVc3QvOAppNGsxcnlsaUdWMm5SSjBUYjNORkczNHgrYWdzYTRoSTFPbU90TFM0TmgvRXJxT3lIUXNDc2hEQUtKUT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=" + } + } + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/clusters/{name}", @@ -4847,6 +4876,18 @@ ], "traits": { "smithy.api#documentation": "

Lists the Amazon EKS clusters in your Amazon Web Services account in the\n specified Region.

", + "smithy.api#examples": [ + { + "title": "To list your available clusters", + "documentation": "This example command lists all of your available clusters in your default region.", + "output": { + "clusters": [ + "devel", + "prod" + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/clusters", @@ -5221,6 +5262,20 @@ ], "traits": { "smithy.api#documentation": "

List the tags for an Amazon EKS resource.

", + "smithy.api#examples": [ + { + "title": "To list tags for a cluster", + "documentation": "This example lists all of the tags for the `beta` cluster.", + "input": { + "resourceArn": "arn:aws:eks:us-west-2:012345678910:cluster/beta" + }, + "output": { + "tags": { + "aws:tag:domain": "beta" + } + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/tags/{resourceArn}", diff --git a/codegen/sdk-codegen/aws-models/elastic-beanstalk.json b/codegen/sdk-codegen/aws-models/elastic-beanstalk.json index 493fba60ef7..b742fd91e62 100644 --- a/codegen/sdk-codegen/aws-models/elastic-beanstalk.json +++ b/codegen/sdk-codegen/aws-models/elastic-beanstalk.json @@ -184,6 +184,7 @@ "arnNamespace": "elasticbeanstalk", "cloudFormationName": "ElasticBeanstalk", "cloudTrailEventSource": "elasticbeanstalk.amazonaws.com", + "docId": "elasticbeanstalk-2010-12-01", "endpointPrefix": "elasticbeanstalk" }, "aws.auth#sigv4": { @@ -255,52 +256,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -308,13 +313,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -324,175 +338,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elasticbeanstalk-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://elasticbeanstalk.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://elasticbeanstalk-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://elasticbeanstalk-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -501,110 +423,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elasticbeanstalk.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://elasticbeanstalk.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://elasticbeanstalk-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://elasticbeanstalk.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-gov-west-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://elasticbeanstalk.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://elasticbeanstalk.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://elasticbeanstalk.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://elasticbeanstalk.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -619,8 +546,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -632,8 +559,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -645,8 +572,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -658,8 +585,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -671,8 +598,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -684,8 +611,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -697,8 +624,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -710,8 +637,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -723,8 +650,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -736,8 +663,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -749,8 +676,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -762,8 +689,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -775,8 +702,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -788,8 +715,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -801,8 +728,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -814,8 +741,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -827,8 +754,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -840,8 +767,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -853,8 +780,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -866,8 +793,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -879,8 +806,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -892,8 +819,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -905,8 +832,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -918,8 +845,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -931,8 +858,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -944,8 +871,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -957,8 +884,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -970,8 +897,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -983,8 +910,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -996,8 +923,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1009,8 +936,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1022,8 +949,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1035,8 +962,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1048,8 +975,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1061,8 +988,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1074,8 +1001,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1087,8 +1014,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1100,8 +1027,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1113,8 +1040,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1126,34 +1064,67 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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://elasticbeanstalk.us-iso-east-1.c2s.ic.gov" + "url": "https://elasticbeanstalk.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://elasticbeanstalk-fips.us-isob-east-1.sc2s.sgov.gov" } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://elasticbeanstalk-fips.us-isob-east-1.sc2s.sgov.gov" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1165,8 +1136,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1178,8 +1149,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1191,8 +1162,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1203,8 +1174,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1215,10 +1186,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1239,7 +1216,16 @@ } ], "traits": { - "smithy.api#documentation": "

Cancels in-progress environment configuration update or application version\n deployment.

" + "smithy.api#documentation": "

Cancels in-progress environment configuration update or application version\n deployment.

", + "smithy.api#examples": [ + { + "title": "To abort a deployment", + "documentation": "The following code aborts a running application version deployment for an environment named my-env:", + "input": { + "EnvironmentName": "my-env" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#AbortEnvironmentUpdateMessage": { @@ -1259,7 +1245,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#AbortableOperationInProgress": { @@ -1430,7 +1417,8 @@ } }, "traits": { - "smithy.api#documentation": "

Result message containing a list of application descriptions.

" + "smithy.api#documentation": "

Result message containing a list of application descriptions.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#ApplicationMetrics": { @@ -1516,6 +1504,9 @@ "smithy.api#documentation": "

The lifecycle configuration.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#ApplicationVersionArn": { @@ -1626,7 +1617,8 @@ } }, "traits": { - "smithy.api#documentation": "

Result message wrapping a list of application version descriptions.

" + "smithy.api#documentation": "

Result message wrapping a list of application version descriptions.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#ApplicationVersionLifecycleConfig": { @@ -1764,7 +1756,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result message containing information about the managed action.

" + "smithy.api#documentation": "

The result message containing information about the managed action.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#AssociateEnvironmentOperationsRole": { @@ -1803,7 +1796,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to add or change the operations role used by an environment.

" + "smithy.api#documentation": "

Request to add or change the operations role used by an environment.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#AutoCreateApplication": { @@ -1990,7 +1984,20 @@ "target": "com.amazonaws.elasticbeanstalk#CheckDNSAvailabilityResultMessage" }, "traits": { - "smithy.api#documentation": "

Checks if the specified CNAME is available.

" + "smithy.api#documentation": "

Checks if the specified CNAME is available.

", + "smithy.api#examples": [ + { + "title": "To check the availability of a CNAME", + "documentation": "The following operation checks the availability of the subdomain my-cname:", + "input": { + "CNAMEPrefix": "my-cname" + }, + "output": { + "Available": true, + "FullyQualifiedCNAME": "my-cname.us-west-2.elasticbeanstalk.com" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#CheckDNSAvailabilityMessage": { @@ -2005,7 +2012,8 @@ } }, "traits": { - "smithy.api#documentation": "

Results message indicating whether a CNAME is available.

" + "smithy.api#documentation": "

Results message indicating whether a CNAME is available.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#CheckDNSAvailabilityResultMessage": { @@ -2025,7 +2033,8 @@ } }, "traits": { - "smithy.api#documentation": "

Indicates if the specified CNAME is available.

" + "smithy.api#documentation": "

Indicates if the specified CNAME is available.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#CnameAvailability": { @@ -2094,7 +2103,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to create or update a group of environments.

" + "smithy.api#documentation": "

Request to create or update a group of environments.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#ComputeType": { @@ -2456,7 +2466,26 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an application that has one configuration template named default\n and no application versions.

" + "smithy.api#documentation": "

Creates an application that has one configuration template named default\n and no application versions.

", + "smithy.api#examples": [ + { + "title": "To create a new application", + "documentation": "The following operation creates a new application named my-app:", + "input": { + "ApplicationName": "my-app", + "Description": "my application" + }, + "output": { + "Application": { + "ApplicationName": "my-app", + "ConfigurationTemplates": [], + "DateUpdated": "2015-02-12T18:32:21.181Z", + "Description": "my application", + "DateCreated": "2015-02-12T18:32:21.181Z" + } + } + } + ] } }, "com.amazonaws.elasticbeanstalk#CreateApplicationMessage": { @@ -2489,7 +2518,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to create an application.

" + "smithy.api#documentation": "

Request to create an application.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#CreateApplicationVersion": { @@ -2518,7 +2548,37 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an application version for the specified application. You can create an\n application version from a source bundle in Amazon S3, a commit in AWS CodeCommit, or the\n output of an AWS CodeBuild build as follows:

\n

Specify a commit in an AWS CodeCommit repository with\n SourceBuildInformation.

\n

Specify a build in an AWS CodeBuild with SourceBuildInformation and\n BuildConfiguration.

\n

Specify a source bundle in S3 with SourceBundle\n

\n

Omit both SourceBuildInformation and SourceBundle to use the\n default sample application.

\n \n

After you create an application version with a specified Amazon S3 bucket and key\n location, you can't change that Amazon S3 location. If you change the Amazon S3 location,\n you receive an exception when you attempt to launch an environment from the application\n version.

\n
" + "smithy.api#documentation": "

Creates an application version for the specified application. You can create an\n application version from a source bundle in Amazon S3, a commit in AWS CodeCommit, or the\n output of an AWS CodeBuild build as follows:

\n

Specify a commit in an AWS CodeCommit repository with\n SourceBuildInformation.

\n

Specify a build in an AWS CodeBuild with SourceBuildInformation and\n BuildConfiguration.

\n

Specify a source bundle in S3 with SourceBundle\n

\n

Omit both SourceBuildInformation and SourceBundle to use the\n default sample application.

\n \n

After you create an application version with a specified Amazon S3 bucket and key\n location, you can't change that Amazon S3 location. If you change the Amazon S3 location,\n you receive an exception when you attempt to launch an environment from the application\n version.

\n
", + "smithy.api#examples": [ + { + "title": "To create a new application", + "documentation": "The following operation creates a new version (v1) of an application named my-app:", + "input": { + "ApplicationName": "my-app", + "VersionLabel": "v1", + "Description": "my-app-v1", + "SourceBundle": { + "S3Bucket": "my-bucket", + "S3Key": "sample.war" + }, + "AutoCreateApplication": true, + "Process": true + }, + "output": { + "ApplicationVersion": { + "ApplicationName": "my-app", + "VersionLabel": "v1", + "Description": "my-app-v1", + "DateCreated": "2015-02-03T23:01:25.412Z", + "DateUpdated": "2015-02-03T23:01:25.412Z", + "SourceBundle": { + "S3Bucket": "my-bucket", + "S3Key": "sample.war" + } + } + } + } + ] } }, "com.amazonaws.elasticbeanstalk#CreateApplicationVersionMessage": { @@ -2582,7 +2642,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#CreateConfigurationTemplate": { @@ -2605,7 +2666,25 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an AWS Elastic Beanstalk configuration template, associated with a specific Elastic Beanstalk\n application. You define application configuration settings in a configuration template. You\n can then use the configuration template to deploy different versions of the application with\n the same configuration settings.

\n

Templates aren't associated with any environment. The EnvironmentName\n response element is always null.

\n

Related Topics

\n " + "smithy.api#documentation": "

Creates an AWS Elastic Beanstalk configuration template, associated with a specific Elastic Beanstalk\n application. You define application configuration settings in a configuration template. You\n can then use the configuration template to deploy different versions of the application with\n the same configuration settings.

\n

Templates aren't associated with any environment. The EnvironmentName\n response element is always null.

\n

Related Topics

\n ", + "smithy.api#examples": [ + { + "title": "To create a configuration template", + "documentation": "The following operation creates a configuration template named my-app-v1 from the settings applied to an environment with the id e-rpqsewtp2j:", + "input": { + "ApplicationName": "my-app", + "TemplateName": "my-app-v1", + "EnvironmentId": "e-rpqsewtp2j" + }, + "output": { + "ApplicationName": "my-app", + "TemplateName": "my-app-v1", + "DateCreated": "2015-08-12T18:40:39Z", + "DateUpdated": "2015-08-12T18:40:39Z", + "SolutionStackName": "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#CreateConfigurationTemplateMessage": { @@ -2669,7 +2748,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to create a configuration template.

" + "smithy.api#documentation": "

Request to create a configuration template.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#CreateEnvironment": { @@ -2689,7 +2769,37 @@ } ], "traits": { - "smithy.api#documentation": "

Launches an AWS Elastic Beanstalk environment for the specified application using the specified\n configuration.

" + "smithy.api#documentation": "

Launches an AWS Elastic Beanstalk environment for the specified application using the specified\n configuration.

", + "smithy.api#examples": [ + { + "title": "To create a new environment for an application", + "documentation": "The following operation creates a new environment for version v1 of a java application named my-app:", + "input": { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "CNAMEPrefix": "my-app", + "VersionLabel": "v1", + "SolutionStackName": "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8" + }, + "output": { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "VersionLabel": "v1", + "Status": "Launching", + "EnvironmentId": "e-izqpassy4h", + "SolutionStackName": "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8", + "CNAME": "my-app.elasticbeanstalk.com", + "Health": "Grey", + "Tier": { + "Type": "Standard", + "Name": "WebServer", + "Version": " " + }, + "DateUpdated": "2015-02-03T23:04:54.479Z", + "DateCreated": "2015-02-03T23:04:54.479Z" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#CreateEnvironmentMessage": { @@ -2782,7 +2892,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#CreatePlatformVersion": { @@ -2871,6 +2982,9 @@ "smithy.api#documentation": "

The builder used to create the custom platform.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#CreateStorageLocation": { @@ -2893,7 +3007,16 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a bucket in Amazon S3 to store application versions, logs, and other files used\n by Elastic Beanstalk environments. The Elastic Beanstalk console and EB CLI call this API the\n first time you create an environment in a region. If the storage location already exists,\n CreateStorageLocation still returns the bucket name but does not create a new\n bucket.

" + "smithy.api#documentation": "

Creates a bucket in Amazon S3 to store application versions, logs, and other files used\n by Elastic Beanstalk environments. The Elastic Beanstalk console and EB CLI call this API the\n first time you create an environment in a region. If the storage location already exists,\n CreateStorageLocation still returns the bucket name but does not create a new\n bucket.

", + "smithy.api#examples": [ + { + "title": "To create a new environment for an application", + "documentation": "The following operation creates a new environment for version v1 of a java application named my-app:", + "output": { + "S3Bucket": "elasticbeanstalk-us-west-2-0123456789012" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#CreateStorageLocationResultMessage": { @@ -2907,7 +3030,8 @@ } }, "traits": { - "smithy.api#documentation": "

Results of a CreateStorageLocationResult call.

" + "smithy.api#documentation": "

Results of a CreateStorageLocationResult call.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#CreationDate": { @@ -2971,7 +3095,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified application along with all associated versions and\n configurations. The application versions will not be deleted from your Amazon S3\n bucket.

\n \n

You cannot delete an application that has a running environment.

\n
" + "smithy.api#documentation": "

Deletes the specified application along with all associated versions and\n configurations. The application versions will not be deleted from your Amazon S3\n bucket.

\n \n

You cannot delete an application that has a running environment.

\n
", + "smithy.api#examples": [ + { + "title": "To delete an application", + "documentation": "The following operation deletes an application named my-app:", + "input": { + "ApplicationName": "my-app" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DeleteApplicationMessage": { @@ -2992,7 +3125,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to delete an application.

" + "smithy.api#documentation": "

Request to delete an application.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DeleteApplicationVersion": { @@ -3018,7 +3152,18 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified version from the specified application.

\n \n

You cannot delete an application version that is associated with a running\n environment.

\n
" + "smithy.api#documentation": "

Deletes the specified version from the specified application.

\n \n

You cannot delete an application version that is associated with a running\n environment.

\n
", + "smithy.api#examples": [ + { + "title": "To delete an application version", + "documentation": "The following operation deletes an application version named 22a0-stage-150819_182129 for an application named my-app:", + "input": { + "ApplicationName": "my-app", + "VersionLabel": "22a0-stage-150819_182129", + "DeleteSourceBundle": true + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DeleteApplicationVersionMessage": { @@ -3046,7 +3191,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to delete an application version.

" + "smithy.api#documentation": "

Request to delete an application version.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DeleteConfigurationTemplate": { @@ -3063,7 +3209,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified configuration template.

\n \n

When you launch an environment using a configuration template, the environment gets a\n copy of the template. You can delete or modify the environment's copy of the template\n without affecting the running environment.

\n
" + "smithy.api#documentation": "

Deletes the specified configuration template.

\n \n

When you launch an environment using a configuration template, the environment gets a\n copy of the template. You can delete or modify the environment's copy of the template\n without affecting the running environment.

\n
", + "smithy.api#examples": [ + { + "title": "To delete a configuration template", + "documentation": "The following operation deletes a configuration template named my-template for an application named my-app:", + "input": { + "ApplicationName": "my-app", + "TemplateName": "my-template" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DeleteConfigurationTemplateMessage": { @@ -3085,7 +3241,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to delete a configuration template.

" + "smithy.api#documentation": "

Request to delete a configuration template.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DeleteEnvironmentConfiguration": { @@ -3097,7 +3254,17 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Deletes the draft configuration associated with the running environment.

\n

Updating a running environment with any configuration changes creates a draft\n configuration set. You can get the draft configuration using DescribeConfigurationSettings while the update is in progress or if the update\n fails. The DeploymentStatus for the draft configuration indicates whether the\n deployment is in process or has failed. The draft configuration remains in existence until it\n is deleted with this action.

" + "smithy.api#documentation": "

Deletes the draft configuration associated with the running environment.

\n

Updating a running environment with any configuration changes creates a draft\n configuration set. You can get the draft configuration using DescribeConfigurationSettings while the update is in progress or if the update\n fails. The DeploymentStatus for the draft configuration indicates whether the\n deployment is in process or has failed. The draft configuration remains in existence until it\n is deleted with this action.

", + "smithy.api#examples": [ + { + "title": "To delete a draft configuration", + "documentation": "The following operation deletes a draft configuration for an environment named my-env:", + "input": { + "ApplicationName": "my-app", + "EnvironmentName": "my-env" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DeleteEnvironmentConfigurationMessage": { @@ -3119,7 +3286,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to delete a draft environment configuration.

" + "smithy.api#documentation": "

Request to delete a draft environment configuration.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DeletePlatformVersion": { @@ -3171,6 +3339,9 @@ "smithy.api#documentation": "

Detailed information about the version of the custom platform.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#DeleteSourceBundle": { @@ -3237,6 +3408,9 @@ "smithy.api#documentation": "

The Elastic Beanstalk resource quotas associated with the calling AWS account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#DescribeApplicationVersions": { @@ -3248,7 +3422,45 @@ "target": "com.amazonaws.elasticbeanstalk#ApplicationVersionDescriptionsMessage" }, "traits": { - "smithy.api#documentation": "

Retrieve a list of application versions.

" + "smithy.api#documentation": "

Retrieve a list of application versions.

", + "smithy.api#examples": [ + { + "title": "To view information about an application version", + "documentation": "The following operation retrieves information about an application version labeled v2:", + "input": { + "ApplicationName": "my-app", + "VersionLabels": [ + "v2" + ] + }, + "output": { + "ApplicationVersions": [ + { + "ApplicationName": "my-app", + "VersionLabel": "v2", + "Description": "update cover page", + "DateCreated": "2015-07-23T01:32:26.079Z", + "DateUpdated": "2015-07-23T01:32:26.079Z", + "SourceBundle": { + "S3Bucket": "elasticbeanstalk-us-west-2-015321684451", + "S3Key": "my-app/5026-stage-150723_224258.war" + } + }, + { + "ApplicationName": "my-app", + "VersionLabel": "v1", + "Description": "initial version", + "DateCreated": "2015-07-23T22:26:10.816Z", + "DateUpdated": "2015-07-23T22:26:10.816Z", + "SourceBundle": { + "S3Bucket": "elasticbeanstalk-us-west-2-015321684451", + "S3Key": "my-app/5026-stage-150723_222618.war" + } + } + ] + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DescribeApplicationVersionsMessage": { @@ -3280,7 +3492,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to describe application versions.

" + "smithy.api#documentation": "

Request to describe application versions.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DescribeApplications": { @@ -3292,7 +3505,46 @@ "target": "com.amazonaws.elasticbeanstalk#ApplicationDescriptionsMessage" }, "traits": { - "smithy.api#documentation": "

Returns the descriptions of existing applications.

" + "smithy.api#documentation": "

Returns the descriptions of existing applications.

", + "smithy.api#examples": [ + { + "title": "To view a list of applications", + "documentation": "The following operation retrieves information about applications in the current region:", + "output": { + "Applications": [ + { + "ApplicationName": "ruby", + "ConfigurationTemplates": [], + "DateUpdated": "2015-08-13T21:05:44.376Z", + "Versions": [ + "Sample Application" + ], + "DateCreated": "2015-08-13T21:05:44.376Z" + }, + { + "ApplicationName": "pythonsample", + "Description": "Application created from the EB CLI using \"eb init\"", + "Versions": [ + "Sample Application" + ], + "DateCreated": "2015-08-13T19:05:43.637Z", + "ConfigurationTemplates": [], + "DateUpdated": "2015-08-13T19:05:43.637Z" + }, + { + "ApplicationName": "nodejs-example", + "ConfigurationTemplates": [], + "DateUpdated": "2015-08-06T17:50:02.486Z", + "Versions": [ + "add elasticache", + "First Release" + ], + "DateCreated": "2015-08-06T17:50:02.486Z" + } + ] + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DescribeApplicationsMessage": { @@ -3306,7 +3558,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to describe one or more applications.

" + "smithy.api#documentation": "

Request to describe one or more applications.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DescribeConfigurationOptions": { @@ -3323,7 +3576,40 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the configuration options that are used in a particular configuration\n template or environment, or that a specified solution stack defines. The description includes\n the values the options, their default values, and an indication of the required action on a\n running environment if an option value is changed.

" + "smithy.api#documentation": "

Describes the configuration options that are used in a particular configuration\n template or environment, or that a specified solution stack defines. The description includes\n the values the options, their default values, and an indication of the required action on a\n running environment if an option value is changed.

", + "smithy.api#examples": [ + { + "title": "To view configuration options for an environment", + "documentation": "The following operation retrieves descriptions of all available configuration options for an environment named my-env:", + "input": { + "ApplicationName": "my-app", + "EnvironmentName": "my-env" + }, + "output": { + "Options": [ + { + "Name": "Interval", + "UserDefined": false, + "DefaultValue": "30", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:elb:healthcheck", + "MaxValue": 300, + "MinValue": 5, + "ValueType": "Scalar" + }, + { + "Name": "LowerThreshold", + "UserDefined": false, + "DefaultValue": "2000000", + "ChangeSeverity": "NoInterruption", + "Namespace": "aws:autoscaling:trigger", + "MinValue": 0, + "ValueType": "Scalar" + } + ] + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DescribeConfigurationOptionsMessage": { @@ -3367,7 +3653,8 @@ } }, "traits": { - "smithy.api#documentation": "

Result message containing a list of application version descriptions.

" + "smithy.api#documentation": "

Result message containing a list of application version descriptions.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DescribeConfigurationSettings": { @@ -3384,7 +3671,56 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a description of the settings for the specified configuration set, that is,\n either a configuration template or the configuration set associated with a running\n environment.

\n

When describing the settings for the configuration set associated with a running\n environment, it is possible to receive two sets of setting descriptions. One is the deployed\n configuration set, and the other is a draft configuration of an environment that is either in\n the process of deployment or that failed to deploy.

\n

Related Topics

\n " + "smithy.api#documentation": "

Returns a description of the settings for the specified configuration set, that is,\n either a configuration template or the configuration set associated with a running\n environment.

\n

When describing the settings for the configuration set associated with a running\n environment, it is possible to receive two sets of setting descriptions. One is the deployed\n configuration set, and the other is a draft configuration of an environment that is either in\n the process of deployment or that failed to deploy.

\n

Related Topics

\n ", + "smithy.api#examples": [ + { + "title": "To view configurations settings for an environment", + "documentation": "The following operation retrieves configuration settings for an environment named my-env:", + "input": { + "ApplicationName": "my-app", + "EnvironmentName": "my-env" + }, + "output": { + "ConfigurationSettings": [ + { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "Description": "Environment created from the EB CLI using \"eb create\"", + "DeploymentStatus": "deployed", + "DateCreated": "2015-08-13T19:16:25Z", + "OptionSettings": [ + { + "OptionName": "Availability Zones", + "ResourceName": "AWSEBAutoScalingGroup", + "Namespace": "aws:autoscaling:asg", + "Value": "Any" + }, + { + "OptionName": "Cooldown", + "ResourceName": "AWSEBAutoScalingGroup", + "Namespace": "aws:autoscaling:asg", + "Value": "360" + }, + { + "OptionName": "ConnectionDrainingTimeout", + "ResourceName": "AWSEBLoadBalancer", + "Namespace": "aws:elb:policies", + "Value": "20" + }, + { + "OptionName": "ConnectionSettingIdleTimeout", + "ResourceName": "AWSEBLoadBalancer", + "Namespace": "aws:elb:policies", + "Value": "60" + } + ], + "DateUpdated": "2015-08-13T23:30:07Z", + "SolutionStackName": "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8" + } + ] + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DescribeConfigurationSettingsMessage": { @@ -3411,7 +3747,8 @@ } }, "traits": { - "smithy.api#documentation": "

Result message containing all of the configuration settings for a specified solution\n stack or configuration template.

" + "smithy.api#documentation": "

Result message containing all of the configuration settings for a specified solution\n stack or configuration template.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DescribeEnvironmentHealth": { @@ -3431,7 +3768,56 @@ } ], "traits": { - "smithy.api#documentation": "

Returns information about the overall health of the specified environment. The\n DescribeEnvironmentHealth operation is only available with\n AWS Elastic Beanstalk Enhanced Health.

" + "smithy.api#documentation": "

Returns information about the overall health of the specified environment. The\n DescribeEnvironmentHealth operation is only available with\n AWS Elastic Beanstalk Enhanced Health.

", + "smithy.api#examples": [ + { + "title": "To view environment health", + "documentation": "The following operation retrieves overall health information for an environment named my-env:", + "input": { + "EnvironmentName": "my-env", + "AttributeNames": [ + "All" + ] + }, + "output": { + "EnvironmentName": "my-env", + "Color": "Green", + "ApplicationMetrics": { + "Duration": 10, + "Latency": { + "P99": 0.004, + "P75": 0.002, + "P90": 0.003, + "P95": 0.004, + "P85": 0.003, + "P10": 0.001, + "P999": 0.004, + "P50": 0.001 + }, + "RequestCount": 45, + "StatusCodes": { + "Status3xx": 0, + "Status2xx": 45, + "Status5xx": 0, + "Status4xx": 0 + } + }, + "RefreshedAt": "2015-08-20T21:09:18Z", + "HealthStatus": "Ok", + "InstancesHealth": { + "Info": 0, + "Ok": 1, + "Unknown": 0, + "Severe": 0, + "Warning": 0, + "Degraded": 0, + "NoData": 0, + "Pending": 0 + }, + "Causes": [] + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DescribeEnvironmentHealthRequest": { @@ -3514,7 +3900,8 @@ } }, "traits": { - "smithy.api#documentation": "

Health details for an AWS Elastic Beanstalk environment.

" + "smithy.api#documentation": "

Health details for an AWS Elastic Beanstalk environment.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#DescribeEnvironmentManagedActionHistory": { @@ -3590,7 +3977,8 @@ } }, "traits": { - "smithy.api#documentation": "

A result message containing a list of completed and failed managed actions.

" + "smithy.api#documentation": "

A result message containing a list of completed and failed managed actions.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#DescribeEnvironmentManagedActions": { @@ -3648,7 +4036,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result message containing a list of managed actions.

" + "smithy.api#documentation": "

The result message containing a list of managed actions.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#DescribeEnvironmentResources": { @@ -3665,7 +4054,43 @@ } ], "traits": { - "smithy.api#documentation": "

Returns AWS resources for this environment.

" + "smithy.api#documentation": "

Returns AWS resources for this environment.

", + "smithy.api#examples": [ + { + "title": "To view information about the AWS resources in your environment", + "documentation": "The following operation retrieves information about resources in an environment named my-env:", + "input": { + "EnvironmentName": "my-env" + }, + "output": { + "EnvironmentResources": { + "EnvironmentName": "my-env", + "AutoScalingGroups": [ + { + "Name": "awseb-e-qu3fyyjyjs-stack-AWSEBAutoScalingGroup-QSB2ZO88SXZT" + } + ], + "Triggers": [], + "LoadBalancers": [ + { + "Name": "awseb-e-q-AWSEBLoa-1EEPZ0K98BIF0" + } + ], + "Queues": [], + "Instances": [ + { + "Id": "i-0c91c786" + } + ], + "LaunchConfigurations": [ + { + "Name": "awseb-e-qu3fyyjyjs-stack-AWSEBAutoScalingLaunchConfiguration-1UUVQIBC96TQ2" + } + ] + } + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DescribeEnvironmentResourcesMessage": { @@ -3685,7 +4110,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to describe the resources in an environment.

" + "smithy.api#documentation": "

Request to describe the resources in an environment.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DescribeEnvironments": { @@ -3698,6 +4124,40 @@ }, "traits": { "smithy.api#documentation": "

Returns descriptions for existing environments.

", + "smithy.api#examples": [ + { + "title": "To view information about an environment", + "documentation": "The following operation retrieves information about an environment named my-env:", + "input": { + "EnvironmentNames": [ + "my-env" + ] + }, + "output": { + "Environments": [ + { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "VersionLabel": "7f58-stage-150812_025409", + "Status": "Ready", + "EnvironmentId": "e-rpqsewtp2j", + "EndpointURL": "awseb-e-w-AWSEBLoa-1483140XB0Q4L-109QXY8121.us-west-2.elb.amazonaws.com", + "SolutionStackName": "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8", + "CNAME": "my-env.elasticbeanstalk.com", + "Health": "Green", + "AbortableOperationInProgress": false, + "Tier": { + "Version": " ", + "Type": "Standard", + "Name": "WebServer" + }, + "DateUpdated": "2015-08-12T18:16:55.019Z", + "DateCreated": "2015-08-07T20:48:49.599Z" + } + ] + } + } + ], "smithy.waiters#waitable": { "EnvironmentExists": { "acceptors": [ @@ -3830,7 +4290,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to describe one or more environments.

" + "smithy.api#documentation": "

Request to describe one or more environments.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DescribeEvents": { @@ -3843,6 +4304,50 @@ }, "traits": { "smithy.api#documentation": "

Returns list of event descriptions matching criteria up to the last 6 weeks.

\n \n

This action returns the most recent 1,000 events from the specified\n NextToken.

\n
", + "smithy.api#examples": [ + { + "title": "To view events for an environment", + "documentation": "The following operation retrieves events for an environment named my-env:", + "input": { + "EnvironmentName": "my-env" + }, + "output": { + "Events": [ + { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "Message": "Environment health has transitioned from Info to Ok.", + "EventDate": "2015-08-20T07:06:53.535Z", + "Severity": "INFO" + }, + { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "Severity": "INFO", + "RequestId": "b7f3960b-4709-11e5-ba1e-07e16200da41", + "Message": "Environment update completed successfully.", + "EventDate": "2015-08-20T07:06:02.049Z" + }, + { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "Severity": "INFO", + "RequestId": "ca8dfbf6-41ef-11e5-988b-651aa638f46b", + "Message": "Using elasticbeanstalk-us-west-2-012445113685 as Amazon S3 storage bucket for environment data.", + "EventDate": "2015-08-13T19:16:27.561Z" + }, + { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "Severity": "INFO", + "RequestId": "cdfba8f6-41ef-11e5-988b-65638f41aa6b", + "Message": "createEnvironment is starting.", + "EventDate": "2015-08-13T19:16:26.581Z" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -3928,7 +4433,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to retrieve a list of events for an environment.

" + "smithy.api#documentation": "

Request to retrieve a list of events for an environment.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#DescribeInstancesHealth": { @@ -3948,7 +4454,67 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves detailed information about the health of instances in your AWS Elastic\n Beanstalk. This operation requires enhanced health\n reporting.

" + "smithy.api#documentation": "

Retrieves detailed information about the health of instances in your AWS Elastic\n Beanstalk. This operation requires enhanced health\n reporting.

", + "smithy.api#examples": [ + { + "title": "To view environment health", + "documentation": "The following operation retrieves health information for instances in an environment named my-env:", + "input": { + "EnvironmentName": "my-env", + "AttributeNames": [ + "All" + ] + }, + "output": { + "InstanceHealthList": [ + { + "InstanceId": "i-08691cc7", + "ApplicationMetrics": { + "Duration": 10, + "Latency": { + "P99": 0.006, + "P75": 0.002, + "P90": 0.004, + "P95": 0.005, + "P85": 0.003, + "P10": 0, + "P999": 0.006, + "P50": 0.001 + }, + "RequestCount": 48, + "StatusCodes": { + "Status3xx": 0, + "Status2xx": 47, + "Status5xx": 0, + "Status4xx": 1 + } + }, + "System": { + "LoadAverage": [ + 0, + 0.02, + 0.05 + ], + "CPUUtilization": { + "SoftIRQ": 0.1, + "IOWait": 0.2, + "System": 0.3, + "Idle": 97.8, + "User": 1.5, + "IRQ": 0, + "Nice": 0.1 + } + }, + "Color": "Green", + "HealthStatus": "Ok", + "LaunchedAt": "2015-08-13T19:17:09Z", + "Causes": [] + } + ], + "RefreshedAt": "2015-08-20T21:09:08Z" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#DescribeInstancesHealthRequest": { @@ -4007,7 +4573,8 @@ } }, "traits": { - "smithy.api#documentation": "

Detailed health information about the Amazon EC2 instances in an AWS Elastic Beanstalk\n environment.

" + "smithy.api#documentation": "

Detailed health information about the Amazon EC2 instances in an AWS Elastic Beanstalk\n environment.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#DescribePlatformVersion": { @@ -4053,6 +4620,9 @@ "smithy.api#documentation": "

Detailed information about the platform version.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#Description": { @@ -4093,7 +4663,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to disassociate the operations role from an environment.

" + "smithy.api#documentation": "

Request to disassociate the operations role from an environment.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#Ec2InstanceId": { @@ -4599,7 +5170,8 @@ } }, "traits": { - "smithy.api#documentation": "

Result message containing a list of environment resource descriptions.

" + "smithy.api#documentation": "

Result message containing a list of environment resource descriptions.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#EnvironmentResourcesDescription": { @@ -4783,7 +5355,8 @@ } }, "traits": { - "smithy.api#documentation": "

Result message wrapping a list of event descriptions.

" + "smithy.api#documentation": "

Result message wrapping a list of event descriptions.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#EventMessage": { @@ -5232,7 +5805,53 @@ "target": "com.amazonaws.elasticbeanstalk#ListAvailableSolutionStacksResultMessage" }, "traits": { - "smithy.api#documentation": "

Returns a list of the available solution stack names, with the public version first and\n then in reverse chronological order.

" + "smithy.api#documentation": "

Returns a list of the available solution stack names, with the public version first and\n then in reverse chronological order.

", + "smithy.api#examples": [ + { + "title": "To view solution stacks", + "documentation": "The following operation lists solution stacks for all currently available platform configurations and any that you have used in the past:", + "output": { + "SolutionStacks": [ + "64bit Amazon Linux 2015.03 v2.0.0 running Node.js", + "64bit Amazon Linux 2015.03 v2.0.0 running PHP 5.6", + "64bit Amazon Linux 2015.03 v2.0.0 running PHP 5.5", + "64bit Amazon Linux 2015.03 v2.0.0 running PHP 5.4", + "64bit Amazon Linux 2015.03 v2.0.0 running Python 3.4", + "64bit Amazon Linux 2015.03 v2.0.0 running Python 2.7", + "64bit Amazon Linux 2015.03 v2.0.0 running Python", + "64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.2 (Puma)", + "64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.2 (Passenger Standalone)", + "64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.1 (Puma)", + "64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.1 (Passenger Standalone)", + "64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.0 (Puma)", + "64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.0 (Passenger Standalone)", + "64bit Amazon Linux 2015.03 v2.0.0 running Ruby 1.9.3", + "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8", + "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 7 Java 7", + "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 7 Java 6", + "64bit Windows Server Core 2012 R2 running IIS 8.5", + "64bit Windows Server 2012 R2 running IIS 8.5", + "64bit Windows Server 2012 running IIS 8", + "64bit Windows Server 2008 R2 running IIS 7.5", + "64bit Amazon Linux 2015.03 v2.0.0 running Docker 1.6.2", + "64bit Amazon Linux 2015.03 v2.0.0 running Multi-container Docker 1.6.2 (Generic)", + "64bit Debian jessie v2.0.0 running GlassFish 4.1 Java 8 (Preconfigured - Docker)", + "64bit Debian jessie v2.0.0 running GlassFish 4.0 Java 7 (Preconfigured - Docker)", + "64bit Debian jessie v2.0.0 running Go 1.4 (Preconfigured - Docker)", + "64bit Debian jessie v2.0.0 running Go 1.3 (Preconfigured - Docker)", + "64bit Debian jessie v2.0.0 running Python 3.4 (Preconfigured - Docker)" + ], + "SolutionStackDetails": [ + { + "PermittedFileTypes": [ + "zip" + ], + "SolutionStackName": "64bit Amazon Linux 2015.03 v2.0.0 running Node.js" + } + ] + } + } + ] } }, "com.amazonaws.elasticbeanstalk#ListAvailableSolutionStacksResultMessage": { @@ -5252,7 +5871,8 @@ } }, "traits": { - "smithy.api#documentation": "

A list of available AWS Elastic Beanstalk solution stacks.

" + "smithy.api#documentation": "

A list of available AWS Elastic Beanstalk solution stacks.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#ListPlatformBranches": { @@ -5313,6 +5933,9 @@ "smithy.api#documentation": "

In a paginated request, if this value isn't null, it's the token that you can\n pass in a subsequent request to get the next response page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#ListPlatformVersions": { @@ -5382,6 +6005,9 @@ "smithy.api#documentation": "

In a paginated request, if this value isn't null, it's the token that you can\n pass in a subsequent request to get the next response page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#ListTagsForResource": { @@ -5417,6 +6043,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#Listener": { @@ -6339,7 +6968,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes and recreates all of the AWS resources (for example: the Auto Scaling group,\n load balancer, etc.) for a specified environment and forces a restart.

" + "smithy.api#documentation": "

Deletes and recreates all of the AWS resources (for example: the Auto Scaling group,\n load balancer, etc.) for a specified environment and forces a restart.

", + "smithy.api#examples": [ + { + "title": "To rebuild an environment", + "documentation": "The following operation terminates and recreates the resources in an environment named my-env:", + "input": { + "EnvironmentName": "my-env" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#RebuildEnvironmentMessage": { @@ -6359,7 +6997,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#RefreshedAt": { @@ -6386,7 +7025,17 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Initiates a request to compile the specified type of information of the deployed\n environment.

\n

Setting the InfoType to tail compiles the last lines from\n the application server log files of every Amazon EC2 instance in your environment.

\n

Setting the InfoType to bundle compresses the application\n server log files for every Amazon EC2 instance into a .zip file. Legacy and .NET\n containers do not support bundle logs.

\n

Use RetrieveEnvironmentInfo to obtain the set of logs.

\n

Related Topics

\n " + "smithy.api#documentation": "

Initiates a request to compile the specified type of information of the deployed\n environment.

\n

Setting the InfoType to tail compiles the last lines from\n the application server log files of every Amazon EC2 instance in your environment.

\n

Setting the InfoType to bundle compresses the application\n server log files for every Amazon EC2 instance into a .zip file. Legacy and .NET\n containers do not support bundle logs.

\n

Use RetrieveEnvironmentInfo to obtain the set of logs.

\n

Related Topics

\n ", + "smithy.api#examples": [ + { + "title": "To request tailed logs", + "documentation": "The following operation requests logs from an environment named my-env:", + "input": { + "EnvironmentName": "my-env", + "InfoType": "tail" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#RequestEnvironmentInfoMessage": { @@ -6413,7 +7062,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to retrieve logs from an environment and store them in your Elastic Beanstalk\n storage bucket.

" + "smithy.api#documentation": "

Request to retrieve logs from an environment and store them in your Elastic Beanstalk\n storage bucket.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#RequestId": { @@ -6521,6 +7171,9 @@ "smithy.api#documentation": "

A list of tag key-value pairs.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#ResourceTypeNotSupportedException": { @@ -6552,7 +7205,16 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Causes the environment to restart the application container server running on each\n Amazon EC2 instance.

" + "smithy.api#documentation": "

Causes the environment to restart the application container server running on each\n Amazon EC2 instance.

", + "smithy.api#examples": [ + { + "title": "To restart application servers", + "documentation": "The following operation restarts application servers on all instances in an environment named my-env:", + "input": { + "EnvironmentName": "my-env" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#RestartAppServerMessage": { @@ -6572,7 +7234,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#RetrieveEnvironmentInfo": { @@ -6584,7 +7247,27 @@ "target": "com.amazonaws.elasticbeanstalk#RetrieveEnvironmentInfoResultMessage" }, "traits": { - "smithy.api#documentation": "

Retrieves the compiled information from a RequestEnvironmentInfo\n request.

\n

Related Topics

\n " + "smithy.api#documentation": "

Retrieves the compiled information from a RequestEnvironmentInfo\n request.

\n

Related Topics

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve tailed logs", + "documentation": "The following operation retrieves a link to logs from an environment named my-env:", + "input": { + "EnvironmentName": "my-env", + "InfoType": "tail" + }, + "output": { + "EnvironmentInfo": [ + { + "SampleTimestamp": "2015-08-20T22:23:17.703Z", + "Message": "https://elasticbeanstalk-us-west-2-0123456789012.s3.amazonaws.com/resources/environments/logs/tail/e-fyqyju3yjs/i-09c1c867/TailLogs-1440109397703.out?AWSAccessKeyId=AKGPT4J56IAJ2EUBL5CQ&Expires=1440195891&Signature=n%2BEalOV6A2HIOx4Rcfb7LT16bBM%3D", + "InfoType": "tail", + "Ec2InstanceId": "i-09c1c867" + } + ] + } + } + ] } }, "com.amazonaws.elasticbeanstalk#RetrieveEnvironmentInfoMessage": { @@ -6611,7 +7294,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to download logs retrieved with RequestEnvironmentInfo.

" + "smithy.api#documentation": "

Request to download logs retrieved with RequestEnvironmentInfo.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#RetrieveEnvironmentInfoResultMessage": { @@ -6625,7 +7309,8 @@ } }, "traits": { - "smithy.api#documentation": "

Result message containing a description of the requested environment info.

" + "smithy.api#documentation": "

Result message containing a description of the requested environment info.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticbeanstalk#S3Bucket": { @@ -7028,7 +7713,17 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Swaps the CNAMEs of two environments.

" + "smithy.api#documentation": "

Swaps the CNAMEs of two environments.

", + "smithy.api#examples": [ + { + "title": "To swap environment CNAMES", + "documentation": "The following operation swaps the assigned subdomains of two environments:", + "input": { + "SourceEnvironmentName": "my-env-blue", + "DestinationEnvironmentName": "my-env-green" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#SwapEnvironmentCNAMEsMessage": { @@ -7060,7 +7755,8 @@ } }, "traits": { - "smithy.api#documentation": "

Swaps the CNAMEs of two environments.

" + "smithy.api#documentation": "

Swaps the CNAMEs of two environments.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#SystemStatus": { @@ -7156,7 +7852,34 @@ } ], "traits": { - "smithy.api#documentation": "

Terminates the specified environment.

" + "smithy.api#documentation": "

Terminates the specified environment.

", + "smithy.api#examples": [ + { + "title": "To terminate an environment", + "documentation": "The following operation terminates an Elastic Beanstalk environment named my-env:", + "input": { + "EnvironmentName": "my-env" + }, + "output": { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "Status": "Terminating", + "EnvironmentId": "e-fh2eravpns", + "EndpointURL": "awseb-e-f-AWSEBLoa-1I9XUMP4-8492WNUP202574.us-west-2.elb.amazonaws.com", + "SolutionStackName": "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8", + "CNAME": "my-env.elasticbeanstalk.com", + "Health": "Grey", + "AbortableOperationInProgress": false, + "Tier": { + "Version": " ", + "Type": "Standard", + "Name": "WebServer" + }, + "DateUpdated": "2015-08-12T19:05:54.744Z", + "DateCreated": "2015-08-12T18:52:53.622Z" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#TerminateEnvironmentMessage": { @@ -7188,7 +7911,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to terminate an environment.

" + "smithy.api#documentation": "

Request to terminate an environment.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#TerminateEnvironmentResources": { @@ -7370,7 +8094,33 @@ "target": "com.amazonaws.elasticbeanstalk#ApplicationDescriptionMessage" }, "traits": { - "smithy.api#documentation": "

Updates the specified application to have the specified properties.

\n \n

If a property (for example, description) is not provided, the value\n remains unchanged. To clear these properties, specify an empty string.

\n
" + "smithy.api#documentation": "

Updates the specified application to have the specified properties.

\n \n

If a property (for example, description) is not provided, the value\n remains unchanged. To clear these properties, specify an empty string.

\n
", + "smithy.api#examples": [ + { + "title": "To change an application's description", + "documentation": "The following operation updates the description of an application named my-app:", + "input": { + "ApplicationName": "my-app", + "Description": "my Elastic Beanstalk application" + }, + "output": { + "Application": { + "ApplicationName": "my-app", + "Description": "my Elastic Beanstalk application", + "Versions": [ + "2fba-stage-150819_234450", + "bf07-stage-150820_214945", + "93f8", + "fd7c-stage-150820_000431", + "22a0-stage-150819_185942" + ], + "DateCreated": "2015-08-13T19:15:50.449Z", + "ConfigurationTemplates": [], + "DateUpdated": "2015-08-20T22:34:56.195Z" + } + } + } + ] } }, "com.amazonaws.elasticbeanstalk#UpdateApplicationMessage": { @@ -7391,7 +8141,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to update an application.

" + "smithy.api#documentation": "

Request to update an application.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#UpdateApplicationResourceLifecycle": { @@ -7428,6 +8179,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#UpdateApplicationVersion": { @@ -7439,7 +8193,31 @@ "target": "com.amazonaws.elasticbeanstalk#ApplicationVersionDescriptionMessage" }, "traits": { - "smithy.api#documentation": "

Updates the specified application version to have the specified properties.

\n \n

If a property (for example, description) is not provided, the value\n remains unchanged. To clear properties, specify an empty string.

\n
" + "smithy.api#documentation": "

Updates the specified application version to have the specified properties.

\n \n

If a property (for example, description) is not provided, the value\n remains unchanged. To clear properties, specify an empty string.

\n
", + "smithy.api#examples": [ + { + "title": "To change an application version's description", + "documentation": "The following operation updates the description of an application version named 22a0-stage-150819_185942:", + "input": { + "ApplicationName": "my-app", + "VersionLabel": "22a0-stage-150819_185942", + "Description": "new description" + }, + "output": { + "ApplicationVersion": { + "ApplicationName": "my-app", + "VersionLabel": "22a0-stage-150819_185942", + "Description": "new description", + "DateCreated": "2015-08-19T18:59:17.646Z", + "DateUpdated": "2015-08-20T22:53:28.871Z", + "SourceBundle": { + "S3Bucket": "elasticbeanstalk-us-west-2-0123456789012", + "S3Key": "my-app/22a0-stage-150819_185942.war" + } + } + } + } + ] } }, "com.amazonaws.elasticbeanstalk#UpdateApplicationVersionMessage": { @@ -7467,7 +8245,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#UpdateConfigurationTemplate": { @@ -7487,7 +8266,30 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the specified configuration template to have the specified properties or\n configuration option values.

\n \n

If a property (for example, ApplicationName) is not provided, its value\n remains unchanged. To clear such properties, specify an empty string.

\n
\n

Related Topics

\n " + "smithy.api#documentation": "

Updates the specified configuration template to have the specified properties or\n configuration option values.

\n \n

If a property (for example, ApplicationName) is not provided, its value\n remains unchanged. To clear such properties, specify an empty string.

\n
\n

Related Topics

\n ", + "smithy.api#examples": [ + { + "title": "To update a configuration template", + "documentation": "The following operation removes the configured CloudWatch custom health metrics configuration ConfigDocument from a saved configuration template named my-template:", + "input": { + "ApplicationName": "my-app", + "TemplateName": "my-template", + "OptionsToRemove": [ + { + "Namespace": "aws:elasticbeanstalk:healthreporting:system", + "OptionName": "ConfigDocument" + } + ] + }, + "output": { + "ApplicationName": "my-app", + "TemplateName": "my-template", + "DateCreated": "2015-08-20T22:39:31Z", + "DateUpdated": "2015-08-20T22:43:11Z", + "SolutionStackName": "64bit Amazon Linux 2015.03 v2.0.0 running Tomcat 8 Java 8" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#UpdateConfigurationTemplateMessage": { @@ -7527,7 +8329,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result message containing the options for the specified solution stack.

" + "smithy.api#documentation": "

The result message containing the options for the specified solution stack.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#UpdateDate": { @@ -7550,7 +8353,35 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the environment description, deploys a new application version, updates the\n configuration settings to an entirely new configuration template, or updates select\n configuration option values in the running environment.

\n

Attempting to update both the release and configuration is not allowed and AWS Elastic\n Beanstalk returns an InvalidParameterCombination error.

\n

When updating the configuration settings to a new template or individual settings, a\n draft configuration is created and DescribeConfigurationSettings for this\n environment returns two setting descriptions with different DeploymentStatus\n values.

" + "smithy.api#documentation": "

Updates the environment description, deploys a new application version, updates the\n configuration settings to an entirely new configuration template, or updates select\n configuration option values in the running environment.

\n

Attempting to update both the release and configuration is not allowed and AWS Elastic\n Beanstalk returns an InvalidParameterCombination error.

\n

When updating the configuration settings to a new template or individual settings, a\n draft configuration is created and DescribeConfigurationSettings for this\n environment returns two setting descriptions with different DeploymentStatus\n values.

", + "smithy.api#examples": [ + { + "title": "To update an environment to a new version", + "documentation": "The following operation updates an environment named \"my-env\" to version \"v2\" of the application to which it belongs:", + "input": { + "EnvironmentName": "my-env", + "VersionLabel": "v2" + }, + "output": { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "VersionLabel": "v2", + "Status": "Updating", + "EnvironmentId": "e-szqipays4h", + "EndpointURL": "awseb-e-i-AWSEBLoa-1RDLX6TC9VUAO-0123456789.us-west-2.elb.amazonaws.com", + "SolutionStackName": "64bit Amazon Linux running Tomcat 7", + "CNAME": "my-env.elasticbeanstalk.com", + "Health": "Grey", + "Tier": { + "Version": " ", + "Type": "Standard", + "Name": "WebServer" + }, + "DateUpdated": "2015-02-03T23:12:29.119Z", + "DateCreated": "2015-02-03T23:04:54.453Z" + } + } + ] } }, "com.amazonaws.elasticbeanstalk#UpdateEnvironmentMessage": { @@ -7630,7 +8461,8 @@ } }, "traits": { - "smithy.api#documentation": "

Request to update an environment.

" + "smithy.api#documentation": "

Request to update an environment.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#UpdateTagsForResource": { @@ -7684,6 +8516,9 @@ "smithy.api#documentation": "

A list of tag keys to remove. If a tag key doesn't exist, it is silently ignored.

\n

Specify at least one of these parameters: TagsToAdd,\n TagsToRemove.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#UserDefinedOption": { @@ -7706,7 +8541,27 @@ } ], "traits": { - "smithy.api#documentation": "

Takes a set of configuration settings and either a configuration template or\n environment, and determines whether those values are valid.

\n

This action returns a list of messages indicating any errors or warnings associated\n with the selection of option values.

" + "smithy.api#documentation": "

Takes a set of configuration settings and either a configuration template or\n environment, and determines whether those values are valid.

\n

This action returns a list of messages indicating any errors or warnings associated\n with the selection of option values.

", + "smithy.api#examples": [ + { + "title": "To validate configuration settings", + "documentation": "The following operation validates a CloudWatch custom metrics config document:", + "input": { + "ApplicationName": "my-app", + "EnvironmentName": "my-env", + "OptionSettings": [ + { + "Namespace": "aws:elasticbeanstalk:healthreporting:system", + "OptionName": "ConfigDocument", + "Value": "{\"CloudWatchMetrics\": {\"Environment\": {\"ApplicationLatencyP99.9\": null,\"InstancesSevere\": 60,\"ApplicationLatencyP90\": 60,\"ApplicationLatencyP99\": null,\"ApplicationLatencyP95\": 60,\"InstancesUnknown\": 60,\"ApplicationLatencyP85\": 60,\"InstancesInfo\": null,\"ApplicationRequests2xx\": null,\"InstancesDegraded\": null,\"InstancesWarning\": 60,\"ApplicationLatencyP50\": 60,\"ApplicationRequestsTotal\": null,\"InstancesNoData\": null,\"InstancesPending\": 60,\"ApplicationLatencyP10\": null,\"ApplicationRequests5xx\": null,\"ApplicationLatencyP75\": null,\"InstancesOk\": 60,\"ApplicationRequests3xx\": null,\"ApplicationRequests4xx\": null},\"Instance\": {\"ApplicationLatencyP99.9\": null,\"ApplicationLatencyP90\": 60,\"ApplicationLatencyP99\": null,\"ApplicationLatencyP95\": null,\"ApplicationLatencyP85\": null,\"CPUUser\": 60,\"ApplicationRequests2xx\": null,\"CPUIdle\": null,\"ApplicationLatencyP50\": null,\"ApplicationRequestsTotal\": 60,\"RootFilesystemUtil\": null,\"LoadAverage1min\": null,\"CPUIrq\": null,\"CPUNice\": 60,\"CPUIowait\": 60,\"ApplicationLatencyP10\": null,\"LoadAverage5min\": null,\"ApplicationRequests5xx\": null,\"ApplicationLatencyP75\": 60,\"CPUSystem\": 60,\"ApplicationRequests3xx\": 60,\"ApplicationRequests4xx\": null,\"InstanceHealth\": null,\"CPUSoftirq\": 60}},\"Version\": 1}" + } + ] + }, + "output": { + "Messages": [] + } + } + ] } }, "com.amazonaws.elasticbeanstalk#ValidateConfigurationSettingsMessage": { @@ -7740,7 +8595,8 @@ } }, "traits": { - "smithy.api#documentation": "

A list of validation messages for a specified configuration template.

" + "smithy.api#documentation": "

A list of validation messages for a specified configuration template.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticbeanstalk#ValidationMessage": { diff --git a/codegen/sdk-codegen/aws-models/elastic-inference.json b/codegen/sdk-codegen/aws-models/elastic-inference.json index 81de7181ce2..5267a9a05da 100644 --- a/codegen/sdk-codegen/aws-models/elastic-inference.json +++ b/codegen/sdk-codegen/aws-models/elastic-inference.json @@ -470,52 +470,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -523,13 +527,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -539,224 +552,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.elastic-inference-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://api.elastic-inference-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://api.elastic-inference-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://api.elastic-inference-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://api.elastic-inference.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://api.elastic-inference.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://api.elastic-inference.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://api.elastic-inference.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1347,6 +1311,9 @@ "smithy.api#documentation": "

\n The tags of the Elastic Inference Accelerator.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticinference#Location": { @@ -1554,7 +1521,10 @@ }, "com.amazonaws.elasticinference#TagResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.elasticinference#TagValue": { "type": "string", @@ -1635,7 +1605,10 @@ }, "com.amazonaws.elasticinference#UntagResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.elasticinference#Value": { "type": "integer", diff --git a/codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.json b/codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.json index 3188ebe9904..a8bf82bb0bc 100644 --- a/codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.json +++ b/codegen/sdk-codegen/aws-models/elastic-load-balancing-v2.json @@ -3087,6 +3087,7 @@ "arnNamespace": "elasticloadbalancing", "cloudFormationName": "ElasticLoadBalancingV2", "cloudTrailEventSource": "elasticloadbalancingv2.amazonaws.com", + "docId": "elasticloadbalancingv2-2015-12-01", "endpointPrefix": "elasticloadbalancing" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/elastic-load-balancing.json b/codegen/sdk-codegen/aws-models/elastic-load-balancing.json index 8d774735026..3e50cb0c8eb 100644 --- a/codegen/sdk-codegen/aws-models/elastic-load-balancing.json +++ b/codegen/sdk-codegen/aws-models/elastic-load-balancing.json @@ -120,7 +120,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for EnableAvailabilityZonesForLoadBalancer.

" + "smithy.api#documentation": "

Contains the parameters for EnableAvailabilityZonesForLoadBalancer.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#AddAvailabilityZonesOutput": { @@ -134,7 +135,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of EnableAvailabilityZonesForLoadBalancer.

" + "smithy.api#documentation": "

Contains the output of EnableAvailabilityZonesForLoadBalancer.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#AddTags": { @@ -157,7 +159,28 @@ } ], "traits": { - "smithy.api#documentation": "

Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.

\n \n

Each tag consists of a key and an optional value. If a tag with the same key is already associated \n with the load balancer, AddTags updates its value.

\n \n

For more information, see Tag Your Classic Load Balancer\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags.

\n \n

Each tag consists of a key and an optional value. If a tag with the same key is already associated \n with the load balancer, AddTags updates its value.

\n \n

For more information, see Tag Your Classic Load Balancer\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To add tags to a load balancer", + "documentation": "This example adds two tags to the specified load balancer.", + "input": { + "LoadBalancerNames": [ + "my-load-balancer" + ], + "Tags": [ + { + "Key": "project", + "Value": "lima" + }, + { + "Key": "department", + "Value": "digital-media" + } + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#AddTagsInput": { @@ -179,14 +202,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for AddTags.

" + "smithy.api#documentation": "

Contains the parameters for AddTags.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#AddTagsOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of AddTags.

" + "smithy.api#documentation": "

Contains the output of AddTags.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#AdditionalAttribute": { @@ -287,7 +312,24 @@ } ], "traits": { - "smithy.api#documentation": "

Associates one or more security groups with your load balancer in a virtual private cloud (VPC). The specified security groups override the previously associated security groups.

\n

For more information, see Security Groups for Load Balancers in a VPC \n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Associates one or more security groups with your load balancer in a virtual private cloud (VPC). The specified security groups override the previously associated security groups.

\n

For more information, see Security Groups for Load Balancers in a VPC \n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To associate a security group with a load balancer in a VPC", + "documentation": "This example associates a security group with the specified load balancer in a VPC.", + "input": { + "LoadBalancerName": "my-load-balancer", + "SecurityGroups": [ + "sg-fc448899" + ] + }, + "output": { + "SecurityGroups": [ + "sg-fc448899" + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#ApplySecurityGroupsToLoadBalancerInput": { @@ -309,7 +351,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for ApplySecurityGroupsToLoadBalancer.

" + "smithy.api#documentation": "

Contains the parameters for ApplySecurityGroupsToLoadBalancer.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#ApplySecurityGroupsToLoadBalancerOutput": { @@ -323,7 +366,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of ApplySecurityGroupsToLoadBalancer.

" + "smithy.api#documentation": "

Contains the output of ApplySecurityGroupsToLoadBalancer.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#AttachLoadBalancerToSubnets": { @@ -349,7 +393,25 @@ } ], "traits": { - "smithy.api#documentation": "

Adds one or more subnets to the set of configured subnets for the specified load balancer.

\n

The load balancer evenly distributes requests across all registered subnets. \n For more information, see Add or Remove Subnets for Your Load Balancer in a VPC\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Adds one or more subnets to the set of configured subnets for the specified load balancer.

\n

The load balancer evenly distributes requests across all registered subnets. \n For more information, see Add or Remove Subnets for Your Load Balancer in a VPC\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To attach subnets to a load balancer", + "documentation": "This example adds the specified subnet to the set of configured subnets for the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer", + "Subnets": [ + "subnet-0ecac448" + ] + }, + "output": { + "Subnets": [ + "subnet-15aaab61", + "subnet-0ecac448" + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#AttachLoadBalancerToSubnetsInput": { @@ -371,7 +433,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for AttachLoaBalancerToSubnets.

" + "smithy.api#documentation": "

Contains the parameters for AttachLoaBalancerToSubnets.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#AttachLoadBalancerToSubnetsOutput": { @@ -385,7 +448,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of AttachLoadBalancerToSubnets.

" + "smithy.api#documentation": "

Contains the output of AttachLoadBalancerToSubnets.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#AttributeName": { @@ -467,7 +531,32 @@ } ], "traits": { - "smithy.api#documentation": "

Specifies the health check settings to use when evaluating the health state of your EC2 instances.

\n

For more information, see Configure Health Checks for Your Load Balancer \n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Specifies the health check settings to use when evaluating the health state of your EC2 instances.

\n

For more information, see Configure Health Checks for Your Load Balancer \n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To specify the health check settings for your backend EC2 instances", + "documentation": "This example specifies the health check settings used to evaluate the health of your backend EC2 instances.", + "input": { + "LoadBalancerName": "my-load-balancer", + "HealthCheck": { + "Target": "HTTP:80/png", + "Interval": 30, + "Timeout": 3, + "UnhealthyThreshold": 2, + "HealthyThreshold": 2 + } + }, + "output": { + "HealthCheck": { + "HealthyThreshold": 2, + "Interval": 30, + "Target": "HTTP:80/png", + "Timeout": 3, + "UnhealthyThreshold": 2 + } + } + } + ] } }, "com.amazonaws.elasticloadbalancing#ConfigureHealthCheckInput": { @@ -489,7 +578,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for ConfigureHealthCheck.

" + "smithy.api#documentation": "

Contains the parameters for ConfigureHealthCheck.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#ConfigureHealthCheckOutput": { @@ -503,7 +593,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of ConfigureHealthCheck.

" + "smithy.api#documentation": "

Contains the output of ConfigureHealthCheck.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#ConnectionDraining": { @@ -607,7 +698,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for CreateLoadBalancer.

" + "smithy.api#documentation": "

Contains the parameters for CreateLoadBalancer.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#CreateAccessPointOutput": { @@ -621,7 +713,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output for CreateLoadBalancer.

" + "smithy.api#documentation": "

Contains the output for CreateLoadBalancer.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#CreateAppCookieStickinessPolicy": { @@ -647,7 +740,18 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners.

\n

This policy is similar to the policy created by CreateLBCookieStickinessPolicy, \n except that the lifetime of the special Elastic Load Balancing cookie, AWSELB, \n follows the lifetime of the application-generated cookie specified in the policy configuration. \n The load balancer only inserts a new stickiness cookie when the application response\n includes a new application cookie.

\n

If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.

\n

For more information, see Application-Controlled Session Stickiness\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Generates a stickiness policy with sticky session lifetimes that follow that of an application-generated cookie. This policy can be associated only with HTTP/HTTPS listeners.

\n

This policy is similar to the policy created by CreateLBCookieStickinessPolicy, \n except that the lifetime of the special Elastic Load Balancing cookie, AWSELB, \n follows the lifetime of the application-generated cookie specified in the policy configuration. \n The load balancer only inserts a new stickiness cookie when the application response\n includes a new application cookie.

\n

If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.

\n

For more information, see Application-Controlled Session Stickiness\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To generate a stickiness policy for your load balancer", + "documentation": "This example generates a stickiness policy that follows the sticky session lifetimes of the application-generated cookie.", + "input": { + "LoadBalancerName": "my-load-balancer", + "PolicyName": "my-app-cookie-policy", + "CookieName": "my-app-cookie" + } + } + ] } }, "com.amazonaws.elasticloadbalancing#CreateAppCookieStickinessPolicyInput": { @@ -676,14 +780,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for CreateAppCookieStickinessPolicy.

" + "smithy.api#documentation": "

Contains the parameters for CreateAppCookieStickinessPolicy.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#CreateAppCookieStickinessPolicyOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output for CreateAppCookieStickinessPolicy.

" + "smithy.api#documentation": "

Contains the output for CreateAppCookieStickinessPolicy.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#CreateLBCookieStickinessPolicy": { @@ -709,7 +815,18 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners.

\n

When a load balancer implements this policy, the load balancer uses a special cookie to track the instance for each request. When the load balancer receives a request, it first checks to see if this cookie is present in the request. \n If so, the load balancer sends the request to the application server specified in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load-balancing algorithm.

\n

A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is based on the cookie expiration time, which is specified in the policy configuration.

\n \n

For more information, see Duration-Based Session Stickiness\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified expiration period. This policy can be associated only with HTTP/HTTPS listeners.

\n

When a load balancer implements this policy, the load balancer uses a special cookie to track the instance for each request. When the load balancer receives a request, it first checks to see if this cookie is present in the request. \n If so, the load balancer sends the request to the application server specified in the cookie. If not, the load balancer sends the request to a server that is chosen based on the existing load-balancing algorithm.

\n

A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is based on the cookie expiration time, which is specified in the policy configuration.

\n \n

For more information, see Duration-Based Session Stickiness\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To generate a duration-based stickiness policy for your load balancer", + "documentation": "This example generates a stickiness policy with sticky session lifetimes controlled by the specified expiration period.", + "input": { + "LoadBalancerName": "my-load-balancer", + "PolicyName": "my-duration-cookie-policy", + "CookieExpirationPeriod": 60 + } + } + ] } }, "com.amazonaws.elasticloadbalancing#CreateLBCookieStickinessPolicyInput": { @@ -737,14 +854,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for CreateLBCookieStickinessPolicy.

" + "smithy.api#documentation": "

Contains the parameters for CreateLBCookieStickinessPolicy.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#CreateLBCookieStickinessPolicyOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output for CreateLBCookieStickinessPolicy.

" + "smithy.api#documentation": "

Contains the output for CreateLBCookieStickinessPolicy.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#CreateLoadBalancer": { @@ -794,7 +913,33 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a Classic Load Balancer.

\n\n

You can add listeners, security groups, subnets, and tags when you create your load balancer, \n or you can add them later using CreateLoadBalancerListeners, \n ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, \n and AddTags.

\n

To describe your current load balancers, see DescribeLoadBalancers.\n When you are finished with a load balancer, you can delete it using \n DeleteLoadBalancer.

\n \n

You can create up to 20 load balancers per region per account. \n You can request an increase for the number of load balancers for your account. \n For more information, see Limits for Your Classic Load Balancer\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Creates a Classic Load Balancer.

\n\n

You can add listeners, security groups, subnets, and tags when you create your load balancer, \n or you can add them later using CreateLoadBalancerListeners, \n ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, \n and AddTags.

\n

To describe your current load balancers, see DescribeLoadBalancers.\n When you are finished with a load balancer, you can delete it using \n DeleteLoadBalancer.

\n \n

You can create up to 20 load balancers per region per account. \n You can request an increase for the number of load balancers for your account. \n For more information, see Limits for Your Classic Load Balancer\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To create an HTTP load balancer in a VPC", + "documentation": "This example creates a load balancer with an HTTP listener in a VPC.", + "input": { + "LoadBalancerName": "my-load-balancer", + "Listeners": [ + { + "Protocol": "HTTP", + "LoadBalancerPort": 80, + "InstanceProtocol": "HTTP", + "InstancePort": 80 + } + ], + "Subnets": [ + "subnet-15aaab61" + ], + "SecurityGroups": [ + "sg-a61988c3" + ] + }, + "output": { + "DNSName": "my-load-balancer-1234567890.us-west-2.elb.amazonaws.com" + } + } + ] } }, "com.amazonaws.elasticloadbalancing#CreateLoadBalancerListenerInput": { @@ -816,14 +961,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for CreateLoadBalancerListeners.

" + "smithy.api#documentation": "

Contains the parameters for CreateLoadBalancerListeners.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#CreateLoadBalancerListenerOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the parameters for CreateLoadBalancerListener.

" + "smithy.api#documentation": "

Contains the parameters for CreateLoadBalancerListener.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#CreateLoadBalancerListeners": { @@ -852,7 +999,24 @@ } ], "traits": { - "smithy.api#documentation": "

Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.

\n

For more information, see Listeners for Your Classic Load Balancer \n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.

\n

For more information, see Listeners for Your Classic Load Balancer \n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To create an HTTP listener for a load balancer", + "documentation": "This example creates a listener for your load balancer at port 80 using the HTTP protocol.", + "input": { + "LoadBalancerName": "my-load-balancer", + "Listeners": [ + { + "Protocol": "HTTP", + "LoadBalancerPort": 80, + "InstanceProtocol": "HTTP", + "InstancePort": 80 + } + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#CreateLoadBalancerPolicy": { @@ -881,7 +1045,24 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a policy with the specified attributes for the specified load balancer.

\n

Policies are settings that are saved for your load balancer and that can be applied to the listener or the application server, depending on the policy type.

" + "smithy.api#documentation": "

Creates a policy with the specified attributes for the specified load balancer.

\n

Policies are settings that are saved for your load balancer and that can be applied to the listener or the application server, depending on the policy type.

", + "smithy.api#examples": [ + { + "title": "To create a policy that enables Proxy Protocol on a load balancer", + "documentation": "This example creates a policy that enables Proxy Protocol on the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer", + "PolicyName": "my-ProxyProtocol-policy", + "PolicyTypeName": "ProxyProtocolPolicyType", + "PolicyAttributes": [ + { + "AttributeName": "ProxyProtocol", + "AttributeValue": "true" + } + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#CreateLoadBalancerPolicyInput": { @@ -916,14 +1097,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for CreateLoadBalancerPolicy.

" + "smithy.api#documentation": "

Contains the parameters for CreateLoadBalancerPolicy.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#CreateLoadBalancerPolicyOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of CreateLoadBalancerPolicy.

" + "smithy.api#documentation": "

Contains the output of CreateLoadBalancerPolicy.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#CreatedTime": { @@ -969,14 +1152,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DeleteLoadBalancer.

" + "smithy.api#documentation": "

Contains the parameters for DeleteLoadBalancer.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DeleteAccessPointOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of DeleteLoadBalancer.

" + "smithy.api#documentation": "

Contains the output of DeleteLoadBalancer.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DeleteLoadBalancer": { @@ -988,7 +1173,16 @@ "target": "com.amazonaws.elasticloadbalancing#DeleteAccessPointOutput" }, "traits": { - "smithy.api#documentation": "

Deletes the specified load balancer.

\n

If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.

\n

If the load balancer does not exist or has already been deleted, the call to\n DeleteLoadBalancer still succeeds.

" + "smithy.api#documentation": "

Deletes the specified load balancer.

\n

If you are attempting to recreate a load balancer, you must reconfigure all settings. The DNS name associated with a deleted load balancer are no longer usable. The name and associated DNS record of the deleted load balancer no longer exist and traffic sent to any of its IP addresses is no longer delivered to your instances.

\n

If the load balancer does not exist or has already been deleted, the call to\n DeleteLoadBalancer still succeeds.

", + "smithy.api#examples": [ + { + "title": "To delete a load balancer", + "documentation": "This example deletes the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer" + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DeleteLoadBalancerListenerInput": { @@ -1010,14 +1204,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DeleteLoadBalancerListeners.

" + "smithy.api#documentation": "

Contains the parameters for DeleteLoadBalancerListeners.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DeleteLoadBalancerListenerOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of DeleteLoadBalancerListeners.

" + "smithy.api#documentation": "

Contains the output of DeleteLoadBalancerListeners.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DeleteLoadBalancerListeners": { @@ -1034,7 +1230,19 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified listeners from the specified load balancer.

" + "smithy.api#documentation": "

Deletes the specified listeners from the specified load balancer.

", + "smithy.api#examples": [ + { + "title": "To delete a listener from your load balancer", + "documentation": "This example deletes the listener for the specified port from the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer", + "LoadBalancerPorts": [ + 80 + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DeleteLoadBalancerPolicy": { @@ -1054,7 +1262,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.

" + "smithy.api#documentation": "

Deletes the specified policy from the specified load balancer. This policy must not be enabled for any listeners.

", + "smithy.api#examples": [ + { + "title": "To delete a policy from your load balancer", + "documentation": "This example deletes the specified policy from the specified load balancer. The policy must not be enabled on any listener.", + "input": { + "LoadBalancerName": "my-load-balancer", + "PolicyName": "my-duration-cookie-policy" + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DeleteLoadBalancerPolicyInput": { @@ -1076,14 +1294,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DeleteLoadBalancerPolicy.

" + "smithy.api#documentation": "

Contains the parameters for DeleteLoadBalancerPolicy.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DeleteLoadBalancerPolicyOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of DeleteLoadBalancerPolicy.

" + "smithy.api#documentation": "

Contains the output of DeleteLoadBalancerPolicy.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DependencyThrottleException": { @@ -1122,7 +1342,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DeregisterInstancesFromLoadBalancer.

" + "smithy.api#documentation": "

Contains the parameters for DeregisterInstancesFromLoadBalancer.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DeregisterEndPointsOutput": { @@ -1136,7 +1357,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of DeregisterInstancesFromLoadBalancer.

" + "smithy.api#documentation": "

Contains the output of DeregisterInstancesFromLoadBalancer.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DeregisterInstancesFromLoadBalancer": { @@ -1156,7 +1378,31 @@ } ], "traits": { - "smithy.api#documentation": "

Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.

\n \n

You can use DescribeLoadBalancers to verify that the instance is deregistered from the load balancer.

\n\n

For more information, see Register or De-Register EC2 Instances \n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Deregisters the specified instances from the specified load balancer. After the instance is deregistered, it no longer receives traffic from the load balancer.

\n \n

You can use DescribeLoadBalancers to verify that the instance is deregistered from the load balancer.

\n\n

For more information, see Register or De-Register EC2 Instances \n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To deregister instances from a load balancer", + "documentation": "This example deregisters the specified instance from the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer", + "Instances": [ + { + "InstanceId": "i-d6f6fae3" + } + ] + }, + "output": { + "Instances": [ + { + "InstanceId": "i-207d9717" + }, + { + "InstanceId": "i-afefb49b" + } + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DescribeAccessPointsInput": { @@ -1182,7 +1428,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancers.

" + "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancers.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DescribeAccessPointsOutput": { @@ -1202,7 +1449,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancers.

" + "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancers.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DescribeAccountLimits": { @@ -1232,6 +1480,9 @@ "smithy.api#documentation": "

The maximum number of results to return with this call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DescribeAccountLimitsOutput": { @@ -1249,6 +1500,9 @@ "smithy.api#documentation": "

The marker to use when requesting the next set of results. If there are no additional results, the string is empty.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DescribeEndPointStateInput": { @@ -1269,7 +1523,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DescribeInstanceHealth.

" + "smithy.api#documentation": "

Contains the parameters for DescribeInstanceHealth.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DescribeEndPointStateOutput": { @@ -1283,7 +1538,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output for DescribeInstanceHealth.

" + "smithy.api#documentation": "

Contains the output for DescribeInstanceHealth.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DescribeInstanceHealth": { @@ -1304,6 +1560,34 @@ ], "traits": { "smithy.api#documentation": "

Describes the state of the specified instances with respect to the specified load balancer. If no instances are specified, the call describes the state of all instances that are currently registered with the load balancer. If instances are specified, their state is returned even if they are no longer registered with the load balancer. The state of terminated instances is not returned.

", + "smithy.api#examples": [ + { + "title": "To describe the health of the instances for a load balancer", + "documentation": "This example describes the health of the instances for the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer" + }, + "output": { + "InstanceStates": [ + { + "InstanceId": "i-207d9717", + "ReasonCode": "N/A", + "State": "InService", + "Description": "N/A" + }, + { + "InstanceId": "i-afefb49b", + "ReasonCode": "N/A", + "State": "InService", + "Description": "N/A" + } + ] + } + } + ], + "smithy.api#suppress": [ + "WaitableTraitInvalidErrorType" + ], "smithy.waiters#waitable": { "AnyInstanceInService": { "acceptors": [ @@ -1319,6 +1603,48 @@ } ], "minDelay": 15 + }, + "InstanceDeregistered": { + "acceptors": [ + { + "state": "success", + "matcher": { + "output": { + "path": "InstanceStates[].State", + "expected": "OutOfService", + "comparator": "allStringEquals" + } + } + }, + { + "state": "success", + "matcher": { + "errorType": "InvalidInstance" + } + } + ], + "minDelay": 15 + }, + "InstanceInService": { + "acceptors": [ + { + "state": "success", + "matcher": { + "output": { + "path": "InstanceStates[].State", + "expected": "InService", + "comparator": "allStringEquals" + } + } + }, + { + "state": "retry", + "matcher": { + "errorType": "InvalidInstance" + } + } + ], + "minDelay": 15 } } } @@ -1340,7 +1666,33 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the attributes for the specified load balancer.

" + "smithy.api#documentation": "

Describes the attributes for the specified load balancer.

", + "smithy.api#examples": [ + { + "title": "To describe the attributes of a load balancer", + "documentation": "This example describes the attributes of the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer" + }, + "output": { + "LoadBalancerAttributes": { + "ConnectionDraining": { + "Enabled": false, + "Timeout": 300 + }, + "CrossZoneLoadBalancing": { + "Enabled": false + }, + "ConnectionSettings": { + "IdleTimeout": 60 + }, + "AccessLog": { + "Enabled": false + } + } + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DescribeLoadBalancerAttributesInput": { @@ -1355,7 +1707,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancerAttributes.

" + "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancerAttributes.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DescribeLoadBalancerAttributesOutput": { @@ -1369,7 +1722,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of DescribeLoadBalancerAttributes.

" + "smithy.api#documentation": "

Contains the output of DescribeLoadBalancerAttributes.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DescribeLoadBalancerPolicies": { @@ -1389,7 +1743,33 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the specified policies.

\n

If you specify a load balancer name, the action returns the descriptions of all policies created for the load balancer.\n If you specify a policy name associated with your load balancer, the action returns the description of that policy. \n If you don't specify a load balancer name, the action returns descriptions of the specified sample policies, or descriptions of all sample policies.\n The names of the sample policies have the ELBSample- prefix.

" + "smithy.api#documentation": "

Describes the specified policies.

\n

If you specify a load balancer name, the action returns the descriptions of all policies created for the load balancer.\n If you specify a policy name associated with your load balancer, the action returns the description of that policy. \n If you don't specify a load balancer name, the action returns descriptions of the specified sample policies, or descriptions of all sample policies.\n The names of the sample policies have the ELBSample- prefix.

", + "smithy.api#examples": [ + { + "title": "To describe a policy associated with a load balancer", + "documentation": "This example describes the specified policy associated with the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer", + "PolicyNames": [ + "my-authentication-policy" + ] + }, + "output": { + "PolicyDescriptions": [ + { + "PolicyAttributeDescriptions": [ + { + "AttributeName": "PublicKeyPolicyName", + "AttributeValue": "my-PublicKey-policy" + } + ], + "PolicyName": "my-authentication-policy", + "PolicyTypeName": "BackendServerAuthenticationPolicyType" + } + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DescribeLoadBalancerPoliciesInput": { @@ -1409,7 +1789,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancerPolicies.

" + "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancerPolicies.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DescribeLoadBalancerPoliciesOutput": { @@ -1423,7 +1804,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of DescribeLoadBalancerPolicies.

" + "smithy.api#documentation": "

Contains the output of DescribeLoadBalancerPolicies.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DescribeLoadBalancerPolicyTypes": { @@ -1440,7 +1822,33 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the specified load balancer policy types or all load balancer policy types.

\n

The description of each type indicates how it can be used. For example, \n some policies can be used only with layer 7 listeners,\n some policies can be used only with layer 4 listeners,\n and some policies can be used only with your EC2 instances.

\n

You can use CreateLoadBalancerPolicy to create a policy configuration for any of these policy types. \n Then, depending on the policy type, use either SetLoadBalancerPoliciesOfListener or \n SetLoadBalancerPoliciesForBackendServer to set the policy.

" + "smithy.api#documentation": "

Describes the specified load balancer policy types or all load balancer policy types.

\n

The description of each type indicates how it can be used. For example, \n some policies can be used only with layer 7 listeners,\n some policies can be used only with layer 4 listeners,\n and some policies can be used only with your EC2 instances.

\n

You can use CreateLoadBalancerPolicy to create a policy configuration for any of these policy types. \n Then, depending on the policy type, use either SetLoadBalancerPoliciesOfListener or \n SetLoadBalancerPoliciesForBackendServer to set the policy.

", + "smithy.api#examples": [ + { + "title": "To describe a load balancer policy type defined by Elastic Load Balancing", + "documentation": "This example describes the specified load balancer policy type.", + "input": { + "PolicyTypeNames": [ + "ProxyProtocolPolicyType" + ] + }, + "output": { + "PolicyTypeDescriptions": [ + { + "PolicyAttributeTypeDescriptions": [ + { + "Cardinality": "ONE", + "AttributeName": "ProxyProtocol", + "AttributeType": "Boolean" + } + ], + "PolicyTypeName": "ProxyProtocolPolicyType", + "Description": "Policy that controls whether to include the IP address and port of the originating request for TCP messages. This policy operates on TCP listeners only." + } + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DescribeLoadBalancerPolicyTypesInput": { @@ -1454,7 +1862,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancerPolicyTypes.

" + "smithy.api#documentation": "

Contains the parameters for DescribeLoadBalancerPolicyTypes.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DescribeLoadBalancerPolicyTypesOutput": { @@ -1468,7 +1877,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of DescribeLoadBalancerPolicyTypes.

" + "smithy.api#documentation": "

Contains the output of DescribeLoadBalancerPolicyTypes.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DescribeLoadBalancers": { @@ -1489,6 +1899,105 @@ ], "traits": { "smithy.api#documentation": "

Describes the specified the load balancers. If no load balancers are specified, the call describes all of your load balancers.

", + "smithy.api#examples": [ + { + "title": "To describe one of your load balancers", + "documentation": "This example describes the specified load balancer.", + "input": { + "LoadBalancerNames": [ + "my-load-balancer" + ] + }, + "output": { + "LoadBalancerDescriptions": [ + { + "Subnets": [ + "subnet-15aaab61" + ], + "CanonicalHostedZoneNameID": "Z3DZXE0EXAMPLE", + "CanonicalHostedZoneName": "my-load-balancer-1234567890.us-west-2.elb.amazonaws.com", + "ListenerDescriptions": [ + { + "Listener": { + "InstancePort": 80, + "LoadBalancerPort": 80, + "Protocol": "HTTP", + "InstanceProtocol": "HTTP" + }, + "PolicyNames": [] + }, + { + "Listener": { + "InstancePort": 443, + "SSLCertificateId": "arn:aws:iam::123456789012:server-certificate/my-server-cert", + "LoadBalancerPort": 443, + "Protocol": "HTTPS", + "InstanceProtocol": "HTTPS" + }, + "PolicyNames": [ + "ELBSecurityPolicy-2015-03" + ] + } + ], + "HealthCheck": { + "HealthyThreshold": 2, + "Interval": 30, + "Target": "HTTP:80/png", + "Timeout": 3, + "UnhealthyThreshold": 2 + }, + "VPCId": "vpc-a01106c2", + "BackendServerDescriptions": [ + { + "InstancePort": 80, + "PolicyNames": [ + "my-ProxyProtocol-policy" + ] + } + ], + "Instances": [ + { + "InstanceId": "i-207d9717" + }, + { + "InstanceId": "i-afefb49b" + } + ], + "DNSName": "my-load-balancer-1234567890.us-west-2.elb.amazonaws.com", + "SecurityGroups": [ + "sg-a61988c3" + ], + "Policies": { + "LBCookieStickinessPolicies": [ + { + "PolicyName": "my-duration-cookie-policy", + "CookieExpirationPeriod": 60 + } + ], + "AppCookieStickinessPolicies": [], + "OtherPolicies": [ + "my-PublicKey-policy", + "my-authentication-policy", + "my-SSLNegotiation-policy", + "my-ProxyProtocol-policy", + "ELBSecurityPolicy-2015-03" + ] + }, + "LoadBalancerName": "my-load-balancer", + "CreatedTime": "2015-03-19T03:24:02.650Z", + "AvailabilityZones": [ + "us-west-2a" + ], + "Scheme": "internet-facing", + "SourceSecurityGroup": { + "OwnerAlias": "123456789012", + "GroupName": "my-elb-sg" + } + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "NextMarker", @@ -1510,7 +2019,35 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the tags associated with the specified load balancers.

" + "smithy.api#documentation": "

Describes the tags associated with the specified load balancers.

", + "smithy.api#examples": [ + { + "title": "To describe the tags for a load balancer", + "documentation": "This example describes the tags for the specified load balancer.", + "input": { + "LoadBalancerNames": [ + "my-load-balancer" + ] + }, + "output": { + "TagDescriptions": [ + { + "Tags": [ + { + "Key": "project", + "Value": "lima" + }, + { + "Key": "department", + "Value": "digital-media" + } + ], + "LoadBalancerName": "my-load-balancer" + } + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DescribeTagsInput": { @@ -1525,7 +2062,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DescribeTags.

" + "smithy.api#documentation": "

Contains the parameters for DescribeTags.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DescribeTagsOutput": { @@ -1539,7 +2077,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output for DescribeTags.

" + "smithy.api#documentation": "

Contains the output for DescribeTags.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#Description": { @@ -1562,7 +2101,24 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the specified subnets from the set of configured subnets for the load balancer.

\n

After a subnet is removed, all EC2 instances registered with the load balancer \n in the removed subnet go into the OutOfService state. Then, \n the load balancer balances the traffic among the remaining routable subnets.

" + "smithy.api#documentation": "

Removes the specified subnets from the set of configured subnets for the load balancer.

\n

After a subnet is removed, all EC2 instances registered with the load balancer \n in the removed subnet go into the OutOfService state. Then, \n the load balancer balances the traffic among the remaining routable subnets.

", + "smithy.api#examples": [ + { + "title": "To detach a load balancer from a subnet", + "documentation": "This example detaches the specified load balancer from the specified subnet.", + "input": { + "LoadBalancerName": "my-load-balancer", + "Subnets": [ + "subnet-0ecac448" + ] + }, + "output": { + "Subnets": [ + "subnet-15aaab61" + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DetachLoadBalancerFromSubnetsInput": { @@ -1584,7 +2140,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DetachLoadBalancerFromSubnets.

" + "smithy.api#documentation": "

Contains the parameters for DetachLoadBalancerFromSubnets.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#DetachLoadBalancerFromSubnetsOutput": { @@ -1598,7 +2155,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of DetachLoadBalancerFromSubnets.

" + "smithy.api#documentation": "

Contains the output of DetachLoadBalancerFromSubnets.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#DisableAvailabilityZonesForLoadBalancer": { @@ -1618,7 +2176,24 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer\n in EC2-Classic or a default VPC.

\n

For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets.

\n

There must be at least one Availability Zone registered with a load balancer at all times. \n After an Availability Zone is removed, all instances registered with the load balancer that are in the removed\n Availability Zone go into the OutOfService state. Then, the load balancer attempts to equally balance\n the traffic among its remaining Availability Zones.

\n

For more information, see Add or Remove Availability Zones\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer\n in EC2-Classic or a default VPC.

\n

For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets.

\n

There must be at least one Availability Zone registered with a load balancer at all times. \n After an Availability Zone is removed, all instances registered with the load balancer that are in the removed\n Availability Zone go into the OutOfService state. Then, the load balancer attempts to equally balance\n the traffic among its remaining Availability Zones.

\n

For more information, see Add or Remove Availability Zones\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To disable an Availability Zone for a load balancer", + "documentation": "This example removes the specified Availability Zone from the set of Availability Zones for the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer", + "AvailabilityZones": [ + "us-west-2a" + ] + }, + "output": { + "AvailabilityZones": [ + "us-west-2b" + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#DuplicateAccessPointNameException": { @@ -1787,6 +2362,7 @@ "arnNamespace": "elasticloadbalancing", "cloudFormationName": "ElasticLoadBalancing", "cloudTrailEventSource": "elasticloadbalancing.amazonaws.com", + "docId": "elasticloadbalancing-2012-06-01", "endpointPrefix": "elasticloadbalancing" }, "aws.auth#sigv4": { @@ -1858,52 +2434,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1911,13 +2491,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1927,175 +2516,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elasticloadbalancing-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://elasticloadbalancing-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://elasticloadbalancing.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://elasticloadbalancing-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } + "ref": "UseFIPS" + }, + true ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -2104,72 +2601,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elasticloadbalancing.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://elasticloadbalancing.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://elasticloadbalancing-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "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://elasticloadbalancing.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://elasticloadbalancing.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://elasticloadbalancing.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2184,8 +2724,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2197,8 +2737,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2210,8 +2750,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2223,8 +2763,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2236,8 +2776,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2249,8 +2789,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2262,8 +2802,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2275,8 +2815,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2288,8 +2828,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2301,8 +2841,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2314,8 +2854,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2327,8 +2867,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2340,8 +2880,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2353,8 +2893,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2366,8 +2906,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2379,8 +2919,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2392,8 +2932,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2405,8 +2945,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2418,8 +2958,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2431,8 +2971,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2444,8 +2984,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2457,8 +2997,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2470,8 +3010,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2483,8 +3023,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2496,8 +3036,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2509,8 +3049,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2522,8 +3062,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2535,8 +3075,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2548,8 +3088,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2561,8 +3101,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2574,8 +3114,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2587,8 +3127,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2600,8 +3140,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2613,8 +3153,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2626,8 +3166,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2639,8 +3179,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2652,8 +3192,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2665,8 +3205,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2678,8 +3218,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2691,8 +3231,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2704,8 +3244,19 @@ }, "params": { "Region": "us-iso-west-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2717,8 +3268,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2730,8 +3292,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2743,8 +3316,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2756,8 +3340,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2769,8 +3353,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2781,8 +3365,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2793,10 +3377,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2817,7 +3407,25 @@ } ], "traits": { - "smithy.api#documentation": "

Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer\n in EC2-Classic or a default VPC.

\n

For load balancers in a non-default VPC, use AttachLoadBalancerToSubnets.

\n

The load balancer evenly distributes requests across all its registered Availability Zones \n that contain instances. For more information, see Add or Remove Availability Zones\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Adds the specified Availability Zones to the set of Availability Zones for the specified load balancer\n in EC2-Classic or a default VPC.

\n

For load balancers in a non-default VPC, use AttachLoadBalancerToSubnets.

\n

The load balancer evenly distributes requests across all its registered Availability Zones \n that contain instances. For more information, see Add or Remove Availability Zones\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To enable an Availability Zone for a load balancer", + "documentation": "This example adds the specified Availability Zone to the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer", + "AvailabilityZones": [ + "us-west-2b" + ] + }, + "output": { + "AvailabilityZones": [ + "us-west-2a", + "us-west-2b" + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#EndPointPort": { @@ -3427,7 +4035,29 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies the attributes of the specified load balancer.

\n

You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, and \n CrossZoneLoadBalancing by either enabling or disabling them. Or, you can modify the load balancer attribute \n ConnectionSettings by specifying an idle connection timeout value for your load balancer.

\n

For more information, see the following in the Classic Load Balancers Guide:

\n " + "smithy.api#documentation": "

Modifies the attributes of the specified load balancer.

\n

You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, and \n CrossZoneLoadBalancing by either enabling or disabling them. Or, you can modify the load balancer attribute \n ConnectionSettings by specifying an idle connection timeout value for your load balancer.

\n

For more information, see the following in the Classic Load Balancers Guide:

\n ", + "smithy.api#examples": [ + { + "title": "To enable cross-zone load balancing", + "documentation": "This example enables cross-zone load balancing for the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer", + "LoadBalancerAttributes": { + "CrossZoneLoadBalancing": { + "Enabled": true + } + } + }, + "output": { + "LoadBalancerName": "my-load-balancer", + "LoadBalancerAttributes": { + "CrossZoneLoadBalancing": { + "Enabled": true + } + } + } + } + ] } }, "com.amazonaws.elasticloadbalancing#ModifyLoadBalancerAttributesInput": { @@ -3449,7 +4079,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for ModifyLoadBalancerAttributes.

" + "smithy.api#documentation": "

Contains the parameters for ModifyLoadBalancerAttributes.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#ModifyLoadBalancerAttributesOutput": { @@ -3469,7 +4100,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of ModifyLoadBalancerAttributes.

" + "smithy.api#documentation": "

Contains the output of ModifyLoadBalancerAttributes.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#Name": { @@ -3770,7 +4402,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for RegisterInstancesWithLoadBalancer.

" + "smithy.api#documentation": "

Contains the parameters for RegisterInstancesWithLoadBalancer.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#RegisterEndPointsOutput": { @@ -3784,7 +4417,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output of RegisterInstancesWithLoadBalancer.

" + "smithy.api#documentation": "

Contains the output of RegisterInstancesWithLoadBalancer.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#RegisterInstancesWithLoadBalancer": { @@ -3804,7 +4438,34 @@ } ], "traits": { - "smithy.api#documentation": "

Adds the specified instances to the specified load balancer.

\n\n

The instance must be a running instance in the same network as the load balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic instances to that VPC and then register the linked EC2-Classic instances with the load balancer in the VPC.

\n\n

Note that RegisterInstanceWithLoadBalancer completes when the request has been registered.\n Instance registration takes a little time to complete. To check the state of the registered instances, use \n DescribeLoadBalancers or DescribeInstanceHealth.

\n \n

After the instance is registered, it starts receiving traffic\n and requests from the load balancer. Any instance that is not\n in one of the Availability Zones registered for the load balancer\n is moved to the OutOfService state. If an Availability Zone\n is added to the load balancer later, any instances registered with the\n load balancer move to the InService state.

\n\n

To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer.

\n \n

For more information, see Register or De-Register EC2 Instances\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Adds the specified instances to the specified load balancer.

\n\n

The instance must be a running instance in the same network as the load balancer (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic instances to that VPC and then register the linked EC2-Classic instances with the load balancer in the VPC.

\n\n

Note that RegisterInstanceWithLoadBalancer completes when the request has been registered.\n Instance registration takes a little time to complete. To check the state of the registered instances, use \n DescribeLoadBalancers or DescribeInstanceHealth.

\n \n

After the instance is registered, it starts receiving traffic\n and requests from the load balancer. Any instance that is not\n in one of the Availability Zones registered for the load balancer\n is moved to the OutOfService state. If an Availability Zone\n is added to the load balancer later, any instances registered with the\n load balancer move to the InService state.

\n\n

To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer.

\n \n

For more information, see Register or De-Register EC2 Instances\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To register instances with a load balancer", + "documentation": "This example registers the specified instance with the specified load balancer.", + "input": { + "LoadBalancerName": "my-load-balancer", + "Instances": [ + { + "InstanceId": "i-d6f6fae3" + } + ] + }, + "output": { + "Instances": [ + { + "InstanceId": "i-d6f6fae3" + }, + { + "InstanceId": "i-207d9717" + }, + { + "InstanceId": "i-afefb49b" + } + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#RemoveAvailabilityZonesInput": { @@ -3826,7 +4487,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for DisableAvailabilityZonesForLoadBalancer.

" + "smithy.api#documentation": "

Contains the parameters for DisableAvailabilityZonesForLoadBalancer.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#RemoveAvailabilityZonesOutput": { @@ -3840,7 +4502,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output for DisableAvailabilityZonesForLoadBalancer.

" + "smithy.api#documentation": "

Contains the output for DisableAvailabilityZonesForLoadBalancer.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#RemoveTags": { @@ -3857,7 +4520,23 @@ } ], "traits": { - "smithy.api#documentation": "

Removes one or more tags from the specified load balancer.

" + "smithy.api#documentation": "

Removes one or more tags from the specified load balancer.

", + "smithy.api#examples": [ + { + "title": "To remove tags from a load balancer", + "documentation": "This example removes the specified tag from the specified load balancer.", + "input": { + "LoadBalancerNames": [ + "my-load-balancer" + ], + "Tags": [ + { + "Key": "project" + } + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#RemoveTagsInput": { @@ -3879,14 +4558,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for RemoveTags.

" + "smithy.api#documentation": "

Contains the parameters for RemoveTags.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#RemoveTagsOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of RemoveTags.

" + "smithy.api#documentation": "

Contains the output of RemoveTags.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#S3BucketName": { @@ -3936,7 +4617,18 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate that was used on the same load balancer and port.

\n \n

For more information about updating your SSL certificate, see \n Replace the SSL Certificate for Your Load Balancer\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate that was used on the same load balancer and port.

\n \n

For more information about updating your SSL certificate, see \n Replace the SSL Certificate for Your Load Balancer\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To update the SSL certificate for an HTTPS listener", + "documentation": "This example replaces the existing SSL certificate for the specified HTTPS listener.", + "input": { + "LoadBalancerName": "my-load-balancer", + "LoadBalancerPort": 443, + "SSLCertificateId": "arn:aws:iam::123456789012:server-certificate/new-server-cert" + } + } + ] } }, "com.amazonaws.elasticloadbalancing#SetLoadBalancerListenerSSLCertificateInput": { @@ -3966,14 +4658,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for SetLoadBalancerListenerSSLCertificate.

" + "smithy.api#documentation": "

Contains the parameters for SetLoadBalancerListenerSSLCertificate.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#SetLoadBalancerListenerSSLCertificateOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of SetLoadBalancerListenerSSLCertificate.

" + "smithy.api#documentation": "

Contains the output of SetLoadBalancerListenerSSLCertificate.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#SetLoadBalancerPoliciesForBackendServer": { @@ -3996,7 +4690,20 @@ } ], "traits": { - "smithy.api#documentation": "

Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies. \n At this time, only the back-end server authentication policy type can be applied to the instance ports; this policy type is composed of multiple public key policies.

\n

Each time you use SetLoadBalancerPoliciesForBackendServer to enable the policies, \n use the PolicyNames parameter to list the policies that you want to enable.

\n

You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify that the policy \n is associated with the EC2 instance.

\n\n

For more information about enabling back-end instance authentication, see Configure Back-end Instance Authentication\n in the Classic Load Balancers Guide. For more information about Proxy Protocol, see \n Configure Proxy Protocol Support\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Replaces the set of policies associated with the specified port on which the EC2 instance is listening with a new set of policies. \n At this time, only the back-end server authentication policy type can be applied to the instance ports; this policy type is composed of multiple public key policies.

\n

Each time you use SetLoadBalancerPoliciesForBackendServer to enable the policies, \n use the PolicyNames parameter to list the policies that you want to enable.

\n

You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify that the policy \n is associated with the EC2 instance.

\n\n

For more information about enabling back-end instance authentication, see Configure Back-end Instance Authentication\n in the Classic Load Balancers Guide. For more information about Proxy Protocol, see \n Configure Proxy Protocol Support\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To replace the policies associated with a port for a backend instance", + "documentation": "This example replaces the policies that are currently associated with the specified port.", + "input": { + "LoadBalancerName": "my-load-balancer", + "InstancePort": 80, + "PolicyNames": [ + "my-ProxyProtocol-policy" + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#SetLoadBalancerPoliciesForBackendServerInput": { @@ -4025,14 +4732,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for SetLoadBalancerPoliciesForBackendServer.

" + "smithy.api#documentation": "

Contains the parameters for SetLoadBalancerPoliciesForBackendServer.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#SetLoadBalancerPoliciesForBackendServerOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of SetLoadBalancerPoliciesForBackendServer.

" + "smithy.api#documentation": "

Contains the output of SetLoadBalancerPoliciesForBackendServer.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#SetLoadBalancerPoliciesOfListener": { @@ -4058,7 +4767,20 @@ } ], "traits": { - "smithy.api#documentation": "

Replaces the current set of policies for the specified load balancer port with the specified set of policies.

\n

To enable back-end server authentication, use SetLoadBalancerPoliciesForBackendServer.

\n

For more information about setting policies, see\n Update the SSL Negotiation Configuration,\n Duration-Based Session Stickiness, and\n Application-Controlled Session Stickiness\n in the Classic Load Balancers Guide.

" + "smithy.api#documentation": "

Replaces the current set of policies for the specified load balancer port with the specified set of policies.

\n

To enable back-end server authentication, use SetLoadBalancerPoliciesForBackendServer.

\n

For more information about setting policies, see\n Update the SSL Negotiation Configuration,\n Duration-Based Session Stickiness, and\n Application-Controlled Session Stickiness\n in the Classic Load Balancers Guide.

", + "smithy.api#examples": [ + { + "title": "To replace the policies associated with a listener", + "documentation": "This example replaces the policies that are currently associated with the specified listener.", + "input": { + "LoadBalancerName": "my-load-balancer", + "LoadBalancerPort": 80, + "PolicyNames": [ + "my-SSLNegotiation-policy" + ] + } + } + ] } }, "com.amazonaws.elasticloadbalancing#SetLoadBalancerPoliciesOfListenerInput": { @@ -4088,14 +4810,16 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the parameters for SetLoadBalancePoliciesOfListener.

" + "smithy.api#documentation": "

Contains the parameters for SetLoadBalancePoliciesOfListener.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticloadbalancing#SetLoadBalancerPoliciesOfListenerOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Contains the output of SetLoadBalancePoliciesOfListener.

" + "smithy.api#documentation": "

Contains the output of SetLoadBalancePoliciesOfListener.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticloadbalancing#SourceSecurityGroup": { diff --git a/codegen/sdk-codegen/aws-models/elastic-transcoder.json b/codegen/sdk-codegen/aws-models/elastic-transcoder.json index 9d7d93789e9..56fb6c74c61 100644 --- a/codegen/sdk-codegen/aws-models/elastic-transcoder.json +++ b/codegen/sdk-codegen/aws-models/elastic-transcoder.json @@ -32,7 +32,7 @@ "com.amazonaws.elastictranscoder#AccessControl": { "type": "string", "traits": { - "smithy.api#pattern": "(^FullControl$)|(^Read$)|(^ReadAcp$)|(^WriteAcp$)" + "smithy.api#pattern": "^(^FullControl$)|(^Read$)|(^ReadAcp$)|(^WriteAcp$)$" } }, "com.amazonaws.elastictranscoder#AccessControls": { @@ -122,25 +122,25 @@ "com.amazonaws.elastictranscoder#Ascending": { "type": "string", "traits": { - "smithy.api#pattern": "(^true$)|(^false$)" + "smithy.api#pattern": "^(^true$)|(^false$)$" } }, "com.amazonaws.elastictranscoder#AspectRatio": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^1:1$)|(^4:3$)|(^3:2$)|(^16:9$)" + "smithy.api#pattern": "^(^auto$)|(^1:1$)|(^4:3$)|(^3:2$)|(^16:9$)$" } }, "com.amazonaws.elastictranscoder#AudioBitDepth": { "type": "string", "traits": { - "smithy.api#pattern": "(^8$)|(^16$)|(^24$)|(^32$)" + "smithy.api#pattern": "^(^8$)|(^16$)|(^24$)|(^32$)$" } }, "com.amazonaws.elastictranscoder#AudioBitOrder": { "type": "string", "traits": { - "smithy.api#pattern": "(^LittleEndian$)" + "smithy.api#pattern": "^(^LittleEndian$)$" } }, "com.amazonaws.elastictranscoder#AudioBitRate": { @@ -152,13 +152,13 @@ "com.amazonaws.elastictranscoder#AudioChannels": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^0$)|(^1$)|(^2$)" + "smithy.api#pattern": "^(^auto$)|(^0$)|(^1$)|(^2$)$" } }, "com.amazonaws.elastictranscoder#AudioCodec": { "type": "string", "traits": { - "smithy.api#pattern": "(^AAC$)|(^vorbis$)|(^mp3$)|(^mp2$)|(^pcm$)|(^flac$)" + "smithy.api#pattern": "^(^AAC$)|(^vorbis$)|(^mp3$)|(^mp2$)|(^pcm$)|(^flac$)$" } }, "com.amazonaws.elastictranscoder#AudioCodecOptions": { @@ -196,13 +196,13 @@ "com.amazonaws.elastictranscoder#AudioCodecProfile": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^AAC-LC$)|(^HE-AAC$)|(^HE-AACv2$)" + "smithy.api#pattern": "^(^auto$)|(^AAC-LC$)|(^HE-AAC$)|(^HE-AACv2$)$" } }, "com.amazonaws.elastictranscoder#AudioPackingMode": { "type": "string", "traits": { - "smithy.api#pattern": "(^SingleTrack$)|(^OneChannelPerTrack$)|(^OneChannelPerTrackWithMosTo8Tracks$)" + "smithy.api#pattern": "^(^SingleTrack$)|(^OneChannelPerTrack$)|(^OneChannelPerTrackWithMosTo8Tracks$)$" } }, "com.amazonaws.elastictranscoder#AudioParameters": { @@ -252,19 +252,19 @@ "com.amazonaws.elastictranscoder#AudioSampleRate": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^22050$)|(^32000$)|(^44100$)|(^48000$)|(^96000$)|(^192000$)" + "smithy.api#pattern": "^(^auto$)|(^22050$)|(^32000$)|(^44100$)|(^48000$)|(^96000$)|(^192000$)$" } }, "com.amazonaws.elastictranscoder#AudioSigned": { "type": "string", "traits": { - "smithy.api#pattern": "(^Unsigned$)|(^Signed$)" + "smithy.api#pattern": "^(^Unsigned$)|(^Signed$)$" } }, "com.amazonaws.elastictranscoder#Base64EncodedString": { "type": "string", "traits": { - "smithy.api#pattern": "^$|(^(?:[A-Za-z0-9\\+/]{4})*(?:[A-Za-z0-9\\+/]{2}==|[A-Za-z0-9\\+/]{3}=)?$)" + "smithy.api#pattern": "^$|(^(?:[A-Za-z0-9\\+/]{4})*(?:[A-Za-z0-9\\+/]{2}==|[A-Za-z0-9\\+/]{3}=)?$)$" } }, "com.amazonaws.elastictranscoder#BucketName": { @@ -323,14 +323,16 @@ } }, "traits": { - "smithy.api#documentation": "

The CancelJobRequest structure.

" + "smithy.api#documentation": "

The CancelJobRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#CancelJobResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The response body contains a JSON object. If the job is successfully canceled, the value\n of Success is true.

" + "smithy.api#documentation": "

The response body contains a JSON object. If the job is successfully canceled, the value\n of Success is true.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#CaptionFormat": { @@ -362,13 +364,13 @@ "com.amazonaws.elastictranscoder#CaptionFormatFormat": { "type": "string", "traits": { - "smithy.api#pattern": "(^mov-text$)|(^srt$)|(^scc$)|(^webvtt$)|(^dfxp$)|(^cea-708$)" + "smithy.api#pattern": "^(^mov-text$)|(^srt$)|(^scc$)|(^webvtt$)|(^dfxp$)|(^cea-708$)$" } }, "com.amazonaws.elastictranscoder#CaptionFormatPattern": { "type": "string", "traits": { - "smithy.api#pattern": "(^$)|(^.*\\{language\\}.*$)" + "smithy.api#pattern": "^(^$)|(^.*\\{language\\}.*$)$" } }, "com.amazonaws.elastictranscoder#CaptionFormats": { @@ -386,7 +388,7 @@ "com.amazonaws.elastictranscoder#CaptionMergePolicy": { "type": "string", "traits": { - "smithy.api#pattern": "(^MergeOverride$)|(^MergeRetain$)|(^Override$)" + "smithy.api#pattern": "^(^MergeOverride$)|(^MergeRetain$)|(^Override$)$" } }, "com.amazonaws.elastictranscoder#CaptionSource": { @@ -743,7 +745,8 @@ } }, "traits": { - "smithy.api#documentation": "

The CreateJobRequest structure.

" + "smithy.api#documentation": "

The CreateJobRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#CreateJobResponse": { @@ -757,7 +760,8 @@ } }, "traits": { - "smithy.api#documentation": "

The CreateJobResponse structure.

" + "smithy.api#documentation": "

The CreateJobResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#CreatePipeline": { @@ -853,7 +857,8 @@ } }, "traits": { - "smithy.api#documentation": "

The CreatePipelineRequest structure.

" + "smithy.api#documentation": "

The CreatePipelineRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#CreatePipelineResponse": { @@ -873,7 +878,8 @@ } }, "traits": { - "smithy.api#documentation": "

When you create a pipeline, Elastic Transcoder returns the values that you specified in the request.

" + "smithy.api#documentation": "

When you create a pipeline, Elastic Transcoder returns the values that you specified in the request.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#CreatePreset": { @@ -953,7 +959,8 @@ } }, "traits": { - "smithy.api#documentation": "

The CreatePresetRequest structure.

" + "smithy.api#documentation": "

The CreatePresetRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#CreatePresetResponse": { @@ -973,7 +980,8 @@ } }, "traits": { - "smithy.api#documentation": "

The CreatePresetResponse structure.

" + "smithy.api#documentation": "

The CreatePresetResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#DeletePipeline": { @@ -1026,14 +1034,16 @@ } }, "traits": { - "smithy.api#documentation": "

The DeletePipelineRequest structure.

" + "smithy.api#documentation": "

The DeletePipelineRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#DeletePipelineResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The DeletePipelineResponse structure.

" + "smithy.api#documentation": "

The DeletePipelineResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#DeletePreset": { @@ -1083,14 +1093,16 @@ } }, "traits": { - "smithy.api#documentation": "

The DeletePresetRequest structure.

" + "smithy.api#documentation": "

The DeletePresetRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#DeletePresetResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The DeletePresetResponse structure.

" + "smithy.api#documentation": "

The DeletePresetResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#Description": { @@ -1149,7 +1161,7 @@ "com.amazonaws.elastictranscoder#DigitsOrAuto": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^\\d{2,4}$)" + "smithy.api#pattern": "^(^auto$)|(^\\d{2,4}$)$" } }, "com.amazonaws.elastictranscoder#Encryption": { @@ -1187,7 +1199,7 @@ "com.amazonaws.elastictranscoder#EncryptionMode": { "type": "string", "traits": { - "smithy.api#pattern": "(^s3$)|(^s3-aws-kms$)|(^aes-cbc-pkcs7$)|(^aes-ctr$)|(^aes-gcm$)" + "smithy.api#pattern": "^(^s3$)|(^s3-aws-kms$)|(^aes-cbc-pkcs7$)|(^aes-ctr$)|(^aes-gcm$)$" } }, "com.amazonaws.elastictranscoder#EtsCustomerService": { @@ -1252,6 +1264,7 @@ "arnNamespace": "elastictranscoder", "cloudFormationName": "ElasticTranscoder", "cloudTrailEventSource": "elastictranscoder.amazonaws.com", + "docId": "elastictranscoder-2012-09-25", "endpointPrefix": "elastictranscoder" }, "aws.auth#sigv4": { @@ -1323,52 +1336,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1376,13 +1393,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1392,224 +1418,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://elastictranscoder-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://elastictranscoder-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://elastictranscoder-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://elastictranscoder-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elastictranscoder.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://elastictranscoder.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://elastictranscoder.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://elastictranscoder.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1624,8 +1601,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1637,8 +1614,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1650,8 +1627,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1663,8 +1640,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1676,8 +1653,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1689,8 +1666,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1702,8 +1679,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1715,8 +1692,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1728,8 +1705,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1741,8 +1718,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1754,8 +1731,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1767,8 +1744,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1780,8 +1757,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1793,8 +1770,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1806,8 +1783,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1819,8 +1796,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1832,8 +1809,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1845,8 +1822,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1858,8 +1835,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1871,8 +1859,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1884,8 +1883,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1897,8 +1907,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1910,8 +1931,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1923,8 +1944,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1936,8 +1957,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1948,8 +1969,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1960,10 +1981,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1991,7 +2018,7 @@ "com.amazonaws.elastictranscoder#FixedGOP": { "type": "string", "traits": { - "smithy.api#pattern": "(^true$)|(^false$)" + "smithy.api#pattern": "^(^true$)|(^false$)$" } }, "com.amazonaws.elastictranscoder#FloatString": { @@ -2003,7 +2030,7 @@ "com.amazonaws.elastictranscoder#FrameRate": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^10$)|(^15$)|(^23.97$)|(^24$)|(^25$)|(^29.97$)|(^30$)|(^50$)|(^60$)" + "smithy.api#pattern": "^(^auto$)|(^10$)|(^15$)|(^23.97$)|(^24$)|(^25$)|(^29.97$)|(^30$)|(^50$)|(^60$)$" } }, "com.amazonaws.elastictranscoder#Grantee": { @@ -2018,7 +2045,7 @@ "com.amazonaws.elastictranscoder#GranteeType": { "type": "string", "traits": { - "smithy.api#pattern": "(^Canonical$)|(^Email$)|(^Group$)" + "smithy.api#pattern": "^(^Canonical$)|(^Email$)|(^Group$)$" } }, "com.amazonaws.elastictranscoder#HlsContentProtection": { @@ -2068,13 +2095,13 @@ "com.amazonaws.elastictranscoder#HlsContentProtectionMethod": { "type": "string", "traits": { - "smithy.api#pattern": "(^aes-128$)" + "smithy.api#pattern": "^(^aes-128$)$" } }, "com.amazonaws.elastictranscoder#HorizontalAlign": { "type": "string", "traits": { - "smithy.api#pattern": "(^Left$)|(^Right$)|(^Center$)" + "smithy.api#pattern": "^(^Left$)|(^Right$)|(^Center$)$" } }, "com.amazonaws.elastictranscoder#Id": { @@ -2121,7 +2148,7 @@ "com.amazonaws.elastictranscoder#Interlaced": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^true$)|(^false$)" + "smithy.api#pattern": "^(^auto$)|(^true$)|(^false$)$" } }, "com.amazonaws.elastictranscoder#InternalServiceException": { @@ -2242,7 +2269,7 @@ "com.amazonaws.elastictranscoder#JobContainer": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^3gp$)|(^asf$)|(^avi$)|(^divx$)|(^flv$)|(^mkv$)|(^mov$)|(^mp4$)|(^mpeg$)|(^mpeg-ps$)|(^mpeg-ts$)|(^mxf$)|(^ogg$)|(^ts$)|(^vob$)|(^wav$)|(^webm$)|(^mp3$)|(^m4a$)|(^aac$)" + "smithy.api#pattern": "^(^auto$)|(^3gp$)|(^asf$)|(^avi$)|(^divx$)|(^flv$)|(^mkv$)|(^mov$)|(^mp4$)|(^mpeg$)|(^mpeg-ps$)|(^mpeg-ts$)|(^mxf$)|(^ogg$)|(^ts$)|(^vob$)|(^wav$)|(^webm$)|(^mp3$)|(^m4a$)|(^aac$)$" } }, "com.amazonaws.elastictranscoder#JobInput": { @@ -2469,7 +2496,7 @@ "com.amazonaws.elastictranscoder#JobStatus": { "type": "string", "traits": { - "smithy.api#pattern": "(^Submitted$)|(^Progressing$)|(^Complete$)|(^Canceled$)|(^Error$)" + "smithy.api#pattern": "^(^Submitted$)|(^Progressing$)|(^Complete$)|(^Canceled$)|(^Error$)$" } }, "com.amazonaws.elastictranscoder#JobWatermark": { @@ -2513,7 +2540,7 @@ "com.amazonaws.elastictranscoder#JpgOrPng": { "type": "string", "traits": { - "smithy.api#pattern": "(^jpg$)|(^png$)" + "smithy.api#pattern": "^(^jpg$)|(^png$)$" } }, "com.amazonaws.elastictranscoder#Key": { @@ -2537,13 +2564,13 @@ "com.amazonaws.elastictranscoder#KeyIdGuid": { "type": "string", "traits": { - "smithy.api#pattern": "(^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$)|(^[0-9A-Fa-f]{32}$)" + "smithy.api#pattern": "^(^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$)|(^[0-9A-Fa-f]{32}$)$" } }, "com.amazonaws.elastictranscoder#KeyStoragePolicy": { "type": "string", "traits": { - "smithy.api#pattern": "(^NoStore$)|(^WithVariantPlaylists$)" + "smithy.api#pattern": "^(^NoStore$)|(^WithVariantPlaylists$)$" } }, "com.amazonaws.elastictranscoder#KeyframesMaxDist": { @@ -2634,7 +2661,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ListJobsByPipelineRequest structure.

" + "smithy.api#documentation": "

The ListJobsByPipelineRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#ListJobsByPipelineResponse": { @@ -2654,7 +2682,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ListJobsByPipelineResponse structure.

" + "smithy.api#documentation": "

The ListJobsByPipelineResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#ListJobsByStatus": { @@ -2723,7 +2752,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ListJobsByStatusRequest structure.

" + "smithy.api#documentation": "

The ListJobsByStatusRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#ListJobsByStatusResponse": { @@ -2743,7 +2773,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n The ListJobsByStatusResponse structure.\n

" + "smithy.api#documentation": "

\n The ListJobsByStatusResponse structure.\n

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#ListPipelines": { @@ -2801,7 +2832,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ListPipelineRequest structure.

" + "smithy.api#documentation": "

The ListPipelineRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#ListPipelinesResponse": { @@ -2821,7 +2853,8 @@ } }, "traits": { - "smithy.api#documentation": "

A list of the pipelines associated with the current AWS account.

" + "smithy.api#documentation": "

A list of the pipelines associated with the current AWS account.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#ListPresets": { @@ -2879,7 +2912,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ListPresetsRequest structure.

" + "smithy.api#documentation": "

The ListPresetsRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#ListPresetsResponse": { @@ -2899,7 +2933,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ListPresetsResponse structure.

" + "smithy.api#documentation": "

The ListPresetsResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#LongKey": { @@ -2914,13 +2949,13 @@ "com.amazonaws.elastictranscoder#MaxFrameRate": { "type": "string", "traits": { - "smithy.api#pattern": "(^10$)|(^15$)|(^23.97$)|(^24$)|(^25$)|(^29.97$)|(^30$)|(^50$)|(^60$)" + "smithy.api#pattern": "^(^10$)|(^15$)|(^23.97$)|(^24$)|(^25$)|(^29.97$)|(^30$)|(^50$)|(^60$)$" } }, "com.amazonaws.elastictranscoder#MergePolicy": { "type": "string", "traits": { - "smithy.api#pattern": "(^Replace$)|(^Prepend$)|(^Append$)|(^Fallback$)" + "smithy.api#pattern": "^(^Replace$)|(^Prepend$)|(^Append$)|(^Fallback$)$" } }, "com.amazonaws.elastictranscoder#Name": { @@ -2935,7 +2970,7 @@ "com.amazonaws.elastictranscoder#NonEmptyBase64EncodedString": { "type": "string", "traits": { - "smithy.api#pattern": "(^(?:[A-Za-z0-9\\+/]{4})*(?:[A-Za-z0-9\\+/]{2}==|[A-Za-z0-9\\+/]{3}=)?$)" + "smithy.api#pattern": "^(^(?:[A-Za-z0-9\\+/]{4})*(?:[A-Za-z0-9\\+/]{2}==|[A-Za-z0-9\\+/]{3}=)?$)$" } }, "com.amazonaws.elastictranscoder#Notifications": { @@ -3006,7 +3041,7 @@ "com.amazonaws.elastictranscoder#PaddingPolicy": { "type": "string", "traits": { - "smithy.api#pattern": "(^Pad$)|(^NoPad$)" + "smithy.api#pattern": "^(^Pad$)|(^NoPad$)$" } }, "com.amazonaws.elastictranscoder#Permission": { @@ -3150,7 +3185,7 @@ "com.amazonaws.elastictranscoder#PipelineStatus": { "type": "string", "traits": { - "smithy.api#pattern": "(^Active$)|(^Paused$)" + "smithy.api#pattern": "^(^Active$)|(^Paused$)$" } }, "com.amazonaws.elastictranscoder#Pipelines": { @@ -3162,7 +3197,7 @@ "com.amazonaws.elastictranscoder#PixelsOrPercent": { "type": "string", "traits": { - "smithy.api#pattern": "(^\\d{1,3}(\\.\\d{0,5})?%$)|(^\\d{1,4}?px$)" + "smithy.api#pattern": "^(^\\d{1,3}(\\.\\d{0,5})?%$)|(^\\d{1,4}?px$)$" } }, "com.amazonaws.elastictranscoder#PlayReadyDrm": { @@ -3212,7 +3247,7 @@ "com.amazonaws.elastictranscoder#PlayReadyDrmFormatString": { "type": "string", "traits": { - "smithy.api#pattern": "(^microsoft$)|(^discretix-3.0$)" + "smithy.api#pattern": "^(^microsoft$)|(^discretix-3.0$)$" } }, "com.amazonaws.elastictranscoder#Playlist": { @@ -3268,7 +3303,7 @@ "com.amazonaws.elastictranscoder#PlaylistFormat": { "type": "string", "traits": { - "smithy.api#pattern": "(^HLSv3$)|(^HLSv4$)|(^Smooth$)|(^MPEG-DASH$)" + "smithy.api#pattern": "^(^HLSv3$)|(^HLSv4$)|(^Smooth$)|(^MPEG-DASH$)$" } }, "com.amazonaws.elastictranscoder#Playlists": { @@ -3342,13 +3377,13 @@ "com.amazonaws.elastictranscoder#PresetContainer": { "type": "string", "traits": { - "smithy.api#pattern": "(^mp4$)|(^ts$)|(^webm$)|(^mp3$)|(^flac$)|(^oga$)|(^ogg$)|(^fmp4$)|(^mpg$)|(^flv$)|(^gif$)|(^mxf$)|(^wav$)|(^mp2$)" + "smithy.api#pattern": "^(^mp4$)|(^ts$)|(^webm$)|(^mp3$)|(^flac$)|(^oga$)|(^ogg$)|(^fmp4$)|(^mpg$)|(^flv$)|(^gif$)|(^mxf$)|(^wav$)|(^mp2$)$" } }, "com.amazonaws.elastictranscoder#PresetType": { "type": "string", "traits": { - "smithy.api#pattern": "(^System$)|(^Custom$)" + "smithy.api#pattern": "^(^System$)|(^Custom$)$" } }, "com.amazonaws.elastictranscoder#PresetWatermark": { @@ -3524,7 +3559,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ReadJobRequest structure.

" + "smithy.api#documentation": "

The ReadJobRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#ReadJobResponse": { @@ -3538,7 +3574,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ReadJobResponse structure.

" + "smithy.api#documentation": "

The ReadJobResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#ReadPipeline": { @@ -3588,7 +3625,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ReadPipelineRequest structure.

" + "smithy.api#documentation": "

The ReadPipelineRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#ReadPipelineResponse": { @@ -3608,7 +3646,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ReadPipelineResponse structure.

" + "smithy.api#documentation": "

The ReadPipelineResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#ReadPreset": { @@ -3658,7 +3697,8 @@ } }, "traits": { - "smithy.api#documentation": "

The ReadPresetRequest structure.

" + "smithy.api#documentation": "

The ReadPresetRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#ReadPresetResponse": { @@ -3672,13 +3712,14 @@ } }, "traits": { - "smithy.api#documentation": "

The ReadPresetResponse structure.

" + "smithy.api#documentation": "

The ReadPresetResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#Resolution": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^\\d{1,5}x\\d{1,5}$)" + "smithy.api#pattern": "^(^auto$)|(^\\d{1,5}x\\d{1,5}$)$" } }, "com.amazonaws.elastictranscoder#ResourceInUseException": { @@ -3722,19 +3763,19 @@ "com.amazonaws.elastictranscoder#Rotate": { "type": "string", "traits": { - "smithy.api#pattern": "(^auto$)|(^0$)|(^90$)|(^180$)|(^270$)" + "smithy.api#pattern": "^(^auto$)|(^0$)|(^90$)|(^180$)|(^270$)$" } }, "com.amazonaws.elastictranscoder#SizingPolicy": { "type": "string", "traits": { - "smithy.api#pattern": "(^Fit$)|(^Fill$)|(^Stretch$)|(^Keep$)|(^ShrinkToFit$)|(^ShrinkToFill$)" + "smithy.api#pattern": "^(^Fit$)|(^Fill$)|(^Stretch$)|(^Keep$)|(^ShrinkToFit$)|(^ShrinkToFill$)$" } }, "com.amazonaws.elastictranscoder#SnsTopic": { "type": "string", "traits": { - "smithy.api#pattern": "(^$)|(^arn:aws:sns:.*:\\w{12}:.+$)" + "smithy.api#pattern": "^(^$)|(^arn:aws:sns:.*:\\w{12}:.+$)$" } }, "com.amazonaws.elastictranscoder#SnsTopics": { @@ -3752,7 +3793,7 @@ "com.amazonaws.elastictranscoder#StorageClass": { "type": "string", "traits": { - "smithy.api#pattern": "(^ReducedRedundancy$)|(^Standard$)" + "smithy.api#pattern": "^(^ReducedRedundancy$)|(^Standard$)$" } }, "com.amazonaws.elastictranscoder#String": { @@ -3761,13 +3802,13 @@ "com.amazonaws.elastictranscoder#Success": { "type": "string", "traits": { - "smithy.api#pattern": "(^true$)|(^false$)" + "smithy.api#pattern": "^(^true$)|(^false$)$" } }, "com.amazonaws.elastictranscoder#Target": { "type": "string", "traits": { - "smithy.api#pattern": "(^Content$)|(^Frame$)" + "smithy.api#pattern": "^(^Content$)|(^Frame$)$" } }, "com.amazonaws.elastictranscoder#TestRole": { @@ -3839,7 +3880,8 @@ }, "traits": { "smithy.api#deprecated": {}, - "smithy.api#documentation": "

The TestRoleRequest structure.

" + "smithy.api#documentation": "

The TestRoleRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#TestRoleResponse": { @@ -3860,13 +3902,14 @@ }, "traits": { "smithy.api#deprecated": {}, - "smithy.api#documentation": "

The TestRoleResponse structure.

" + "smithy.api#documentation": "

The TestRoleResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#ThumbnailPattern": { "type": "string", "traits": { - "smithy.api#pattern": "(^$)|(^.*\\{count\\}.*$)" + "smithy.api#pattern": "^(^$)|(^.*\\{count\\}.*$)$" } }, "com.amazonaws.elastictranscoder#ThumbnailResolution": { @@ -3934,13 +3977,13 @@ "com.amazonaws.elastictranscoder#Time": { "type": "string", "traits": { - "smithy.api#pattern": "(^\\d{1,5}(\\.\\d{0,3})?$)|(^([0-1]?[0-9]:|2[0-3]:)?([0-5]?[0-9]:)?[0-5]?[0-9](\\.\\d{0,3})?$)" + "smithy.api#pattern": "^(^\\d{1,5}(\\.\\d{0,3})?$)|(^([0-1]?[0-9]:|2[0-3]:)?([0-5]?[0-9]:)?[0-5]?[0-9](\\.\\d{0,3})?$)$" } }, "com.amazonaws.elastictranscoder#TimeOffset": { "type": "string", "traits": { - "smithy.api#pattern": "(^[+-]?\\d{1,5}(\\.\\d{0,3})?$)|(^[+-]?([0-1]?[0-9]:|2[0-3]:)?([0-5]?[0-9]:)?[0-5]?[0-9](\\.\\d{0,3})?$)" + "smithy.api#pattern": "^(^[+-]?\\d{1,5}(\\.\\d{0,3})?$)|(^[+-]?([0-1]?[0-9]:|2[0-3]:)?([0-5]?[0-9]:)?[0-5]?[0-9](\\.\\d{0,3})?$)$" } }, "com.amazonaws.elastictranscoder#TimeSpan": { @@ -4083,7 +4126,8 @@ } }, "traits": { - "smithy.api#documentation": "

The UpdatePipelineNotificationsRequest structure.

" + "smithy.api#documentation": "

The UpdatePipelineNotificationsRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#UpdatePipelineNotificationsResponse": { @@ -4097,7 +4141,8 @@ } }, "traits": { - "smithy.api#documentation": "

The UpdatePipelineNotificationsResponse structure.

" + "smithy.api#documentation": "

The UpdatePipelineNotificationsResponse structure.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#UpdatePipelineRequest": { @@ -4155,7 +4200,8 @@ } }, "traits": { - "smithy.api#documentation": "

The UpdatePipelineRequest structure.

" + "smithy.api#documentation": "

The UpdatePipelineRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#UpdatePipelineResponse": { @@ -4175,7 +4221,8 @@ } }, "traits": { - "smithy.api#documentation": "

When you update a pipeline, Elastic Transcoder returns the values that you specified in the request.

" + "smithy.api#documentation": "

When you update a pipeline, Elastic Transcoder returns the values that you specified in the request.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#UpdatePipelineStatus": { @@ -4235,7 +4282,8 @@ } }, "traits": { - "smithy.api#documentation": "

The UpdatePipelineStatusRequest structure.

" + "smithy.api#documentation": "

The UpdatePipelineStatusRequest structure.

", + "smithy.api#input": {} } }, "com.amazonaws.elastictranscoder#UpdatePipelineStatusResponse": { @@ -4249,7 +4297,8 @@ } }, "traits": { - "smithy.api#documentation": "

When you update status for a pipeline,\n Elastic Transcoder returns the values that you specified in the request.

" + "smithy.api#documentation": "

When you update status for a pipeline,\n Elastic Transcoder returns the values that you specified in the request.

", + "smithy.api#output": {} } }, "com.amazonaws.elastictranscoder#UserMetadata": { @@ -4280,19 +4329,19 @@ "com.amazonaws.elastictranscoder#VerticalAlign": { "type": "string", "traits": { - "smithy.api#pattern": "(^Top$)|(^Bottom$)|(^Center$)" + "smithy.api#pattern": "^(^Top$)|(^Bottom$)|(^Center$)$" } }, "com.amazonaws.elastictranscoder#VideoBitRate": { "type": "string", "traits": { - "smithy.api#pattern": "(^\\d{2,5}$)|(^auto$)" + "smithy.api#pattern": "^(^\\d{2,5}$)|(^auto$)$" } }, "com.amazonaws.elastictranscoder#VideoCodec": { "type": "string", "traits": { - "smithy.api#pattern": "(^H\\.264$)|(^vp8$)|(^vp9$)|(^mpeg2$)|(^gif$)" + "smithy.api#pattern": "^(^H\\.264$)|(^vp8$)|(^vp9$)|(^mpeg2$)|(^gif$)$" } }, "com.amazonaws.elastictranscoder#VideoParameters": { @@ -4426,13 +4475,13 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "(^.{1,1020}.jpg$)|(^.{1,1019}.jpeg$)|(^.{1,1020}.png$)" + "smithy.api#pattern": "^(^.{1,1020}.jpg$)|(^.{1,1019}.jpeg$)|(^.{1,1020}.png$)$" } }, "com.amazonaws.elastictranscoder#WatermarkSizingPolicy": { "type": "string", "traits": { - "smithy.api#pattern": "(^Fit$)|(^Stretch$)|(^ShrinkToFit$)" + "smithy.api#pattern": "^(^Fit$)|(^Stretch$)|(^ShrinkToFit$)$" } }, "com.amazonaws.elastictranscoder#ZeroTo255String": { diff --git a/codegen/sdk-codegen/aws-models/elasticache.json b/codegen/sdk-codegen/aws-models/elasticache.json index e50ed4082f0..3b678d9c797 100644 --- a/codegen/sdk-codegen/aws-models/elasticache.json +++ b/codegen/sdk-codegen/aws-models/elasticache.json @@ -116,7 +116,38 @@ } ], "traits": { - "smithy.api#documentation": "

A tag is a key-value pair where the key and value are case-sensitive. You can use tags\n to categorize and track all your ElastiCache resources, with the exception of global\n replication group. When you add or remove tags on replication groups, those actions will\n be replicated to all nodes in the replication group. For more information, see Resource-level permissions.

\n

For example, you can use cost-allocation tags to your ElastiCache resources, Amazon\n generates a cost allocation report as a comma-separated value (CSV) file with your usage\n and costs aggregated by your tags. You can apply tags that represent business categories\n (such as cost centers, application names, or owners) to organize your costs across\n multiple services.

\n

For more information, see Using Cost Allocation Tags in\n Amazon ElastiCache in the ElastiCache User\n Guide.

" + "smithy.api#documentation": "

A tag is a key-value pair where the key and value are case-sensitive. You can use tags\n to categorize and track all your ElastiCache resources, with the exception of global\n replication group. When you add or remove tags on replication groups, those actions will\n be replicated to all nodes in the replication group. For more information, see Resource-level permissions.

\n

For example, you can use cost-allocation tags to your ElastiCache resources, Amazon\n generates a cost allocation report as a comma-separated value (CSV) file with your usage\n and costs aggregated by your tags. You can apply tags that represent business categories\n (such as cost centers, application names, or owners) to organize your costs across\n multiple services.

\n

For more information, see Using Cost Allocation Tags in\n Amazon ElastiCache in the ElastiCache User\n Guide.

", + "smithy.api#examples": [ + { + "title": "AddTagsToResource", + "documentation": "Adds up to 10 tags, key/value pairs, to a cluster or snapshot resource.", + "input": { + "ResourceName": "arn:aws:elasticache:us-east-1:1234567890:cluster:my-mem-cluster", + "Tags": [ + { + "Value": "20150202", + "Key": "APIVersion" + }, + { + "Value": "ElastiCache", + "Key": "Service" + } + ] + }, + "output": { + "TagList": [ + { + "Value": "20150202", + "Key": "APIVersion" + }, + { + "Value": "ElastiCache", + "Key": "Service" + } + ] + } + } + ] } }, "com.amazonaws.elasticache#AddTagsToResourceMessage": { @@ -138,7 +169,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of an AddTagsToResource operation.

" + "smithy.api#documentation": "

Represents the input of an AddTagsToResource operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#AllowedNodeGroupId": { @@ -168,7 +200,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the allowed node types you can use to modify your cluster or replication\n group.

" + "smithy.api#documentation": "

Represents the allowed node types you can use to modify your cluster or replication\n group.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#AmazonElastiCacheV9": { @@ -451,52 +484,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -504,13 +541,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -520,92 +566,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://elasticache-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://elasticache-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -614,155 +651,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://elasticache.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://elasticache-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://elasticache.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://elasticache-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elasticache.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://elasticache.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://elasticache.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://elasticache.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1609,7 +1606,18 @@ } ], "traits": { - "smithy.api#documentation": "

Allows network ingress to a cache security group. Applications using ElastiCache must\n be running on Amazon EC2, and Amazon EC2 security groups are used as the authorization\n mechanism.

\n \n

You cannot authorize ingress from an Amazon EC2 security group in one region to an\n ElastiCache cluster in another region.

\n
" + "smithy.api#documentation": "

Allows network ingress to a cache security group. Applications using ElastiCache must\n be running on Amazon EC2, and Amazon EC2 security groups are used as the authorization\n mechanism.

\n \n

You cannot authorize ingress from an Amazon EC2 security group in one region to an\n ElastiCache cluster in another region.

\n
", + "smithy.api#examples": [ + { + "title": "AuthorizeCacheCacheSecurityGroupIngress", + "documentation": "Allows network ingress to a cache security group. Applications using ElastiCache must be running on Amazon EC2. Amazon EC2 security groups are used as the authorization mechanism.", + "input": { + "CacheSecurityGroupName": "my-sec-grp", + "EC2SecurityGroupName": "my-ec2-sec-grp", + "EC2SecurityGroupOwnerId": "1234567890" + } + } + ] } }, "com.amazonaws.elasticache#AuthorizeCacheSecurityGroupIngressMessage": { @@ -1638,7 +1646,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of an AuthorizeCacheSecurityGroupIngress operation.

" + "smithy.api#documentation": "

Represents the input of an AuthorizeCacheSecurityGroupIngress operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#AuthorizeCacheSecurityGroupIngressResult": { @@ -1749,6 +1758,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#BatchStopUpdateAction": { @@ -1793,6 +1805,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#Boolean": { @@ -2064,7 +2079,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeCacheClusters operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeCacheClusters operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#CacheClusterNotFoundFault": { @@ -2148,7 +2164,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeCacheEngineVersions\n operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeCacheEngineVersions\n operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#CacheNode": { @@ -2573,7 +2590,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeCacheParameterGroups operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeCacheParameterGroups operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#CacheSecurityGroup": { @@ -2677,7 +2695,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeCacheSecurityGroups operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeCacheSecurityGroups operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#CacheSecurityGroupNameList": { @@ -2827,7 +2846,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeCacheSubnetGroups operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeCacheSubnetGroups operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#CacheSubnetGroupNotFoundFault": { @@ -3010,6 +3030,9 @@ "smithy.api#documentation": "

Forces the migration to stop without ensuring that data is in sync. It is recommended\n to use this option only to abort the migration and not recommended when application\n wants to continue migration to ElastiCache.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CompleteMigrationResponse": { @@ -3090,7 +3113,48 @@ } ], "traits": { - "smithy.api#documentation": "

Makes a copy of an existing snapshot.

\n \n

This operation is valid for Redis only.

\n
\n \n

Users or groups that have permissions to use the CopySnapshot\n operation can create their own Amazon S3 buckets and copy snapshots to it. To\n control access to your snapshots, use an IAM policy to control who has the ability\n to use the CopySnapshot operation. For more information about using IAM\n to control the use of ElastiCache operations, see Exporting\n Snapshots and Authentication & Access\n Control.

\n
\n

You could receive the following error messages.

\n

\n Error Messages\n

\n " + "smithy.api#documentation": "

Makes a copy of an existing snapshot.

\n \n

This operation is valid for Redis only.

\n
\n \n

Users or groups that have permissions to use the CopySnapshot\n operation can create their own Amazon S3 buckets and copy snapshots to it. To\n control access to your snapshots, use an IAM policy to control who has the ability\n to use the CopySnapshot operation. For more information about using IAM\n to control the use of ElastiCache operations, see Exporting\n Snapshots and Authentication & Access\n Control.

\n
\n

You could receive the following error messages.

\n

\n Error Messages\n

\n ", + "smithy.api#examples": [ + { + "title": "CopySnapshot", + "documentation": "Copies a snapshot to a specified name.", + "input": { + "SourceSnapshotName": "my-snapshot", + "TargetSnapshotName": "my-snapshot-copy", + "TargetBucket": "" + }, + "output": { + "Snapshot": { + "Engine": "redis", + "CacheParameterGroupName": "default.redis3.2", + "VpcId": "vpc-3820329f3", + "CacheClusterId": "my-redis4", + "SnapshotRetentionLimit": 7, + "NumCacheNodes": 1, + "SnapshotName": "my-snapshot-copy", + "CacheClusterCreateTime": "2016-12-21T22:24:04.955Z", + "AutoMinorVersionUpgrade": true, + "PreferredAvailabilityZone": "us-east-1c", + "SnapshotStatus": "creating", + "SnapshotSource": "manual", + "SnapshotWindow": "07:00-08:00", + "EngineVersion": "3.2.4", + "NodeSnapshots": [ + { + "CacheSize": "3 MB", + "SnapshotCreateTime": "2016-12-28T07:00:52Z", + "CacheNodeId": "0001", + "CacheNodeCreateTime": "2016-12-21T22:24:04.955Z" + } + ], + "CacheSubnetGroupName": "default", + "Port": 6379, + "PreferredMaintenanceWindow": "tue:09:30-tue:10:30", + "CacheNodeType": "cache.m3.large" + } + } + } + ] } }, "com.amazonaws.elasticache#CopySnapshotMessage": { @@ -3130,7 +3194,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CopySnapshotMessage operation.

" + "smithy.api#documentation": "

Represents the input of a CopySnapshotMessage operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CopySnapshotResult": { @@ -3197,7 +3262,45 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a cluster. All nodes in the cluster run the same protocol-compliant cache\n engine software, either Memcached or Redis.

\n

This operation is not supported for Redis (cluster mode enabled) clusters.

" + "smithy.api#documentation": "

Creates a cluster. All nodes in the cluster run the same protocol-compliant cache\n engine software, either Memcached or Redis.

\n

This operation is not supported for Redis (cluster mode enabled) clusters.

", + "smithy.api#examples": [ + { + "title": "CreateCacheCluster", + "documentation": "Creates a Memcached cluster with 2 nodes. ", + "input": { + "CacheClusterId": "my-memcached-cluster", + "AZMode": "cross-az", + "NumCacheNodes": 2, + "CacheNodeType": "cache.r3.large", + "Engine": "memcached", + "EngineVersion": "1.4.24", + "CacheSubnetGroupName": "default", + "Port": 11211 + }, + "output": { + "CacheCluster": { + "Engine": "memcached", + "CacheParameterGroup": { + "CacheNodeIdsToReboot": [], + "CacheParameterGroupName": "default.memcached1.4", + "ParameterApplyStatus": "in-sync" + }, + "CacheClusterId": "my-memcached-cluster", + "CacheSecurityGroups": [], + "NumCacheNodes": 2, + "AutoMinorVersionUpgrade": true, + "CacheClusterStatus": "creating", + "PreferredAvailabilityZone": "Multiple", + "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", + "CacheSubnetGroupName": "default", + "EngineVersion": "1.4.24", + "PendingModifiedValues": {}, + "PreferredMaintenanceWindow": "wed:09:00-wed:10:00", + "CacheNodeType": "cache.r3.large" + } + } + } + ] } }, "com.amazonaws.elasticache#CreateCacheClusterMessage": { @@ -3386,7 +3489,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateCacheCluster operation.

" + "smithy.api#documentation": "

Represents the input of a CreateCacheCluster operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CreateCacheClusterResult": { @@ -3429,8 +3533,26 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache parameter\n group is a collection of parameters and their values that are applied to all of the\n nodes in any cluster or replication group using the CacheParameterGroup.

\n

A newly created CacheParameterGroup is an exact duplicate of the default parameter\n group for the CacheParameterGroupFamily. To customize the newly created\n CacheParameterGroup you can change the values of specific parameters. For more\n information, see:

\n " - } + "smithy.api#documentation": "

Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache parameter\n group is a collection of parameters and their values that are applied to all of the\n nodes in any cluster or replication group using the CacheParameterGroup.

\n

A newly created CacheParameterGroup is an exact duplicate of the default parameter\n group for the CacheParameterGroupFamily. To customize the newly created\n CacheParameterGroup you can change the values of specific parameters. For more\n information, see:

\n ", + "smithy.api#examples": [ + { + "title": "CreateCacheParameterGroup", + "documentation": "Creates the Amazon ElastiCache parameter group custom-redis2-8.", + "input": { + "CacheParameterGroupName": "custom-redis2-8", + "CacheParameterGroupFamily": "redis2.8", + "Description": "Custom Redis 2.8 parameter group." + }, + "output": { + "CacheParameterGroup": { + "CacheParameterGroupName": "custom-redis2-8", + "CacheParameterGroupFamily": "redis2.8", + "Description": "Custom Redis 2.8 parameter group." + } + } + } + ] + } }, "com.amazonaws.elasticache#CreateCacheParameterGroupMessage": { "type": "structure", @@ -3464,7 +3586,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateCacheParameterGroup operation.

" + "smithy.api#documentation": "

Represents the input of a CreateCacheParameterGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CreateCacheParameterGroupResult": { @@ -3504,7 +3627,17 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new cache security group. Use a cache security group to control access to\n one or more clusters.

\n

Cache security groups are only used when you are creating a cluster outside of an\n Amazon Virtual Private Cloud (Amazon VPC). If you are creating a cluster inside of a\n VPC, use a cache subnet group instead. For more information, see CreateCacheSubnetGroup.

" + "smithy.api#documentation": "

Creates a new cache security group. Use a cache security group to control access to\n one or more clusters.

\n

Cache security groups are only used when you are creating a cluster outside of an\n Amazon Virtual Private Cloud (Amazon VPC). If you are creating a cluster inside of a\n VPC, use a cache subnet group instead. For more information, see CreateCacheSubnetGroup.

", + "smithy.api#examples": [ + { + "title": "CreateCacheSecurityGroup", + "documentation": "Creates an ElastiCache security group. ElastiCache security groups are only for clusters not running in an AWS VPC.", + "input": { + "CacheSecurityGroupName": "my-cache-sec-grp", + "Description": "Example ElastiCache security group." + } + } + ] } }, "com.amazonaws.elasticache#CreateCacheSecurityGroupMessage": { @@ -3532,7 +3665,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateCacheSecurityGroup operation.

" + "smithy.api#documentation": "

Represents the input of a CreateCacheSecurityGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CreateCacheSecurityGroupResult": { @@ -3575,7 +3709,49 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new cache subnet group.

\n

Use this parameter only when you are creating a cluster in an Amazon Virtual Private\n Cloud (Amazon VPC).

" + "smithy.api#documentation": "

Creates a new cache subnet group.

\n

Use this parameter only when you are creating a cluster in an Amazon Virtual Private\n Cloud (Amazon VPC).

", + "smithy.api#examples": [ + { + "title": "CreateCacheSubnet", + "documentation": "Creates a new cache subnet group.", + "input": { + "CacheSubnetGroupName": "my-sn-grp2", + "CacheSubnetGroupDescription": "Sample subnet group", + "SubnetIds": [ + "subnet-6f28c982", + "subnet-bcd382f3", + "subnet-845b3e7c0" + ] + }, + "output": { + "CacheSubnetGroup": { + "VpcId": "vpc-91280df6", + "CacheSubnetGroupDescription": "My subnet group.", + "Subnets": [ + { + "SubnetIdentifier": "subnet-6f28c982", + "SubnetAvailabilityZone": { + "Name": "us-east-1a" + } + }, + { + "SubnetIdentifier": "subnet-bcd382f3", + "SubnetAvailabilityZone": { + "Name": "us-east-1c" + } + }, + { + "SubnetIdentifier": "subnet-845b3e7c0", + "SubnetAvailabilityZone": { + "Name": "us-east-1b" + } + } + ], + "CacheSubnetGroupName": "my-sn-grp" + } + } + } + ] } }, "com.amazonaws.elasticache#CreateCacheSubnetGroupMessage": { @@ -3610,7 +3786,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateCacheSubnetGroup operation.

" + "smithy.api#documentation": "

Represents the input of a CreateCacheSubnetGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CreateCacheSubnetGroupResult": { @@ -3676,6 +3853,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CreateGlobalReplicationGroupResult": { @@ -3757,7 +3937,38 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a Redis (cluster mode disabled) or a Redis (cluster mode enabled) replication\n group.

\n

This API can be used to create a standalone regional replication group or a secondary\n replication group associated with a Global datastore.

\n

A Redis (cluster mode disabled) replication group is a collection of clusters, where\n one of the clusters is a read/write primary and the others are read-only replicas.\n Writes to the primary are asynchronously propagated to the replicas.

\n

A Redis cluster-mode enabled cluster is comprised of from 1 to 90 shards (API/CLI:\n node groups). Each shard has a primary node and up to 5 read-only replica nodes. The\n configuration can range from 90 shards and 0 replicas to 15 shards and 5 replicas, which\n is the maximum number or replicas allowed.

\n

The node or shard limit can be increased to a maximum of 500 per cluster if the Redis\n engine version is 5.0.6 or higher. For example, you can choose to configure a 500 node\n cluster that ranges between 83 shards (one primary and 5 replicas per shard) and 500\n shards (single primary and no replicas). Make sure there are enough available IP\n addresses to accommodate the increase. Common pitfalls include the subnets in the subnet\n group have too small a CIDR range or the subnets are shared and heavily used by other\n clusters. For more information, see Creating a Subnet\n Group. For versions below 5.0.6, the limit is 250 per cluster.

\n

To request a limit increase, see Amazon Service Limits and\n choose the limit type Nodes per cluster per instance\n type.

\n

When a Redis (cluster mode disabled) replication group has been successfully created,\n you can add one or more read replicas to it, up to a total of 5 read replicas. If you\n need to increase or decrease the number of node groups (console: shards), you can avail\n yourself of ElastiCache for Redis' scaling. For more information, see Scaling\n ElastiCache for Redis Clusters in the ElastiCache User\n Guide.

\n \n

This operation is valid for Redis only.

\n
" + "smithy.api#documentation": "

Creates a Redis (cluster mode disabled) or a Redis (cluster mode enabled) replication\n group.

\n

This API can be used to create a standalone regional replication group or a secondary\n replication group associated with a Global datastore.

\n

A Redis (cluster mode disabled) replication group is a collection of clusters, where\n one of the clusters is a read/write primary and the others are read-only replicas.\n Writes to the primary are asynchronously propagated to the replicas.

\n

A Redis cluster-mode enabled cluster is comprised of from 1 to 90 shards (API/CLI:\n node groups). Each shard has a primary node and up to 5 read-only replica nodes. The\n configuration can range from 90 shards and 0 replicas to 15 shards and 5 replicas, which\n is the maximum number or replicas allowed.

\n

The node or shard limit can be increased to a maximum of 500 per cluster if the Redis\n engine version is 5.0.6 or higher. For example, you can choose to configure a 500 node\n cluster that ranges between 83 shards (one primary and 5 replicas per shard) and 500\n shards (single primary and no replicas). Make sure there are enough available IP\n addresses to accommodate the increase. Common pitfalls include the subnets in the subnet\n group have too small a CIDR range or the subnets are shared and heavily used by other\n clusters. For more information, see Creating a Subnet\n Group. For versions below 5.0.6, the limit is 250 per cluster.

\n

To request a limit increase, see Amazon Service Limits and\n choose the limit type Nodes per cluster per instance\n type.

\n

When a Redis (cluster mode disabled) replication group has been successfully created,\n you can add one or more read replicas to it, up to a total of 5 read replicas. If you\n need to increase or decrease the number of node groups (console: shards), you can avail\n yourself of ElastiCache for Redis' scaling. For more information, see Scaling\n ElastiCache for Redis Clusters in the ElastiCache User\n Guide.

\n \n

This operation is valid for Redis only.

\n
", + "smithy.api#examples": [ + { + "title": "CreateCacheReplicationGroup", + "documentation": "Creates a Redis replication group with 3 nodes.", + "input": { + "ReplicationGroupId": "my-redis-rg", + "ReplicationGroupDescription": "A Redis replication group.", + "AutomaticFailoverEnabled": true, + "NumCacheClusters": 3, + "CacheNodeType": "cache.m3.medium", + "Engine": "redis", + "EngineVersion": "2.8.24", + "SnapshotRetentionLimit": 30 + }, + "output": { + "ReplicationGroup": { + "Status": "creating", + "Description": "A Redis replication group.", + "ReplicationGroupId": "my-redis-rg", + "AutomaticFailover": "enabling", + "SnapshottingClusterId": "my-redis-rg-002", + "MemberClusters": [ + "my-redis-rg-001", + "my-redis-rg-002", + "my-redis-rg-003" + ], + "PendingModifiedValues": {} + } + } + } + ] } }, "com.amazonaws.elasticache#CreateReplicationGroupMessage": { @@ -3995,7 +4206,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateReplicationGroup operation.

" + "smithy.api#documentation": "

Represents the input of a CreateReplicationGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CreateReplicationGroupResult": { @@ -4050,7 +4262,46 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a copy of an entire cluster or replication group at a specific moment in\n time.

\n \n

This operation is valid for Redis only.

\n
" + "smithy.api#documentation": "

Creates a copy of an entire cluster or replication group at a specific moment in\n time.

\n \n

This operation is valid for Redis only.

\n
", + "smithy.api#examples": [ + { + "title": "CreateSnapshot - NonClustered Redis, no read-replicas", + "documentation": "Creates a snapshot of a non-clustered Redis cluster that has only one node.", + "input": { + "CacheClusterId": "onenoderedis", + "SnapshotName": "snapshot-1" + }, + "output": { + "Snapshot": { + "Engine": "redis", + "CacheParameterGroupName": "default.redis3.2", + "VpcId": "vpc-73c3cd17", + "CacheClusterId": "onenoderedis", + "SnapshotRetentionLimit": 1, + "NumCacheNodes": 1, + "SnapshotName": "snapshot-1", + "CacheClusterCreateTime": "2017-02-03T15:43:36.278Z", + "AutoMinorVersionUpgrade": true, + "PreferredAvailabilityZone": "us-west-2c", + "SnapshotStatus": "creating", + "SnapshotSource": "manual", + "SnapshotWindow": "00:00-01:00", + "EngineVersion": "3.2.4", + "NodeSnapshots": [ + { + "CacheSize": "", + "CacheNodeId": "0001", + "CacheNodeCreateTime": "2017-02-03T15:43:36.278Z" + } + ], + "CacheSubnetGroupName": "default", + "Port": 6379, + "PreferredMaintenanceWindow": "sat:08:00-sat:09:00", + "CacheNodeType": "cache.m3.medium" + } + } + } + ] } }, "com.amazonaws.elasticache#CreateSnapshotMessage": { @@ -4089,7 +4340,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a CreateSnapshot operation.

" + "smithy.api#documentation": "

Represents the input of a CreateSnapshot operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CreateSnapshotResult": { @@ -4205,6 +4457,9 @@ "smithy.api#documentation": "

A list of tags to be added to this resource. A tag is a key-value pair. A tag key must\n be accompanied by a tag value, although null is accepted.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CreateUserMessage": { @@ -4262,6 +4517,9 @@ "smithy.api#documentation": "

Specifies how to authenticate the user.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#CustomerNodeEndpoint": { @@ -4371,6 +4629,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DecreaseNodeGroupsInGlobalReplicationGroupResult": { @@ -4470,6 +4731,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DecreaseReplicaCountResult": { @@ -4549,7 +4813,43 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a previously provisioned cluster. DeleteCacheCluster deletes all\n associated cache nodes, node endpoints and the cluster itself. When you receive a\n successful response from this operation, Amazon ElastiCache immediately begins deleting\n the cluster; you cannot cancel or revert this operation.

\n

This operation is not valid for:

\n " + "smithy.api#documentation": "

Deletes a previously provisioned cluster. DeleteCacheCluster deletes all\n associated cache nodes, node endpoints and the cluster itself. When you receive a\n successful response from this operation, Amazon ElastiCache immediately begins deleting\n the cluster; you cannot cancel or revert this operation.

\n

This operation is not valid for:

\n ", + "smithy.api#examples": [ + { + "title": "DeleteCacheCluster", + "documentation": "Deletes an Amazon ElastiCache cluster.", + "input": { + "CacheClusterId": "my-memcached" + }, + "output": { + "CacheCluster": { + "Engine": "memcached", + "CacheParameterGroup": { + "CacheNodeIdsToReboot": [], + "CacheParameterGroupName": "default.memcached1.4", + "ParameterApplyStatus": "in-sync" + }, + "CacheClusterId": "my-memcached", + "PreferredAvailabilityZone": "Multiple", + "ConfigurationEndpoint": { + "Port": 11211, + "Address": "my-memcached2.ameaqx.cfg.use1.cache.amazonaws.com" + }, + "CacheSecurityGroups": [], + "CacheClusterCreateTime": "2016-12-22T16:05:17.314Z", + "AutoMinorVersionUpgrade": true, + "CacheClusterStatus": "deleting", + "NumCacheNodes": 2, + "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", + "CacheSubnetGroupName": "default", + "EngineVersion": "1.4.24", + "PendingModifiedValues": {}, + "PreferredMaintenanceWindow": "tue:07:30-tue:08:30", + "CacheNodeType": "cache.r3.large" + } + } + } + ] } }, "com.amazonaws.elasticache#DeleteCacheClusterMessage": { @@ -4570,7 +4870,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteCacheCluster operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteCacheCluster operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DeleteCacheClusterResult": { @@ -4607,7 +4908,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified cache parameter group. You cannot delete a cache parameter group\n if it is associated with any cache clusters. You cannot delete the default cache\n parameter groups in your account.

" + "smithy.api#documentation": "

Deletes the specified cache parameter group. You cannot delete a cache parameter group\n if it is associated with any cache clusters. You cannot delete the default cache\n parameter groups in your account.

", + "smithy.api#examples": [ + { + "title": "DeleteCacheParameterGroup", + "documentation": "Deletes the Amazon ElastiCache parameter group custom-mem1-4.", + "input": { + "CacheParameterGroupName": "custom-mem1-4" + } + } + ] } }, "com.amazonaws.elasticache#DeleteCacheParameterGroupMessage": { @@ -4622,7 +4932,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteCacheParameterGroup operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteCacheParameterGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DeleteCacheSecurityGroup": { @@ -4648,7 +4959,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a cache security group.

\n \n

You cannot delete a cache security group if it is associated with any\n clusters.

\n
" + "smithy.api#documentation": "

Deletes a cache security group.

\n \n

You cannot delete a cache security group if it is associated with any\n clusters.

\n
", + "smithy.api#examples": [ + { + "title": "DeleteCacheSecurityGroup", + "documentation": "Deletes a cache security group.", + "input": { + "CacheSecurityGroupName": "my-sec-group" + } + } + ] } }, "com.amazonaws.elasticache#DeleteCacheSecurityGroupMessage": { @@ -4663,7 +4983,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteCacheSecurityGroup operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteCacheSecurityGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DeleteCacheSubnetGroup": { @@ -4683,7 +5004,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a cache subnet group.

\n \n

You cannot delete a default cache subnet group or one that is associated with any\n clusters.

\n
" + "smithy.api#documentation": "

Deletes a cache subnet group.

\n \n

You cannot delete a default cache subnet group or one that is associated with any\n clusters.

\n
", + "smithy.api#examples": [ + { + "title": "DeleteCacheSubnetGroup", + "documentation": "Deletes the Amazon ElastiCache subnet group my-subnet-group.", + "input": { + "CacheSubnetGroupName": "my-subnet-group" + } + } + ] } }, "com.amazonaws.elasticache#DeleteCacheSubnetGroupMessage": { @@ -4698,7 +5028,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteCacheSubnetGroup operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteCacheSubnetGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DeleteGlobalReplicationGroup": { @@ -4742,6 +5073,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DeleteGlobalReplicationGroupResult": { @@ -4787,7 +5121,26 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an existing replication group. By default, this operation deletes the entire\n replication group, including the primary/primaries and all of the read replicas. If the\n replication group has only one primary, you can optionally delete only the read\n replicas, while retaining the primary by setting\n RetainPrimaryCluster=true.

\n

When you receive a successful response from this operation, Amazon ElastiCache\n immediately begins deleting the selected resources; you cannot cancel or revert this\n operation.

\n \n

This operation is valid for Redis only.

\n
" + "smithy.api#documentation": "

Deletes an existing replication group. By default, this operation deletes the entire\n replication group, including the primary/primaries and all of the read replicas. If the\n replication group has only one primary, you can optionally delete only the read\n replicas, while retaining the primary by setting\n RetainPrimaryCluster=true.

\n

When you receive a successful response from this operation, Amazon ElastiCache\n immediately begins deleting the selected resources; you cannot cancel or revert this\n operation.

\n \n

This operation is valid for Redis only.

\n
", + "smithy.api#examples": [ + { + "title": "DeleteReplicationGroup", + "documentation": "Deletes the Amazon ElastiCache replication group my-redis-rg.", + "input": { + "ReplicationGroupId": "my-redis-rg", + "RetainPrimaryCluster": false + }, + "output": { + "ReplicationGroup": { + "Status": "deleting", + "AutomaticFailover": "disabled", + "Description": "simple redis cluster", + "ReplicationGroupId": "my-redis-rg", + "PendingModifiedValues": {} + } + } + } + ] } }, "com.amazonaws.elasticache#DeleteReplicationGroupMessage": { @@ -4814,7 +5167,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteReplicationGroup operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteReplicationGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DeleteReplicationGroupResult": { @@ -4851,7 +5205,46 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes an existing snapshot. When you receive a successful response from this\n operation, ElastiCache immediately begins deleting the snapshot; you cannot cancel or\n revert this operation.

\n \n

This operation is valid for Redis only.

\n
" + "smithy.api#documentation": "

Deletes an existing snapshot. When you receive a successful response from this\n operation, ElastiCache immediately begins deleting the snapshot; you cannot cancel or\n revert this operation.

\n \n

This operation is valid for Redis only.

\n
", + "smithy.api#examples": [ + { + "title": "DeleteSnapshot", + "documentation": "Deletes the Redis snapshot snapshot-20160822.", + "input": { + "SnapshotName": "snapshot-20161212" + }, + "output": { + "Snapshot": { + "Engine": "redis", + "CacheParameterGroupName": "default.redis3.2", + "VpcId": "vpc-91280df6", + "CacheClusterId": "my-redis5", + "SnapshotRetentionLimit": 7, + "NumCacheNodes": 1, + "SnapshotName": "snapshot-20161212", + "CacheClusterCreateTime": "2016-12-21T22:27:12.543Z", + "AutoMinorVersionUpgrade": true, + "PreferredAvailabilityZone": "us-east-1c", + "SnapshotStatus": "deleting", + "SnapshotSource": "manual", + "SnapshotWindow": "10:00-11:00", + "EngineVersion": "3.2.4", + "NodeSnapshots": [ + { + "CacheSize": "3 MB", + "SnapshotCreateTime": "2016-12-21T22:30:26Z", + "CacheNodeId": "0001", + "CacheNodeCreateTime": "2016-12-21T22:27:12.543Z" + } + ], + "CacheSubnetGroupName": "default", + "Port": 6379, + "PreferredMaintenanceWindow": "fri:05:30-fri:06:30", + "CacheNodeType": "cache.m3.large" + } + } + } + ] } }, "com.amazonaws.elasticache#DeleteSnapshotMessage": { @@ -4866,7 +5259,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DeleteSnapshot operation.

" + "smithy.api#documentation": "

Represents the input of a DeleteSnapshot operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DeleteSnapshotResult": { @@ -4945,6 +5339,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DeleteUserMessage": { @@ -4957,6 +5354,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeCacheClusters": { @@ -4980,6 +5380,44 @@ ], "traits": { "smithy.api#documentation": "

Returns information about all provisioned clusters if no cluster identifier is\n specified, or about a specific cache cluster if a cluster identifier is supplied.

\n

By default, abbreviated information about the clusters is returned. You can use the\n optional ShowCacheNodeInfo flag to retrieve detailed information\n about the cache nodes associated with the clusters. These details include the DNS\n address and port for the cache node endpoint.

\n

If the cluster is in the creating state, only cluster-level\n information is displayed until all of the nodes are successfully provisioned.

\n

If the cluster is in the deleting state, only cluster-level\n information is displayed.

\n

If cache nodes are currently being added to the cluster, node endpoint information and\n creation time for the additional nodes are not displayed until they are completely\n provisioned. When the cluster state is available, the cluster is\n ready for use.

\n

If cache nodes are currently being removed from the cluster, no endpoint information\n for the removed nodes is displayed.

", + "smithy.api#examples": [ + { + "title": "DescribeCacheClusters", + "documentation": "Lists the details for up to 50 cache clusters.", + "input": { + "CacheClusterId": "my-mem-cluster" + }, + "output": { + "CacheClusters": [ + { + "Engine": "memcached", + "CacheParameterGroup": { + "CacheNodeIdsToReboot": [], + "CacheParameterGroupName": "default.memcached1.4", + "ParameterApplyStatus": "in-sync" + }, + "CacheClusterId": "my-mem-cluster", + "PreferredAvailabilityZone": "Multiple", + "ConfigurationEndpoint": { + "Port": 11211, + "Address": "my-mem-cluster.abcdef.cfg.use1.cache.amazonaws.com" + }, + "CacheSecurityGroups": [], + "CacheClusterCreateTime": "2016-12-21T21:59:43.794Z", + "AutoMinorVersionUpgrade": true, + "CacheClusterStatus": "available", + "NumCacheNodes": 2, + "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", + "CacheSubnetGroupName": "default", + "EngineVersion": "1.4.24", + "PendingModifiedValues": {}, + "PreferredMaintenanceWindow": "wed:06:00-wed:07:00", + "CacheNodeType": "cache.t2.medium" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5166,7 +5604,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeCacheClusters operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeCacheClusters operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeCacheEngineVersions": { @@ -5179,6 +5618,100 @@ }, "traits": { "smithy.api#documentation": "

Returns a list of the available cache engines and their versions.

", + "smithy.api#examples": [ + { + "title": "DescribeCacheEngineVersions", + "documentation": "Lists the details for up to 25 Memcached and Redis cache engine versions.", + "output": { + "CacheEngineVersions": [ + { + "Engine": "memcached", + "CacheEngineDescription": "memcached", + "CacheEngineVersionDescription": "memcached version 1.4.14", + "CacheParameterGroupFamily": "memcached1.4", + "EngineVersion": "1.4.14" + }, + { + "Engine": "memcached", + "CacheEngineDescription": "memcached", + "CacheEngineVersionDescription": "memcached version 1.4.24", + "CacheParameterGroupFamily": "memcached1.4", + "EngineVersion": "1.4.24" + }, + { + "Engine": "memcached", + "CacheEngineDescription": "memcached", + "CacheEngineVersionDescription": "memcached version 1.4.33", + "CacheParameterGroupFamily": "memcached1.4", + "EngineVersion": "1.4.33" + }, + { + "Engine": "memcached", + "CacheEngineDescription": "memcached", + "CacheEngineVersionDescription": "memcached version 1.4.5", + "CacheParameterGroupFamily": "memcached1.4", + "EngineVersion": "1.4.5" + }, + { + "Engine": "redis", + "CacheEngineDescription": "Redis", + "CacheEngineVersionDescription": "redis version 2.6.13", + "CacheParameterGroupFamily": "redis2.6", + "EngineVersion": "2.6.13" + }, + { + "Engine": "redis", + "CacheEngineDescription": "Redis", + "CacheEngineVersionDescription": "redis version 2.8.19", + "CacheParameterGroupFamily": "redis2.8", + "EngineVersion": "2.8.19" + }, + { + "Engine": "redis", + "CacheEngineDescription": "Redis", + "CacheEngineVersionDescription": "redis version 2.8.21", + "CacheParameterGroupFamily": "redis2.8", + "EngineVersion": "2.8.21" + }, + { + "Engine": "redis", + "CacheEngineDescription": "Redis", + "CacheEngineVersionDescription": "redis version 2.8.22 R5", + "CacheParameterGroupFamily": "redis2.8", + "EngineVersion": "2.8.22" + }, + { + "Engine": "redis", + "CacheEngineDescription": "Redis", + "CacheEngineVersionDescription": "redis version 2.8.23 R4", + "CacheParameterGroupFamily": "redis2.8", + "EngineVersion": "2.8.23" + }, + { + "Engine": "redis", + "CacheEngineDescription": "Redis", + "CacheEngineVersionDescription": "redis version 2.8.24 R3", + "CacheParameterGroupFamily": "redis2.8", + "EngineVersion": "2.8.24" + }, + { + "Engine": "redis", + "CacheEngineDescription": "Redis", + "CacheEngineVersionDescription": "redis version 2.8.6", + "CacheParameterGroupFamily": "redis2.8", + "EngineVersion": "2.8.6" + }, + { + "Engine": "redis", + "CacheEngineDescription": "Redis", + "CacheEngineVersionDescription": "redis version 3.2.4", + "CacheParameterGroupFamily": "redis3.2", + "EngineVersion": "3.2.4" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5229,7 +5762,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeCacheEngineVersions operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeCacheEngineVersions operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeCacheParameterGroups": { @@ -5253,6 +5787,24 @@ ], "traits": { "smithy.api#documentation": "

Returns a list of cache parameter group descriptions. If a cache parameter group name\n is specified, the list contains only the descriptions for that group.

", + "smithy.api#examples": [ + { + "title": "DescribeCacheParameterGroups", + "documentation": "Returns a list of cache parameter group descriptions. If a cache parameter group name is specified, the list contains only the descriptions for that group.", + "input": { + "CacheParameterGroupName": "custom-mem1-4" + }, + "output": { + "CacheParameterGroups": [ + { + "CacheParameterGroupName": "custom-mem1-4", + "CacheParameterGroupFamily": "memcached1.4", + "Description": "Custom memcache param group" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5284,7 +5836,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeCacheParameterGroups operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeCacheParameterGroups operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeCacheParameters": { @@ -5308,6 +5861,405 @@ ], "traits": { "smithy.api#documentation": "

Returns the detailed parameter list for a particular cache parameter group.

", + "smithy.api#examples": [ + { + "title": "DescribeCacheParameters", + "documentation": "Lists up to 100 user parameter values for the parameter group custom.redis2.8.", + "input": { + "CacheParameterGroupName": "custom-redis2-8", + "Source": "user", + "MaxRecords": 100 + }, + "output": { + "Marker": "", + "Parameters": [ + { + "Description": "Apply rehashing or not.", + "DataType": "string", + "ChangeType": "requires-reboot", + "IsModifiable": true, + "AllowedValues": "yes,no", + "Source": "system", + "ParameterValue": "yes", + "ParameterName": "activerehashing", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "fsync policy for AOF persistence", + "DataType": "string", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "always,everysec,no", + "Source": "system", + "ParameterValue": "everysec", + "ParameterName": "appendfsync", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Enable Redis persistence.", + "DataType": "string", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "yes,no", + "Source": "system", + "ParameterValue": "no", + "ParameterName": "appendonly", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Normal client output buffer hard limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "client-output-buffer-limit-normal-hard-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Normal client output buffer soft limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "client-output-buffer-limit-normal-soft-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Normal client output buffer soft limit in seconds.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "client-output-buffer-limit-normal-soft-seconds", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Pubsub client output buffer hard limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "33554432", + "ParameterName": "client-output-buffer-limit-pubsub-hard-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Pubsub client output buffer soft limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "8388608", + "ParameterName": "client-output-buffer-limit-pubsub-soft-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Pubsub client output buffer soft limit in seconds.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "60", + "ParameterName": "client-output-buffer-limit-pubsub-soft-seconds", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Slave client output buffer soft limit in seconds.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": false, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "60", + "ParameterName": "client-output-buffer-limit-slave-soft-seconds", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "If enabled, clients who attempt to write to a read-only slave will be disconnected. Applicable to 2.8.23 and higher.", + "DataType": "string", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "yes,no", + "Source": "system", + "ParameterValue": "yes", + "ParameterName": "close-on-slave-write", + "MinimumEngineVersion": "2.8.23" + }, + { + "Description": "Set the number of databases.", + "DataType": "integer", + "ChangeType": "requires-reboot", + "IsModifiable": true, + "AllowedValues": "1-1200000", + "Source": "system", + "ParameterValue": "16", + "ParameterName": "databases", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The maximum number of hash entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "512", + "ParameterName": "hash-max-ziplist-entries", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The threshold of biggest hash entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "64", + "ParameterName": "hash-max-ziplist-value", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The maximum number of list entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "512", + "ParameterName": "list-max-ziplist-entries", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The threshold of biggest list entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "64", + "ParameterName": "list-max-ziplist-value", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Max execution time of a Lua script in milliseconds. 0 for unlimited execution without warnings.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": false, + "AllowedValues": "5000", + "Source": "system", + "ParameterValue": "5000", + "ParameterName": "lua-time-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The maximum number of Redis clients.", + "DataType": "integer", + "ChangeType": "requires-reboot", + "IsModifiable": false, + "AllowedValues": "1-65000", + "Source": "system", + "ParameterValue": "65000", + "ParameterName": "maxclients", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Max memory policy.", + "DataType": "string", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "volatile-lru,allkeys-lru,volatile-random,allkeys-random,volatile-ttl,noeviction", + "Source": "system", + "ParameterValue": "volatile-lru", + "ParameterName": "maxmemory-policy", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Max memory samples.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "1-", + "Source": "system", + "ParameterValue": "3", + "ParameterName": "maxmemory-samples", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Maximum number of seconds within which the master must receive a ping from a slave to take writes. Use this parameter together with min-slaves-to-write to regulate when the master stops accepting writes. Setting this value to 0 means the master always takes writes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "10", + "ParameterName": "min-slaves-max-lag", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Number of slaves that must be connected in order for master to take writes. Use this parameter together with min-slaves-max-lag to regulate when the master stops accepting writes. Setting this to 0 means the master always takes writes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "min-slaves-to-write", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The keyspace events for Redis to notify Pub/Sub clients about. By default all notifications are disabled", + "DataType": "string", + "ChangeType": "immediate", + "Source": "system", + "IsModifiable": true, + "ParameterName": "notify-keyspace-events", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The replication backlog size in bytes for PSYNC. This is the size of the buffer which accumulates slave data when slave is disconnected for some time, so that when slave reconnects again, only transfer the portion of data which the slave missed. Minimum value is 16K.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "16384-", + "Source": "system", + "ParameterValue": "1048576", + "ParameterName": "repl-backlog-size", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The amount of time in seconds after the master no longer have any slaves connected for the master to free the replication backlog. A value of 0 means to never release the backlog.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "3600", + "ParameterName": "repl-backlog-ttl", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The timeout in seconds for bulk transfer I/O during sync and master timeout from the perspective of the slave, and slave timeout from the perspective of the master.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "11-", + "Source": "system", + "ParameterValue": "60", + "ParameterName": "repl-timeout", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The amount of memory reserved for non-cache memory usage, in bytes. You may want to increase this parameter for nodes with read replicas, AOF enabled, etc, to reduce swap usage.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "reserved-memory", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The limit in the size of the set in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "512", + "ParameterName": "set-max-intset-entries", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Configures if chaining of slaves is allowed", + "DataType": "string", + "ChangeType": "immediate", + "IsModifiable": false, + "AllowedValues": "yes,no", + "Source": "system", + "ParameterValue": "no", + "ParameterName": "slave-allow-chaining", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The execution time, in microseconds, to exceed in order for the command to get logged. Note that a negative number disables the slow log, while a value of zero forces the logging of every command.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "-", + "Source": "system", + "ParameterValue": "10000", + "ParameterName": "slowlog-log-slower-than", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The length of the slow log. There is no limit to this length. Just be aware that it will consume memory. You can reclaim memory used by the slow log with SLOWLOG RESET.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "128", + "ParameterName": "slowlog-max-len", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "If non-zero, send ACKs every given number of seconds.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "tcp-keepalive", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Close connection if client is idle for a given number of seconds, or never if 0.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0,20-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "timeout", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The maximum number of sorted set entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "128", + "ParameterName": "zset-max-ziplist-entries", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The threshold of biggest sorted set entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "64", + "ParameterName": "zset-max-ziplist-value", + "MinimumEngineVersion": "2.8.6" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5346,7 +6298,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeCacheParameters operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeCacheParameters operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeCacheSecurityGroups": { @@ -5370,6 +6323,15 @@ ], "traits": { "smithy.api#documentation": "

Returns a list of cache security group descriptions. If a cache security group name is\n specified, the list contains only the description of that group. This applicable only\n when you have ElastiCache in Classic setup

", + "smithy.api#examples": [ + { + "title": "DescribeCacheSecurityGroups", + "documentation": "Returns a list of cache security group descriptions. If a cache security group name is specified, the list contains only the description of that group.", + "input": { + "CacheSecurityGroupName": "my-sec-group" + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5401,7 +6363,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeCacheSecurityGroups operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeCacheSecurityGroups operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeCacheSubnetGroups": { @@ -5419,6 +6382,51 @@ ], "traits": { "smithy.api#documentation": "

Returns a list of cache subnet group descriptions. If a subnet group name is\n specified, the list contains only the description of that group. This is applicable only\n when you have ElastiCache in VPC setup. All ElastiCache clusters now launch in VPC by\n default.

", + "smithy.api#examples": [ + { + "title": "DescribeCacheSubnetGroups", + "documentation": "Describes up to 25 cache subnet groups.", + "input": { + "MaxRecords": 25 + }, + "output": { + "Marker": "", + "CacheSubnetGroups": [ + { + "VpcId": "vpc-91280df6", + "CacheSubnetGroupDescription": "Default CacheSubnetGroup", + "Subnets": [ + { + "SubnetIdentifier": "subnet-1a2b3c4d", + "SubnetAvailabilityZone": { + "Name": "us-east-1a" + } + }, + { + "SubnetIdentifier": "subnet-a1b2c3d4", + "SubnetAvailabilityZone": { + "Name": "us-east-1c" + } + }, + { + "SubnetIdentifier": "subnet-abcd1234", + "SubnetAvailabilityZone": { + "Name": "us-east-1e" + } + }, + { + "SubnetIdentifier": "subnet-1234abcd", + "SubnetAvailabilityZone": { + "Name": "us-east-1b" + } + } + ], + "CacheSubnetGroupName": "default" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5450,7 +6458,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeCacheSubnetGroups operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeCacheSubnetGroups operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeEngineDefaultParameters": { @@ -5471,6 +6480,616 @@ ], "traits": { "smithy.api#documentation": "

Returns the default engine and system parameter information for the specified cache\n engine.

", + "smithy.api#examples": [ + { + "title": "DescribeEngineDefaultParameters", + "documentation": "Returns the default engine and system parameter information for the specified cache engine.", + "input": { + "CacheParameterGroupFamily": "redis2.8", + "MaxRecords": 25 + }, + "output": { + "EngineDefaults": { + "Marker": "bWluLXNsYXZlcy10by13cml0ZQ==", + "CacheParameterGroupFamily": "redis2.8", + "Parameters": [ + { + "Description": "Apply rehashing or not.", + "DataType": "string", + "ChangeType": "requires-reboot", + "IsModifiable": true, + "AllowedValues": "yes,no", + "Source": "system", + "ParameterValue": "yes", + "ParameterName": "activerehashing", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "fsync policy for AOF persistence", + "DataType": "string", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "always,everysec,no", + "Source": "system", + "ParameterValue": "everysec", + "ParameterName": "appendfsync", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Enable Redis persistence.", + "DataType": "string", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "yes,no", + "Source": "system", + "ParameterValue": "no", + "ParameterName": "appendonly", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Normal client output buffer hard limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "client-output-buffer-limit-normal-hard-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Normal client output buffer soft limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "client-output-buffer-limit-normal-soft-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Normal client output buffer soft limit in seconds.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "client-output-buffer-limit-normal-soft-seconds", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Pubsub client output buffer hard limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "33554432", + "ParameterName": "client-output-buffer-limit-pubsub-hard-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Pubsub client output buffer soft limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "8388608", + "ParameterName": "client-output-buffer-limit-pubsub-soft-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Pubsub client output buffer soft limit in seconds.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "60", + "ParameterName": "client-output-buffer-limit-pubsub-soft-seconds", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Slave client output buffer soft limit in seconds.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": false, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "60", + "ParameterName": "client-output-buffer-limit-slave-soft-seconds", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "If enabled, clients who attempt to write to a read-only slave will be disconnected. Applicable to 2.8.23 and higher.", + "DataType": "string", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "yes,no", + "Source": "system", + "ParameterValue": "yes", + "ParameterName": "close-on-slave-write", + "MinimumEngineVersion": "2.8.23" + }, + { + "Description": "Set the number of databases.", + "DataType": "integer", + "ChangeType": "requires-reboot", + "IsModifiable": true, + "AllowedValues": "1-1200000", + "Source": "system", + "ParameterValue": "16", + "ParameterName": "databases", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The maximum number of hash entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "512", + "ParameterName": "hash-max-ziplist-entries", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The threshold of biggest hash entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "64", + "ParameterName": "hash-max-ziplist-value", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The maximum number of list entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "512", + "ParameterName": "list-max-ziplist-entries", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The threshold of biggest list entries in order for the dataset to be compressed.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "64", + "ParameterName": "list-max-ziplist-value", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Max execution time of a Lua script in milliseconds. 0 for unlimited execution without warnings.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": false, + "AllowedValues": "5000", + "Source": "system", + "ParameterValue": "5000", + "ParameterName": "lua-time-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The maximum number of Redis clients.", + "DataType": "integer", + "ChangeType": "requires-reboot", + "IsModifiable": false, + "AllowedValues": "1-65000", + "Source": "system", + "ParameterValue": "65000", + "ParameterName": "maxclients", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Max memory policy.", + "DataType": "string", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "volatile-lru,allkeys-lru,volatile-random,allkeys-random,volatile-ttl,noeviction", + "Source": "system", + "ParameterValue": "volatile-lru", + "ParameterName": "maxmemory-policy", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Max memory samples.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "1-", + "Source": "system", + "ParameterValue": "3", + "ParameterName": "maxmemory-samples", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Maximum number of seconds within which the master must receive a ping from a slave to take writes. Use this parameter together with min-slaves-to-write to regulate when the master stops accepting writes. Setting this value to 0 means the master always takes writes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "10", + "ParameterName": "min-slaves-max-lag", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Number of slaves that must be connected in order for master to take writes. Use this parameter together with min-slaves-max-lag to regulate when the master stops accepting writes. Setting this to 0 means the master always takes writes.", + "DataType": "integer", + "ChangeType": "immediate", + "IsModifiable": true, + "AllowedValues": "0-", + "Source": "system", + "ParameterValue": "0", + "ParameterName": "min-slaves-to-write", + "MinimumEngineVersion": "2.8.6" + } + ], + "CacheNodeTypeSpecificParameters": [ + { + "Description": "Slave client output buffer hard limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "AllowedValues": "0-", + "Source": "system", + "IsModifiable": false, + "CacheNodeTypeSpecificValues": [ + { + "Value": "650117120", + "CacheNodeType": "cache.c1.xlarge" + }, + { + "Value": "702545920", + "CacheNodeType": "cache.m1.large" + }, + { + "Value": "309329920", + "CacheNodeType": "cache.m1.medium" + }, + { + "Value": "94371840", + "CacheNodeType": "cache.m1.small" + }, + { + "Value": "1488977920", + "CacheNodeType": "cache.m1.xlarge" + }, + { + "Value": "3502243840", + "CacheNodeType": "cache.m2.2xlarge" + }, + { + "Value": "7088373760", + "CacheNodeType": "cache.m2.4xlarge" + }, + { + "Value": "1709178880", + "CacheNodeType": "cache.m2.xlarge" + }, + { + "Value": "2998927360", + "CacheNodeType": "cache.m3.2xlarge" + }, + { + "Value": "650117120", + "CacheNodeType": "cache.m3.large" + }, + { + "Value": "309329920", + "CacheNodeType": "cache.m3.medium" + }, + { + "Value": "1426063360", + "CacheNodeType": "cache.m3.xlarge" + }, + { + "Value": "16604761424", + "CacheNodeType": "cache.m4.10xlarge" + }, + { + "Value": "3188912636", + "CacheNodeType": "cache.m4.2xlarge" + }, + { + "Value": "6525729063", + "CacheNodeType": "cache.m4.4xlarge" + }, + { + "Value": "689259315", + "CacheNodeType": "cache.m4.large" + }, + { + "Value": "1532850176", + "CacheNodeType": "cache.m4.xlarge" + }, + { + "Value": "6081740800", + "CacheNodeType": "cache.r3.2xlarge" + }, + { + "Value": "12268339200", + "CacheNodeType": "cache.r3.4xlarge" + }, + { + "Value": "24536678400", + "CacheNodeType": "cache.r3.8xlarge" + }, + { + "Value": "1468006400", + "CacheNodeType": "cache.r3.large" + }, + { + "Value": "3040870400", + "CacheNodeType": "cache.r3.xlarge" + }, + { + "Value": "14260633", + "CacheNodeType": "cache.t1.micro" + }, + { + "Value": "346134937", + "CacheNodeType": "cache.t2.medium" + }, + { + "Value": "58195968", + "CacheNodeType": "cache.t2.micro" + }, + { + "Value": "166513868", + "CacheNodeType": "cache.t2.small" + } + ], + "ParameterName": "client-output-buffer-limit-slave-hard-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "Slave client output buffer soft limit in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "AllowedValues": "0-", + "Source": "system", + "IsModifiable": false, + "CacheNodeTypeSpecificValues": [ + { + "Value": "650117120", + "CacheNodeType": "cache.c1.xlarge" + }, + { + "Value": "702545920", + "CacheNodeType": "cache.m1.large" + }, + { + "Value": "309329920", + "CacheNodeType": "cache.m1.medium" + }, + { + "Value": "94371840", + "CacheNodeType": "cache.m1.small" + }, + { + "Value": "1488977920", + "CacheNodeType": "cache.m1.xlarge" + }, + { + "Value": "3502243840", + "CacheNodeType": "cache.m2.2xlarge" + }, + { + "Value": "7088373760", + "CacheNodeType": "cache.m2.4xlarge" + }, + { + "Value": "1709178880", + "CacheNodeType": "cache.m2.xlarge" + }, + { + "Value": "2998927360", + "CacheNodeType": "cache.m3.2xlarge" + }, + { + "Value": "650117120", + "CacheNodeType": "cache.m3.large" + }, + { + "Value": "309329920", + "CacheNodeType": "cache.m3.medium" + }, + { + "Value": "1426063360", + "CacheNodeType": "cache.m3.xlarge" + }, + { + "Value": "16604761424", + "CacheNodeType": "cache.m4.10xlarge" + }, + { + "Value": "3188912636", + "CacheNodeType": "cache.m4.2xlarge" + }, + { + "Value": "6525729063", + "CacheNodeType": "cache.m4.4xlarge" + }, + { + "Value": "689259315", + "CacheNodeType": "cache.m4.large" + }, + { + "Value": "1532850176", + "CacheNodeType": "cache.m4.xlarge" + }, + { + "Value": "6081740800", + "CacheNodeType": "cache.r3.2xlarge" + }, + { + "Value": "12268339200", + "CacheNodeType": "cache.r3.4xlarge" + }, + { + "Value": "24536678400", + "CacheNodeType": "cache.r3.8xlarge" + }, + { + "Value": "1468006400", + "CacheNodeType": "cache.r3.large" + }, + { + "Value": "3040870400", + "CacheNodeType": "cache.r3.xlarge" + }, + { + "Value": "14260633", + "CacheNodeType": "cache.t1.micro" + }, + { + "Value": "346134937", + "CacheNodeType": "cache.t2.medium" + }, + { + "Value": "58195968", + "CacheNodeType": "cache.t2.micro" + }, + { + "Value": "166513868", + "CacheNodeType": "cache.t2.small" + } + ], + "ParameterName": "client-output-buffer-limit-slave-soft-limit", + "MinimumEngineVersion": "2.8.6" + }, + { + "Description": "The maximum configurable amount of memory to use to store items, in bytes.", + "DataType": "integer", + "ChangeType": "immediate", + "AllowedValues": "0-", + "Source": "system", + "IsModifiable": false, + "CacheNodeTypeSpecificValues": [ + { + "Value": "6501171200", + "CacheNodeType": "cache.c1.xlarge" + }, + { + "Value": "7025459200", + "CacheNodeType": "cache.m1.large" + }, + { + "Value": "3093299200", + "CacheNodeType": "cache.m1.medium" + }, + { + "Value": "943718400", + "CacheNodeType": "cache.m1.small" + }, + { + "Value": "14889779200", + "CacheNodeType": "cache.m1.xlarge" + }, + { + "Value": "35022438400", + "CacheNodeType": "cache.m2.2xlarge" + }, + { + "Value": "70883737600", + "CacheNodeType": "cache.m2.4xlarge" + }, + { + "Value": "17091788800", + "CacheNodeType": "cache.m2.xlarge" + }, + { + "Value": "29989273600", + "CacheNodeType": "cache.m3.2xlarge" + }, + { + "Value": "6501171200", + "CacheNodeType": "cache.m3.large" + }, + { + "Value": "2988441600", + "CacheNodeType": "cache.m3.medium" + }, + { + "Value": "14260633600", + "CacheNodeType": "cache.m3.xlarge" + }, + { + "Value": "166047614239", + "CacheNodeType": "cache.m4.10xlarge" + }, + { + "Value": "31889126359", + "CacheNodeType": "cache.m4.2xlarge" + }, + { + "Value": "65257290629", + "CacheNodeType": "cache.m4.4xlarge" + }, + { + "Value": "6892593152", + "CacheNodeType": "cache.m4.large" + }, + { + "Value": "15328501760", + "CacheNodeType": "cache.m4.xlarge" + }, + { + "Value": "62495129600", + "CacheNodeType": "cache.r3.2xlarge" + }, + { + "Value": "126458265600", + "CacheNodeType": "cache.r3.4xlarge" + }, + { + "Value": "254384537600", + "CacheNodeType": "cache.r3.8xlarge" + }, + { + "Value": "14470348800", + "CacheNodeType": "cache.r3.large" + }, + { + "Value": "30513561600", + "CacheNodeType": "cache.r3.xlarge" + }, + { + "Value": "142606336", + "CacheNodeType": "cache.t1.micro" + }, + { + "Value": "3461349376", + "CacheNodeType": "cache.t2.medium" + }, + { + "Value": "581959680", + "CacheNodeType": "cache.t2.micro" + }, + { + "Value": "1665138688", + "CacheNodeType": "cache.t2.small" + } + ], + "ParameterName": "maxmemory", + "MinimumEngineVersion": "2.8.6" + } + ] + } + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "EngineDefaults.Marker", @@ -5503,7 +7122,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeEngineDefaultParameters\n operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeEngineDefaultParameters\n operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeEngineDefaultParametersResult": { @@ -5535,6 +7155,51 @@ ], "traits": { "smithy.api#documentation": "

Returns events related to clusters, cache security groups, and cache parameter groups.\n You can obtain events specific to a particular cluster, cache security group, or cache\n parameter group by providing the name as a parameter.

\n

By default, only the events occurring within the last hour are returned; however, you\n can retrieve up to 14 days' worth of events if necessary.

", + "smithy.api#examples": [ + { + "title": "DescribeEvents", + "documentation": "Describes all the cache-cluster events for the past 120 minutes.", + "input": { + "SourceType": "cache-cluster", + "Duration": 360 + }, + "output": { + "Marker": "", + "Events": [ + { + "Date": "2016-12-22T16:27:56.088Z", + "Message": "Added cache node 0001 in availability zone us-east-1e", + "SourceIdentifier": "redis-cluster", + "SourceType": "cache-cluster" + }, + { + "Date": "2016-12-22T16:27:56.078Z", + "Message": "Cache cluster created", + "SourceIdentifier": "redis-cluster", + "SourceType": "cache-cluster" + }, + { + "Date": "2016-12-22T16:05:17.326Z", + "Message": "Added cache node 0002 in availability zone us-east-1c", + "SourceIdentifier": "my-memcached2", + "SourceType": "cache-cluster" + }, + { + "Date": "2016-12-22T16:05:17.323Z", + "Message": "Added cache node 0001 in availability zone us-east-1e", + "SourceIdentifier": "my-memcached2", + "SourceType": "cache-cluster" + }, + { + "Date": "2016-12-22T16:05:17.314Z", + "Message": "Cache cluster created", + "SourceIdentifier": "my-memcached2", + "SourceType": "cache-cluster" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5590,7 +7255,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeEvents operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeEvents operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeGlobalReplicationGroups": { @@ -5649,6 +7315,9 @@ "smithy.api#documentation": "

Returns the list of members that comprise the Global datastore.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeGlobalReplicationGroupsResult": { @@ -5692,6 +7361,64 @@ ], "traits": { "smithy.api#documentation": "

Returns information about a particular replication group. If no identifier is\n specified, DescribeReplicationGroups returns information about all\n replication groups.

\n \n

This operation is valid for Redis only.

\n
", + "smithy.api#examples": [ + { + "title": "DescribeReplicationGroups", + "documentation": "Returns information about the replication group myreplgroup.", + "output": { + "Marker": "", + "ReplicationGroups": [ + { + "Status": "available", + "Description": "Test cluster", + "NodeGroups": [ + { + "Status": "available", + "NodeGroupId": "0001", + "NodeGroupMembers": [ + { + "PreferredAvailabilityZone": "us-east-1e", + "CacheNodeId": "0001", + "CacheClusterId": "clustered-redis-0001-001" + }, + { + "PreferredAvailabilityZone": "us-east-1c", + "CacheNodeId": "0001", + "CacheClusterId": "clustered-redis-0001-002" + } + ] + }, + { + "Status": "available", + "NodeGroupId": "0002", + "NodeGroupMembers": [ + { + "PreferredAvailabilityZone": "us-east-1c", + "CacheNodeId": "0001", + "CacheClusterId": "clustered-redis-0002-001" + }, + { + "PreferredAvailabilityZone": "us-east-1b", + "CacheNodeId": "0001", + "CacheClusterId": "clustered-redis-0002-002" + } + ] + } + ], + "ReplicationGroupId": "clustered-redis", + "AutomaticFailover": "enabled", + "MemberClusters": [ + "clustered-redis-0001-001", + "clustered-redis-0001-002", + "clustered-redis-0002-001", + "clustered-redis-0002-002" + ], + "PendingModifiedValues": {} + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5783,7 +7510,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeReplicationGroups operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeReplicationGroups operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeReservedCacheNodes": { @@ -5807,6 +7535,15 @@ ], "traits": { "smithy.api#documentation": "

Returns information about reserved cache nodes for this account, or about a specified\n reserved cache node.

", + "smithy.api#examples": [ + { + "title": "DescribeReservedCacheNodes", + "documentation": "Returns information about reserved cache nodes for this account, or about a specified reserved cache node. If the account has no reserved cache nodes, the operation returns an empty list, as shown here.", + "input": { + "MaxRecords": 25 + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5868,7 +7605,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeReservedCacheNodes operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeReservedCacheNodes operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeReservedCacheNodesOfferings": { @@ -5892,6 +7630,275 @@ ], "traits": { "smithy.api#documentation": "

Lists available reserved cache node offerings.

", + "smithy.api#examples": [ + { + "title": "DescribeReseredCacheNodeOfferings", + "documentation": "Lists available reserved cache node offerings.", + "input": { + "MaxRecords": 20 + }, + "output": { + "Marker": "1ef01f5b-433f-94ff-a530-61a56bfc8e7a", + "ReservedCacheNodesOfferings": [ + { + "OfferingType": "Medium Utilization", + "FixedPrice": 157.0, + "ReservedCacheNodesOfferingId": "0167633d-37f6-4222-b872-b1f22eb79ba4", + "UsagePrice": 0.017, + "RecurringCharges": [], + "ProductDescription": "memcached", + "Duration": 94608000, + "CacheNodeType": "cache.m1.small" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 1248.0, + "ReservedCacheNodesOfferingId": "02c04e13-baca-4e71-9ceb-620eed94827d", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.077, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "redis", + "Duration": 94608000, + "CacheNodeType": "cache.m4.xlarge" + }, + { + "OfferingType": "Medium Utilization", + "FixedPrice": 2381.0, + "ReservedCacheNodesOfferingId": "02e1755e-76e8-48e3-8d82-820a5726a458", + "UsagePrice": 0.276, + "RecurringCharges": [], + "ProductDescription": "memcached", + "Duration": 94608000, + "CacheNodeType": "cache.m2.4xlarge" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 188.0, + "ReservedCacheNodesOfferingId": "03315215-7b87-421a-a3dd-785021e4113f", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.013, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "redis", + "Duration": 94608000, + "CacheNodeType": "cache.m1.small" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 6158.0, + "ReservedCacheNodesOfferingId": "05ffbb44-2ace-4476-a2a5-8ec99f866fb3", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 1.125, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "redis", + "Duration": 31536000, + "CacheNodeType": "cache.m4.10xlarge" + }, + { + "OfferingType": "Medium Utilization", + "FixedPrice": 101.0, + "ReservedCacheNodesOfferingId": "065c71ae-4a4e-4f1e-bebf-37525f4c6cb2", + "UsagePrice": 0.023, + "RecurringCharges": [], + "ProductDescription": "redis", + "Duration": 31536000, + "CacheNodeType": "cache.m1.small" + }, + { + "OfferingType": "Medium Utilization", + "FixedPrice": 314.0, + "ReservedCacheNodesOfferingId": "06774b12-7f5e-48c1-907a-f286c63f327d", + "UsagePrice": 0.034, + "RecurringCharges": [], + "ProductDescription": "memcached", + "Duration": 94608000, + "CacheNodeType": "cache.m1.medium" + }, + { + "OfferingType": "Light Utilization", + "FixedPrice": 163.0, + "ReservedCacheNodesOfferingId": "0924ac6b-847f-4761-ba6b-4290b2adf719", + "UsagePrice": 0.137, + "RecurringCharges": [], + "ProductDescription": "memcached", + "Duration": 31536000, + "CacheNodeType": "cache.m2.xlarge" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 719.0, + "ReservedCacheNodesOfferingId": "09eeb126-69b6-4d3f-8f94-ca3510629f53", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.049, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "redis", + "Duration": 94608000, + "CacheNodeType": "cache.m2.xlarge" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 4132.0, + "ReservedCacheNodesOfferingId": "0a516ad8-557f-4310-9dd0-2448c2ff4d62", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.182, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "redis", + "Duration": 94608000, + "CacheNodeType": "cache.r3.2xlarge" + }, + { + "OfferingType": "Light Utilization", + "FixedPrice": 875.0, + "ReservedCacheNodesOfferingId": "0b0c1cc5-2177-4150-95d7-c67ec34dcb19", + "UsagePrice": 0.363, + "RecurringCharges": [], + "ProductDescription": "memcached", + "Duration": 94608000, + "CacheNodeType": "cache.c1.xlarge" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 12483.0, + "ReservedCacheNodesOfferingId": "0c2b139b-1cff-43d0-8fba-0c753f9b1950", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.76, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "memcached", + "Duration": 94608000, + "CacheNodeType": "cache.m4.10xlarge" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 1620.0, + "ReservedCacheNodesOfferingId": "0c52115b-38cb-47a2-8dbc-e02e40b6a13f", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.207, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "memcached", + "Duration": 31536000, + "CacheNodeType": "cache.c1.xlarge" + }, + { + "OfferingType": "Medium Utilization", + "FixedPrice": 2381.0, + "ReservedCacheNodesOfferingId": "12fcb19c-5416-4e1d-934f-28f1e2cb8599", + "UsagePrice": 0.276, + "RecurringCharges": [], + "ProductDescription": "redis", + "Duration": 94608000, + "CacheNodeType": "cache.m2.4xlarge" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 616.0, + "ReservedCacheNodesOfferingId": "13af20ad-914d-4d8b-9763-fa2e565f3549", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.112, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "memcached", + "Duration": 31536000, + "CacheNodeType": "cache.m4.xlarge" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 16528.0, + "ReservedCacheNodesOfferingId": "14da3d3f-b526-4dbf-b09b-355578b2a576", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.729, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "memcached", + "Duration": 94608000, + "CacheNodeType": "cache.r3.8xlarge" + }, + { + "OfferingType": "Light Utilization", + "FixedPrice": 140.0, + "ReservedCacheNodesOfferingId": "15d7018c-71fb-4717-8409-4bdcdca18da7", + "UsagePrice": 0.052, + "RecurringCharges": [], + "ProductDescription": "redis", + "Duration": 94608000, + "CacheNodeType": "cache.m1.medium" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 4993.0, + "ReservedCacheNodesOfferingId": "1ae7ec5f-a76e-49b6-822b-629b1768a13a", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.304, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "memcached", + "Duration": 94608000, + "CacheNodeType": "cache.m4.4xlarge" + }, + { + "OfferingType": "Heavy Utilization", + "FixedPrice": 1772.0, + "ReservedCacheNodesOfferingId": "1d31242b-3925-48d1-b882-ce03204e6013", + "UsagePrice": 0.0, + "RecurringCharges": [ + { + "RecurringChargeAmount": 0.25, + "RecurringChargeFrequency": "Hourly" + } + ], + "ProductDescription": "redis", + "Duration": 31536000, + "CacheNodeType": "cache.m3.2xlarge" + }, + { + "OfferingType": "Medium Utilization", + "FixedPrice": 54.0, + "ReservedCacheNodesOfferingId": "1ef01f5b-94ff-433f-a530-61a56bfc8e7a", + "UsagePrice": 0.008, + "RecurringCharges": [], + "ProductDescription": "memcached", + "Duration": 31536000, + "CacheNodeType": "cache.t1.micro" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5947,7 +7954,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeReservedCacheNodesOfferings\n operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeReservedCacheNodesOfferings\n operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeServiceUpdates": { @@ -6006,6 +8014,9 @@ "smithy.api#documentation": "

An optional marker returned from a prior request. Use this marker for pagination of\n results from this operation. If this parameter is specified, the response includes only\n records beyond the marker, up to the value specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeSnapshots": { @@ -6032,6 +8043,48 @@ ], "traits": { "smithy.api#documentation": "

Returns information about cluster or replication group snapshots. By default,\n DescribeSnapshots lists all of your snapshots; it can optionally\n describe a single snapshot, or just the snapshots associated with a particular cache\n cluster.

\n \n

This operation is valid for Redis only.

\n
", + "smithy.api#examples": [ + { + "title": "DescribeSnapshots", + "documentation": "Returns information about the snapshot mysnapshot. By default.", + "input": { + "SnapshotName": "snapshot-20161212" + }, + "output": { + "Marker": "", + "Snapshots": [ + { + "Engine": "redis", + "CacheParameterGroupName": "default.redis3.2", + "VpcId": "vpc-91280df6", + "CacheClusterId": "my-redis5", + "SnapshotRetentionLimit": 7, + "NumCacheNodes": 1, + "SnapshotName": "snapshot-20161212", + "CacheClusterCreateTime": "2016-12-21T22:27:12.543Z", + "AutoMinorVersionUpgrade": true, + "PreferredAvailabilityZone": "us-east-1c", + "SnapshotStatus": "available", + "SnapshotSource": "manual", + "SnapshotWindow": "10:00-11:00", + "EngineVersion": "3.2.4", + "NodeSnapshots": [ + { + "CacheSize": "3 MB", + "SnapshotCreateTime": "2016-12-21T22:30:26Z", + "CacheNodeId": "0001", + "CacheNodeCreateTime": "2016-12-21T22:27:12.543Z" + } + ], + "CacheSubnetGroupName": "default", + "Port": 6379, + "PreferredMaintenanceWindow": "fri:05:30-fri:06:30", + "CacheNodeType": "cache.m3.large" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -6057,7 +8110,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeSnapshots operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeSnapshots operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#DescribeSnapshotsMessage": { @@ -6107,7 +8161,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a DescribeSnapshotsMessage operation.

" + "smithy.api#documentation": "

Represents the input of a DescribeSnapshotsMessage operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeUpdateActions": { @@ -6199,6 +8254,9 @@ "smithy.api#documentation": "

An optional marker returned from a prior request. Use this marker for pagination of\n results from this operation. If this parameter is specified, the response includes only\n records beyond the marker, up to the value specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeUserGroups": { @@ -6251,6 +8309,9 @@ "smithy.api#documentation": "

An optional marker returned from a prior request. Use this marker for pagination of\n results from this operation. If this parameter is specified, the response includes only\n records beyond the marker, up to the value specified by MaxRecords. >

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeUserGroupsResult": { @@ -6335,6 +8396,9 @@ "smithy.api#documentation": "

An optional marker returned from a prior request. Use this marker for pagination of\n results from this operation. If this parameter is specified, the response includes only\n records beyond the marker, up to the value specified by MaxRecords. >

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DescribeUsersResult": { @@ -6444,6 +8508,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#DisassociateGlobalReplicationGroupResult": { @@ -6632,7 +8699,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeEvents operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeEvents operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#ExceptionMessage": { @@ -6688,6 +8756,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#FailoverGlobalReplicationGroupResult": { @@ -7041,6 +9112,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#IncreaseNodeGroupsInGlobalReplicationGroupResult": { @@ -7134,6 +9208,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#IncreaseReplicaCountResult": { @@ -7500,7 +9577,28 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all available node types that you can scale your Redis cluster's or replication\n group's current node type.

\n

When you use the ModifyCacheCluster or\n ModifyReplicationGroup operations to scale your cluster or replication\n group, the value of the CacheNodeType parameter must be one of the node\n types returned by this operation.

" + "smithy.api#documentation": "

Lists all available node types that you can scale your Redis cluster's or replication\n group's current node type.

\n

When you use the ModifyCacheCluster or\n ModifyReplicationGroup operations to scale your cluster or replication\n group, the value of the CacheNodeType parameter must be one of the node\n types returned by this operation.

", + "smithy.api#examples": [ + { + "title": "ListAllowedNodeTypeModifications", + "documentation": "Lists all available node types that you can scale your Redis cluster's or replication group's current node type up to.", + "input": { + "ReplicationGroupId": "myreplgroup" + }, + "output": { + "ScaleUpModifications": [ + "cache.m4.10xlarge", + "cache.m4.2xlarge", + "cache.m4.4xlarge", + "cache.m4.xlarge", + "cache.r3.2xlarge", + "cache.r3.4xlarge", + "cache.r3.8xlarge", + "cache.r3.xlarge" + ] + } + } + ] } }, "com.amazonaws.elasticache#ListAllowedNodeTypeModificationsMessage": { @@ -7520,7 +9618,8 @@ } }, "traits": { - "smithy.api#documentation": "

The input parameters for the ListAllowedNodeTypeModifications\n operation.

" + "smithy.api#documentation": "

The input parameters for the ListAllowedNodeTypeModifications\n operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ListTagsForResource": { @@ -7567,7 +9666,28 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all tags currently on a named resource.

\n

A tag is a key-value pair where the key and value are case-sensitive. You can use\n tags to categorize and track all your ElastiCache resources, with the exception of\n global replication group. When you add or remove tags on replication groups, those\n actions will be replicated to all nodes in the replication group. For more information,\n see Resource-level permissions.

\n

If the cluster is not in the available state,\n ListTagsForResource returns an error.

" + "smithy.api#documentation": "

Lists all tags currently on a named resource.

\n

A tag is a key-value pair where the key and value are case-sensitive. You can use\n tags to categorize and track all your ElastiCache resources, with the exception of\n global replication group. When you add or remove tags on replication groups, those\n actions will be replicated to all nodes in the replication group. For more information,\n see Resource-level permissions.

\n

If the cluster is not in the available state,\n ListTagsForResource returns an error.

", + "smithy.api#examples": [ + { + "title": "ListTagsForResource", + "documentation": "Lists all cost allocation tags currently on the named resource. A cost allocation tag is a key-value pair where the key is case-sensitive and the value is optional. You can use cost allocation tags to categorize and track your AWS costs.", + "input": { + "ResourceName": "arn:aws:elasticache:us-west-2::cluster:mycluster" + }, + "output": { + "TagList": [ + { + "Value": "20150202", + "Key": "APIVersion" + }, + { + "Value": "ElastiCache", + "Key": "Service" + } + ] + } + } + ] } }, "com.amazonaws.elasticache#ListTagsForResourceMessage": { @@ -7582,7 +9702,8 @@ } }, "traits": { - "smithy.api#documentation": "

The input parameters for the ListTagsForResource operation.

" + "smithy.api#documentation": "

The input parameters for the ListTagsForResource operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#LogDeliveryConfiguration": { @@ -7798,7 +9919,43 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies the settings for a cluster. You can use this operation to change one or more\n cluster configuration parameters by specifying the parameters and the new values.

" + "smithy.api#documentation": "

Modifies the settings for a cluster. You can use this operation to change one or more\n cluster configuration parameters by specifying the parameters and the new values.

", + "smithy.api#examples": [ + { + "title": "ModifyCacheCluster", + "documentation": "Copies a snapshot to a specified name.", + "input": { + "CacheClusterId": "redis-cluster", + "ApplyImmediately": true, + "SnapshotRetentionLimit": 14 + }, + "output": { + "CacheCluster": { + "Engine": "redis", + "CacheParameterGroup": { + "CacheNodeIdsToReboot": [], + "CacheParameterGroupName": "default.redis3.2", + "ParameterApplyStatus": "in-sync" + }, + "SnapshotRetentionLimit": 14, + "CacheClusterId": "redis-cluster", + "CacheSecurityGroups": [], + "NumCacheNodes": 1, + "SnapshotWindow": "07:00-08:00", + "CacheClusterCreateTime": "2016-12-22T16:27:56.078Z", + "AutoMinorVersionUpgrade": true, + "CacheClusterStatus": "available", + "PreferredAvailabilityZone": "us-east-1e", + "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", + "CacheSubnetGroupName": "default", + "EngineVersion": "3.2.4", + "PendingModifiedValues": {}, + "PreferredMaintenanceWindow": "fri:09:00-fri:10:00", + "CacheNodeType": "cache.r3.large" + } + } + } + ] } }, "com.amazonaws.elasticache#ModifyCacheClusterMessage": { @@ -7934,7 +10091,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ModifyCacheCluster operation.

" + "smithy.api#documentation": "

Represents the input of a ModifyCacheCluster operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ModifyCacheClusterResult": { @@ -7974,7 +10132,29 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies the parameters of a cache parameter group. You can modify up to 20 parameters\n in a single request by submitting a list parameter name and value pairs.

" + "smithy.api#documentation": "

Modifies the parameters of a cache parameter group. You can modify up to 20 parameters\n in a single request by submitting a list parameter name and value pairs.

", + "smithy.api#examples": [ + { + "title": "ModifyCacheParameterGroup", + "documentation": "Modifies one or more parameter values in the specified parameter group. You cannot modify any default parameter group.", + "input": { + "CacheParameterGroupName": "custom-mem1-4", + "ParameterNameValues": [ + { + "ParameterName": "binding_protocol", + "ParameterValue": "ascii" + }, + { + "ParameterName": "chunk_size", + "ParameterValue": "96" + } + ] + }, + "output": { + "CacheParameterGroupName": "custom-mem1-4" + } + } + ] } }, "com.amazonaws.elasticache#ModifyCacheParameterGroupMessage": { @@ -7996,7 +10176,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ModifyCacheParameterGroup operation.

" + "smithy.api#documentation": "

Represents the input of a ModifyCacheParameterGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ModifyCacheSubnetGroup": { @@ -8025,7 +10206,58 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies an existing cache subnet group.

" + "smithy.api#documentation": "

Modifies an existing cache subnet group.

", + "smithy.api#examples": [ + { + "title": "ModifyCacheSubnetGroup", + "documentation": "Modifies an existing ElastiCache subnet group.", + "input": { + "CacheSubnetGroupName": "my-sn-grp", + "SubnetIds": [ + "subnet-bcde2345" + ] + }, + "output": { + "CacheSubnetGroup": { + "VpcId": "vpc-91280df6", + "CacheSubnetGroupDescription": "My subnet group.", + "Subnets": [ + { + "SubnetIdentifier": "subnet-a1b2c3d4", + "SubnetAvailabilityZone": { + "Name": "us-east-1c" + } + }, + { + "SubnetIdentifier": "subnet-1a2b3c4d", + "SubnetAvailabilityZone": { + "Name": "us-east-1e" + } + }, + { + "SubnetIdentifier": "subnet-bcde2345", + "SubnetAvailabilityZone": { + "Name": "us-east-1e" + } + }, + { + "SubnetIdentifier": "subnet-1234abcd", + "SubnetAvailabilityZone": { + "Name": "us-east-1c" + } + }, + { + "SubnetIdentifier": "subnet-abcd1234", + "SubnetAvailabilityZone": { + "Name": "us-east-1b" + } + } + ], + "CacheSubnetGroupName": "my-sn-grp" + } + } + } + ] } }, "com.amazonaws.elasticache#ModifyCacheSubnetGroupMessage": { @@ -8052,7 +10284,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ModifyCacheSubnetGroup operation.

" + "smithy.api#documentation": "

Represents the input of a ModifyCacheSubnetGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ModifyCacheSubnetGroupResult": { @@ -8137,6 +10370,9 @@ "smithy.api#documentation": "

Determines whether a read replica is automatically promoted to read/write primary if\n the existing primary encounters a failure.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ModifyGlobalReplicationGroupResult": { @@ -8209,7 +10445,77 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies the settings for a replication group.

\n \n \n

This operation is valid for Redis only.

\n
" + "smithy.api#documentation": "

Modifies the settings for a replication group.

\n \n \n

This operation is valid for Redis only.

\n
", + "smithy.api#examples": [ + { + "title": "ModifyReplicationGroup", + "documentation": "", + "input": { + "ReplicationGroupId": "my-redis-rg", + "ReplicationGroupDescription": "Modified replication group", + "SnapshottingClusterId": "my-redis-rg-001", + "ApplyImmediately": true, + "SnapshotRetentionLimit": 30 + }, + "output": { + "ReplicationGroup": { + "Status": "available", + "Description": "Modified replication group", + "NodeGroups": [ + { + "Status": "available", + "NodeGroupMembers": [ + { + "CurrentRole": "primary", + "PreferredAvailabilityZone": "us-east-1b", + "CacheNodeId": "0001", + "ReadEndpoint": { + "Port": 6379, + "Address": "my-redis-rg-001.abcdef.0001.use1.cache.amazonaws.com" + }, + "CacheClusterId": "my-redis-rg-001" + }, + { + "CurrentRole": "replica", + "PreferredAvailabilityZone": "us-east-1a", + "CacheNodeId": "0001", + "ReadEndpoint": { + "Port": 6379, + "Address": "my-redis-rg-002.abcdef.0001.use1.cache.amazonaws.com" + }, + "CacheClusterId": "my-redis-rg-002" + }, + { + "CurrentRole": "replica", + "PreferredAvailabilityZone": "us-east-1c", + "CacheNodeId": "0001", + "ReadEndpoint": { + "Port": 6379, + "Address": "my-redis-rg-003.abcdef.0001.use1.cache.amazonaws.com" + }, + "CacheClusterId": "my-redis-rg-003" + } + ], + "NodeGroupId": "0001", + "PrimaryEndpoint": { + "Port": 6379, + "Address": "my-redis-rg.abcdef.ng.0001.use1.cache.amazonaws.com" + } + } + ], + "ReplicationGroupId": "my-redis-rg", + "AutomaticFailover": "enabled", + "SnapshottingClusterId": "my-redis-rg-002", + "MemberClusters": [ + "my-redis-rg-001", + "my-redis-rg-002", + "my-redis-rg-003" + ], + "PendingModifiedValues": {} + } + } + } + ] } }, "com.amazonaws.elasticache#ModifyReplicationGroupMessage": { @@ -8394,7 +10700,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ModifyReplicationGroups operation.

" + "smithy.api#documentation": "

Represents the input of a ModifyReplicationGroups operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ModifyReplicationGroupResult": { @@ -8498,7 +10805,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input for a ModifyReplicationGroupShardConfiguration\n operation.

" + "smithy.api#documentation": "

Represents the input for a ModifyReplicationGroupShardConfiguration\n operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ModifyReplicationGroupShardConfigurationResult": { @@ -8601,6 +10909,9 @@ "smithy.api#documentation": "

The list of user IDs to remove from the user group.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ModifyUserMessage": { @@ -8643,6 +10954,9 @@ "smithy.api#documentation": "

Specifies how to authenticate the user.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#MultiAZStatus": { @@ -9539,7 +11853,16 @@ } ], "traits": { - "smithy.api#documentation": "

Allows you to purchase a reserved cache node offering. Reserved nodes are not eligible\n for cancellation and are non-refundable. For more information, see Managing Costs with Reserved Nodes for Redis or Managing Costs with\n Reserved Nodes for Memcached.

" + "smithy.api#documentation": "

Allows you to purchase a reserved cache node offering. Reserved nodes are not eligible\n for cancellation and are non-refundable. For more information, see Managing Costs with Reserved Nodes for Redis or Managing Costs with\n Reserved Nodes for Memcached.

", + "smithy.api#examples": [ + { + "title": "PurchaseReservedCacheNodesOfferings", + "documentation": "Allows you to purchase a reserved cache node offering.", + "input": { + "ReservedCacheNodesOfferingId": "1ef01f5b-94ff-433f-a530-61a56bfc8e7a" + } + } + ] } }, "com.amazonaws.elasticache#PurchaseReservedCacheNodesOfferingMessage": { @@ -9572,7 +11895,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a PurchaseReservedCacheNodesOffering\n operation.

" + "smithy.api#documentation": "

Represents the input of a PurchaseReservedCacheNodesOffering\n operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#PurchaseReservedCacheNodesOfferingResult": { @@ -9627,6 +11951,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#RebalanceSlotsInGlobalReplicationGroupResult": { @@ -9657,7 +11984,47 @@ } ], "traits": { - "smithy.api#documentation": "

Reboots some, or all, of the cache nodes within a provisioned cluster. This operation\n applies any modified cache parameter groups to the cluster. The reboot operation takes\n place as soon as possible, and results in a momentary outage to the cluster. During the\n reboot, the cluster status is set to REBOOTING.

\n

The reboot causes the contents of the cache (for each cache node being rebooted) to be\n lost.

\n

When the reboot is complete, a cluster event is created.

\n

Rebooting a cluster is currently supported on Memcached and Redis (cluster mode\n disabled) clusters. Rebooting is not supported on Redis (cluster mode enabled)\n clusters.

\n

If you make changes to parameters that require a Redis (cluster mode enabled) cluster\n reboot for the changes to be applied, see Rebooting a Cluster for an alternate process.

" + "smithy.api#documentation": "

Reboots some, or all, of the cache nodes within a provisioned cluster. This operation\n applies any modified cache parameter groups to the cluster. The reboot operation takes\n place as soon as possible, and results in a momentary outage to the cluster. During the\n reboot, the cluster status is set to REBOOTING.

\n

The reboot causes the contents of the cache (for each cache node being rebooted) to be\n lost.

\n

When the reboot is complete, a cluster event is created.

\n

Rebooting a cluster is currently supported on Memcached and Redis (cluster mode\n disabled) clusters. Rebooting is not supported on Redis (cluster mode enabled)\n clusters.

\n

If you make changes to parameters that require a Redis (cluster mode enabled) cluster\n reboot for the changes to be applied, see Rebooting a Cluster for an alternate process.

", + "smithy.api#examples": [ + { + "title": "RebootCacheCluster", + "documentation": "Reboots the specified nodes in the names cluster.", + "input": { + "CacheClusterId": "custom-mem1-4 ", + "CacheNodeIdsToReboot": [ + "0001", + "0002" + ] + }, + "output": { + "CacheCluster": { + "Engine": "memcached", + "CacheParameterGroup": { + "CacheNodeIdsToReboot": [], + "CacheParameterGroupName": "default.memcached1.4", + "ParameterApplyStatus": "in-sync" + }, + "CacheClusterId": "my-mem-cluster", + "PreferredAvailabilityZone": "Multiple", + "ConfigurationEndpoint": { + "Port": 11211, + "Address": "my-mem-cluster.abcdef.cfg.use1.cache.amazonaws.com" + }, + "CacheSecurityGroups": [], + "CacheClusterCreateTime": "2016-12-21T21:59:43.794Z", + "AutoMinorVersionUpgrade": true, + "CacheClusterStatus": "rebooting cache cluster nodes", + "NumCacheNodes": 2, + "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", + "CacheSubnetGroupName": "default", + "EngineVersion": "1.4.24", + "PendingModifiedValues": {}, + "PreferredMaintenanceWindow": "wed:06:00-wed:07:00", + "CacheNodeType": "cache.t2.medium" + } + } + } + ] } }, "com.amazonaws.elasticache#RebootCacheClusterMessage": { @@ -9679,7 +12046,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a RebootCacheCluster operation.

" + "smithy.api#documentation": "

Represents the input of a RebootCacheCluster operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#RebootCacheClusterResult": { @@ -9814,7 +12182,45 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the tags identified by the TagKeys list from the named resource.\n A tag is a key-value pair where the key and value are case-sensitive. You can use tags\n to categorize and track all your ElastiCache resources, with the exception of global\n replication group. When you add or remove tags on replication groups, those actions will\n be replicated to all nodes in the replication group. For more information, see Resource-level permissions.

" + "smithy.api#documentation": "

Removes the tags identified by the TagKeys list from the named resource.\n A tag is a key-value pair where the key and value are case-sensitive. You can use tags\n to categorize and track all your ElastiCache resources, with the exception of global\n replication group. When you add or remove tags on replication groups, those actions will\n be replicated to all nodes in the replication group. For more information, see Resource-level permissions.

", + "smithy.api#examples": [ + { + "title": "RemoveTagsFromResource", + "documentation": "Removes tags identified by a list of tag keys from the list of tags on the specified resource.", + "input": { + "ResourceName": "arn:aws:elasticache:us-east-1:1234567890:cluster:my-mem-cluster", + "TagKeys": [ + "A", + "C", + "E" + ] + }, + "output": { + "TagList": [ + { + "Value": "Banana", + "Key": "B" + }, + { + "Value": "Dog", + "Key": "D" + }, + { + "Value": "Fox", + "Key": "F" + }, + { + "Value": "", + "Key": "I" + }, + { + "Value": "Kite", + "Key": "K" + } + ] + } + } + ] } }, "com.amazonaws.elasticache#RemoveTagsFromResourceMessage": { @@ -9836,7 +12242,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a RemoveTagsFromResource operation.

" + "smithy.api#documentation": "

Represents the input of a RemoveTagsFromResource operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ReplicaConfigurationList": { @@ -10115,7 +12522,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeReplicationGroups operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeReplicationGroups operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#ReplicationGroupNotFoundFault": { @@ -10356,7 +12764,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeReservedCacheNodes operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeReservedCacheNodes operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#ReservedCacheNodeNotFoundFault": { @@ -10478,7 +12887,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeReservedCacheNodesOfferings\n operation.

" + "smithy.api#documentation": "

Represents the output of a DescribeReservedCacheNodesOfferings\n operation.

", + "smithy.api#output": {} } }, "com.amazonaws.elasticache#ReservedCacheNodesOfferingNotFoundFault": { @@ -10524,7 +12934,20 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies the parameters of a cache parameter group to the engine or system default\n value. You can reset specific parameters by submitting a list of parameter names. To\n reset the entire cache parameter group, specify the ResetAllParameters and\n CacheParameterGroupName parameters.

" + "smithy.api#documentation": "

Modifies the parameters of a cache parameter group to the engine or system default\n value. You can reset specific parameters by submitting a list of parameter names. To\n reset the entire cache parameter group, specify the ResetAllParameters and\n CacheParameterGroupName parameters.

", + "smithy.api#examples": [ + { + "title": "ResetCacheParameterGroup", + "documentation": "Modifies the parameters of a cache parameter group to the engine or system default value.", + "input": { + "CacheParameterGroupName": "custom-mem1-4", + "ResetAllParameters": true + }, + "output": { + "CacheParameterGroupName": "custom-mem1-4" + } + } + ] } }, "com.amazonaws.elasticache#ResetCacheParameterGroupMessage": { @@ -10552,7 +12975,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a ResetCacheParameterGroup operation.

" + "smithy.api#documentation": "

Represents the input of a ResetCacheParameterGroup operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#ReshardingConfiguration": { @@ -10624,7 +13048,18 @@ } ], "traits": { - "smithy.api#documentation": "

Revokes ingress from a cache security group. Use this operation to disallow access\n from an Amazon EC2 security group that had been previously authorized.

" + "smithy.api#documentation": "

Revokes ingress from a cache security group. Use this operation to disallow access\n from an Amazon EC2 security group that had been previously authorized.

", + "smithy.api#examples": [ + { + "title": "DescribeCacheSecurityGroups", + "documentation": "Returns a list of cache security group descriptions. If a cache security group name is specified, the list contains only the description of that group.", + "input": { + "CacheSecurityGroupName": "my-sec-grp", + "EC2SecurityGroupName": "my-ec2-sec-grp", + "EC2SecurityGroupOwnerId": "1234567890" + } + } + ] } }, "com.amazonaws.elasticache#RevokeCacheSecurityGroupIngressMessage": { @@ -10653,7 +13088,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the input of a RevokeCacheSecurityGroupIngress\n operation.

" + "smithy.api#documentation": "

Represents the input of a RevokeCacheSecurityGroupIngress\n operation.

", + "smithy.api#input": {} } }, "com.amazonaws.elasticache#RevokeCacheSecurityGroupIngressResult": { @@ -10915,6 +13351,9 @@ "smithy.api#documentation": "

A list of service updates

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticache#SlaMet": { @@ -11308,6 +13747,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#StartMigrationResponse": { @@ -11560,6 +14002,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#TestFailoverNotAvailableFault": { @@ -11633,6 +14078,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.elasticache#TestMigrationResponse": { @@ -11958,6 +14406,9 @@ "smithy.api#documentation": "

Returns a list of update actions

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.elasticache#User": { diff --git a/codegen/sdk-codegen/aws-models/elasticsearch-service.json b/codegen/sdk-codegen/aws-models/elasticsearch-service.json index 19488cd4838..055e35ee74f 100644 --- a/codegen/sdk-codegen/aws-models/elasticsearch-service.json +++ b/codegen/sdk-codegen/aws-models/elasticsearch-service.json @@ -512,6 +512,7 @@ "arnNamespace": "es", "cloudFormationName": "Elasticsearch", "cloudTrailEventSource": "elasticsearchservice.amazonaws.com", + "docId": "es-2015-01-01", "endpointPrefix": "es" }, "aws.auth#sigv4": { @@ -583,52 +584,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -636,13 +641,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -652,224 +666,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://es-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://es-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://es.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://es.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://es.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://es.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/emr-containers.json b/codegen/sdk-codegen/aws-models/emr-containers.json index 45f3ee74f19..f61f780df6a 100644 --- a/codegen/sdk-codegen/aws-models/emr-containers.json +++ b/codegen/sdk-codegen/aws-models/emr-containers.json @@ -178,52 +178,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -231,13 +235,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -247,224 +260,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://emr-containers-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://emr-containers-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://emr-containers-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://emr-containers-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://emr-containers.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://emr-containers.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://emr-containers.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://emr-containers.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/emr-serverless.json b/codegen/sdk-codegen/aws-models/emr-serverless.json index c802b39f927..7357a119ffa 100644 --- a/codegen/sdk-codegen/aws-models/emr-serverless.json +++ b/codegen/sdk-codegen/aws-models/emr-serverless.json @@ -490,52 +490,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -543,13 +547,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -559,224 +572,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://emr-serverless-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://emr-serverless-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://emr-serverless-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://emr-serverless-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://emr-serverless.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://emr-serverless.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://emr-serverless.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://emr-serverless.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/emr.json b/codegen/sdk-codegen/aws-models/emr.json index 96cd70eea49..942be6f9d05 100644 --- a/codegen/sdk-codegen/aws-models/emr.json +++ b/codegen/sdk-codegen/aws-models/emr.json @@ -2744,6 +2744,7 @@ "arnNamespace": "elasticmapreduce", "cloudFormationName": "EMR", "cloudTrailEventSource": "emr.amazonaws.com", + "docId": "elasticmapreduce-2009-03-31", "endpointPrefix": "elasticmapreduce" }, "aws.auth#sigv4": { @@ -2815,52 +2816,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2868,13 +2873,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2884,92 +2898,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elasticmapreduce-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://elasticmapreduce-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -2978,155 +2983,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://elasticmapreduce.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://elasticmapreduce-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://elasticmapreduce.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://elasticmapreduce-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://elasticmapreduce.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://elasticmapreduce.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://elasticmapreduce.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://elasticmapreduce.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/evidently.json b/codegen/sdk-codegen/aws-models/evidently.json index a0d5f80467a..df0337b14a6 100644 --- a/codegen/sdk-codegen/aws-models/evidently.json +++ b/codegen/sdk-codegen/aws-models/evidently.json @@ -1402,52 +1402,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1455,13 +1459,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1471,224 +1484,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://evidently-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://evidently-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://evidently-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://evidently-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://evidently.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://evidently.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://evidently.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://evidently.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1702,9 +1666,9 @@ } }, "params": { + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { @@ -1715,9 +1679,9 @@ } }, "params": { + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { @@ -1728,9 +1692,9 @@ } }, "params": { + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { @@ -1741,9 +1705,9 @@ } }, "params": { + "Region": "eu-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-central-1" + "UseDualStack": false } }, { @@ -1754,9 +1718,9 @@ } }, "params": { + "Region": "eu-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-north-1" + "UseDualStack": false } }, { @@ -1767,9 +1731,9 @@ } }, "params": { + "Region": "eu-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": false } }, { @@ -1780,9 +1744,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -1793,9 +1757,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -1806,9 +1770,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -1819,9 +1783,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -1832,9 +1796,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -1845,9 +1809,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -1858,9 +1822,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1871,9 +1835,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -1884,9 +1848,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1897,9 +1861,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -1910,9 +1874,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -1923,9 +1887,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -1936,9 +1900,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -1949,9 +1913,20 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-east-1" + "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 } }, { @@ -1962,9 +1937,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -1975,9 +1961,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -1988,9 +1985,20 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-isob-east-1" + "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 } }, { @@ -2001,9 +2009,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -2014,9 +2022,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -2039,9 +2047,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -2051,11 +2059,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/finspace-data.json b/codegen/sdk-codegen/aws-models/finspace-data.json index 7ae488aac46..7a05fb6f548 100644 --- a/codegen/sdk-codegen/aws-models/finspace-data.json +++ b/codegen/sdk-codegen/aws-models/finspace-data.json @@ -133,6 +133,7 @@ "arnNamespace": "finspace-api", "cloudFormationName": "Finspacedata", "cloudTrailEventSource": "finspacedata.amazonaws.com", + "docId": "finspace-2020-07-13", "endpointPrefix": "finspace-api" }, "aws.auth#sigv4": { @@ -201,52 +202,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -254,13 +259,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -270,224 +284,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://finspace-api-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://finspace-api-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://finspace-api-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://finspace-api-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://finspace-api.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://finspace-api.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://finspace-api.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://finspace-api.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -502,8 +467,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -515,8 +480,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -528,8 +493,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -541,8 +506,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -554,8 +519,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -567,8 +532,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -580,8 +545,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -593,8 +558,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -606,8 +571,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -619,8 +584,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -632,8 +597,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -645,8 +610,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -658,8 +623,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -671,8 +636,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -684,8 +649,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -697,8 +662,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -710,8 +686,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -723,8 +710,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -736,8 +734,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -749,8 +758,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -762,8 +771,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -775,8 +784,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -787,8 +796,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -799,10 +808,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -843,53 +858,67 @@ } }, "com.amazonaws.finspacedata#ApiAccess": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" } - ] + } } }, "com.amazonaws.finspacedata#ApplicationPermission": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CreateDataset", - "name": "CreateDataset" - }, - { - "value": "ManageClusters", - "name": "ManageClusters" - }, - { - "value": "ManageUsersAndGroups", - "name": "ManageUsersAndGroups" - }, - { - "value": "ManageAttributeSets", - "name": "ManageAttributeSets" - }, - { - "value": "ViewAuditData", - "name": "ViewAuditData" - }, - { - "value": "AccessNotebooks", - "name": "AccessNotebooks" - }, - { - "value": "GetTemporaryCredentials", - "name": "GetTemporaryCredentials" + "type": "enum", + "members": { + "CreateDataset": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreateDataset" + } + }, + "ManageClusters": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ManageClusters" + } + }, + "ManageUsersAndGroups": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ManageUsersAndGroups" + } + }, + "ManageAttributeSets": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ManageAttributeSets" + } + }, + "ViewAuditData": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ViewAuditData" } - ] + }, + "AccessNotebooks": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AccessNotebooks" + } + }, + "GetTemporaryCredentials": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GetTemporaryCredentials" + } + } } }, "com.amazonaws.finspacedata#ApplicationPermissionList": { @@ -961,6 +990,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#AssociateUserToPermissionGroupResponse": { @@ -974,6 +1006,9 @@ "smithy.api#httpResponseCode": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#AwsCredentials": { @@ -1017,23 +1052,29 @@ } }, "com.amazonaws.finspacedata#ChangeType": { - "type": "string", - "traits": { - "smithy.api#documentation": "Indicates how the given change will be applied to the dataset.", - "smithy.api#enum": [ - { - "value": "REPLACE", - "name": "REPLACE" - }, - { - "value": "APPEND", - "name": "APPEND" - }, - { - "value": "MODIFY", - "name": "MODIFY" + "type": "enum", + "members": { + "REPLACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REPLACE" + } + }, + "APPEND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPEND" + } + }, + "MODIFY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MODIFY" } - ] + } + }, + "traits": { + "smithy.api#documentation": "Indicates how the given change will be applied to the dataset." } }, "com.amazonaws.finspacedata#ChangesetArn": { @@ -1130,7 +1171,7 @@ "status": { "target": "com.amazonaws.finspacedata#IngestionStatus", "traits": { - "smithy.api#documentation": "

Status of the Changeset ingestion.

\n " + "smithy.api#documentation": "

Status of the Changeset ingestion.

\n " } }, "errorInfo": { @@ -1182,59 +1223,83 @@ } }, "com.amazonaws.finspacedata#ColumnDataType": { - "type": "string", - "traits": { - "smithy.api#documentation": "Data type of a column.", - "smithy.api#enum": [ - { - "value": "STRING", - "name": "STRING" - }, - { - "value": "CHAR", - "name": "CHAR" - }, - { - "value": "INTEGER", - "name": "INTEGER" - }, - { - "value": "TINYINT", - "name": "TINYINT" - }, - { - "value": "SMALLINT", - "name": "SMALLINT" - }, - { - "value": "BIGINT", - "name": "BIGINT" - }, - { - "value": "FLOAT", - "name": "FLOAT" - }, - { - "value": "DOUBLE", - "name": "DOUBLE" - }, - { - "value": "DATE", - "name": "DATE" - }, - { - "value": "DATETIME", - "name": "DATETIME" - }, - { - "value": "BOOLEAN", - "name": "BOOLEAN" - }, - { - "value": "BINARY", - "name": "BINARY" + "type": "enum", + "members": { + "STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STRING" + } + }, + "CHAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CHAR" + } + }, + "INTEGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTEGER" + } + }, + "TINYINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TINYINT" + } + }, + "SMALLINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SMALLINT" + } + }, + "BIGINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BIGINT" + } + }, + "FLOAT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FLOAT" + } + }, + "DOUBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOUBLE" + } + }, + "DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATE" + } + }, + "DATETIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATETIME" + } + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOOLEAN" + } + }, + "BINARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BINARY" } - ] + } + }, + "traits": { + "smithy.api#documentation": "Data type of a column." } }, "com.amazonaws.finspacedata#ColumnDefinition": { @@ -1394,13 +1459,14 @@ "formatParams": { "target": "com.amazonaws.finspacedata#FormatParams", "traits": { - "smithy.api#documentation": "

Options that define the structure of the source file(s) including the format type (formatType), header row (withHeader), data separation character (separator) and the type of compression (compression).\n

\n

\n formatType is a required attribute and can have the following values:\n

\n \n \n

Here is an example of how you could specify the formatParams:

\n

\n \n \"formatParams\": \n {\n \"formatType\": \"CSV\",\n \"withHeader\": \"true\",\n \"separator\": \",\",\n \"compression\":\"None\"\n } \n \n

\n

Note that if you only provide formatType as CSV, the rest of the attributes will automatically default to CSV values as following:

\n

\n \n {\n \"withHeader\": \"true\",\n \"separator\": \",\"\n }\n \n

\n

For more information about supported file formats, see Supported Data Types and File Formats in the FinSpace User Guide.

", + "smithy.api#documentation": "

Options that define the structure of the source file(s) including the format type (formatType), header row (withHeader), data separation character (separator) and the type of compression (compression).\n

\n

\n formatType is a required attribute and can have the following values:\n

\n \n

Here is an example of how you could specify the formatParams:

\n

\n \n \"formatParams\": \n {\n \"formatType\": \"CSV\",\n \"withHeader\": \"true\",\n \"separator\": \",\",\n \"compression\":\"None\"\n } \n \n

\n

Note that if you only provide formatType as CSV, the rest of the attributes will automatically default to CSV values as following:

\n

\n \n {\n \"withHeader\": \"true\",\n \"separator\": \",\"\n }\n \n

\n

For more information about supported file formats, see Supported Data Types and File Formats in the FinSpace User Guide.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "The request for a CreateChangeset operation." + "smithy.api#documentation": "The request for a CreateChangeset operation.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#CreateChangesetResponse": { @@ -1420,7 +1486,8 @@ } }, "traits": { - "smithy.api#documentation": "The response from a CreateChangeset operation." + "smithy.api#documentation": "The response from a CreateChangeset operation.", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#CreateDataView": { @@ -1513,7 +1580,8 @@ } }, "traits": { - "smithy.api#documentation": "Request for creating a data view." + "smithy.api#documentation": "Request for creating a data view.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#CreateDataViewResponse": { @@ -1533,7 +1601,8 @@ } }, "traits": { - "smithy.api#documentation": "Response for creating a data view." + "smithy.api#documentation": "Response for creating a data view.", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#CreateDataset": { @@ -1633,7 +1702,8 @@ } }, "traits": { - "smithy.api#documentation": "The request for a CreateDataset operation" + "smithy.api#documentation": "The request for a CreateDataset operation", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#CreateDatasetResponse": { @@ -1647,7 +1717,8 @@ } }, "traits": { - "smithy.api#documentation": "The response from a CreateDataset operation" + "smithy.api#documentation": "The response from a CreateDataset operation", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#CreatePermissionGroup": { @@ -1717,6 +1788,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#CreatePermissionGroupResponse": { @@ -1728,6 +1802,9 @@ "smithy.api#documentation": "

The unique identifier for the permission group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#CreateUser": { @@ -1815,6 +1892,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#CreateUserResponse": { @@ -1826,6 +1906,9 @@ "smithy.api#documentation": "

The unique identifier for the user.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#Credentials": { @@ -1885,7 +1968,7 @@ "s3DestinationExportFileFormatOptions": { "target": "com.amazonaws.finspacedata#S3DestinationFormatOptions", "traits": { - "smithy.api#documentation": "

Format Options for S3 Destination type.

\n

Here is an example of how you could specify the s3DestinationExportFileFormatOptions \n

\n

\n \n {\n \"header\": \"true\",\n \"delimiter\": \",\",\n \"compression\": \"gzip\"\n }\n

" + "smithy.api#documentation": "

Format Options for S3 Destination type.

\n

Here is an example of how you could specify the s3DestinationExportFileFormatOptions\n

\n

\n \n {\n \"header\": \"true\",\n \"delimiter\": \",\",\n \"compression\": \"gzip\"\n }\n

" } } }, @@ -1933,43 +2016,59 @@ } }, "com.amazonaws.finspacedata#DataViewStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "Status of a DataView", - "smithy.api#enum": [ - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "STARTING", - "name": "STARTING" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "CANCELLED", - "name": "CANCELLED" - }, - { - "value": "TIMEOUT", - "name": "TIMEOUT" - }, - { - "value": "SUCCESS", - "name": "SUCCESS" - }, - { - "value": "PENDING", - "name": "PENDING" - }, - { - "value": "FAILED_CLEANUP_FAILED", - "name": "FAILED_CLEANUP_FAILED" + "type": "enum", + "members": { + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "STARTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STARTING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCELLED" + } + }, + "TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT" + } + }, + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "FAILED_CLEANUP_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED_CLEANUP_FAILED" } - ] + } + }, + "traits": { + "smithy.api#documentation": "Status of a DataView" } }, "com.amazonaws.finspacedata#DataViewSummary": { @@ -2015,7 +2114,7 @@ "status": { "target": "com.amazonaws.finspacedata#DataViewStatus", "traits": { - "smithy.api#documentation": "

The status of a Dataview creation.

\n " + "smithy.api#documentation": "

The status of a Dataview creation.

\n " } }, "errorInfo": { @@ -2154,19 +2253,23 @@ } }, "com.amazonaws.finspacedata#DatasetKind": { - "type": "string", - "traits": { - "smithy.api#documentation": "Dataset Kind", - "smithy.api#enum": [ - { - "value": "TABULAR", - "name": "TABULAR" - }, - { - "value": "NON_TABULAR", - "name": "NON_TABULAR" + "type": "enum", + "members": { + "TABULAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TABULAR" } - ] + }, + "NON_TABULAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NON_TABULAR" + } + } + }, + "traits": { + "smithy.api#documentation": "Dataset Kind" } }, "com.amazonaws.finspacedata#DatasetList": { @@ -2205,27 +2308,35 @@ } }, "com.amazonaws.finspacedata#DatasetStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "Status of the dataset process returned from scheduler service.", - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "PENDING" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "SUCCESS", - "name": "SUCCESS" - }, - { - "value": "RUNNING", - "name": "RUNNING" + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + }, + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" + } + }, + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + } + }, + "traits": { + "smithy.api#documentation": "Status of the dataset process returned from scheduler service." } }, "com.amazonaws.finspacedata#DatasetTitle": { @@ -2300,7 +2411,8 @@ } }, "traits": { - "smithy.api#documentation": "The request for a DeleteDataset operation." + "smithy.api#documentation": "The request for a DeleteDataset operation.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#DeleteDatasetResponse": { @@ -2314,7 +2426,8 @@ } }, "traits": { - "smithy.api#documentation": "The response from an DeleteDataset operation" + "smithy.api#documentation": "The response from an DeleteDataset operation", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#DeletePermissionGroup": { @@ -2376,6 +2489,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#DeletePermissionGroupResponse": { @@ -2387,6 +2503,9 @@ "smithy.api#documentation": "

The unique identifier for the deleted permission group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#DisableUser": { @@ -2444,6 +2563,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#DisableUserResponse": { @@ -2455,6 +2577,9 @@ "smithy.api#documentation": "

The unique identifier for the disabled user account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#DisassociateUserFromPermissionGroup": { @@ -2521,6 +2646,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#DisassociateUserFromPermissionGroupResponse": { @@ -2534,6 +2662,9 @@ "smithy.api#httpResponseCode": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#Email": { @@ -2605,6 +2736,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#EnableUserResponse": { @@ -2616,46 +2750,65 @@ "smithy.api#documentation": "

The unique identifier for the enabled user account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#ErrorCategory": { - "type": "string", - "traits": { - "smithy.api#documentation": "Changeset Error Category", - "smithy.api#enum": [ - { - "value": "VALIDATION", - "name": "VALIDATION" - }, - { - "value": "SERVICE_QUOTA_EXCEEDED", - "name": "SERVICE_QUOTA_EXCEEDED" - }, - { - "value": "ACCESS_DENIED", - "name": "ACCESS_DENIED" - }, - { - "value": "RESOURCE_NOT_FOUND", - "name": "RESOURCE_NOT_FOUND" - }, - { - "value": "THROTTLING", - "name": "THROTTLING" - }, - { - "value": "INTERNAL_SERVICE_EXCEPTION", - "name": "INTERNAL_SERVICE_EXCEPTION" - }, - { - "value": "CANCELLED", - "name": "CANCELLED" - }, - { - "value": "USER_RECOVERABLE", - "name": "USER_RECOVERABLE" + "type": "enum", + "members": { + "VALIDATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VALIDATION" + } + }, + "SERVICE_QUOTA_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SERVICE_QUOTA_EXCEEDED" + } + }, + "ACCESS_DENIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED" + } + }, + "RESOURCE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESOURCE_NOT_FOUND" + } + }, + "THROTTLING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "THROTTLING" + } + }, + "INTERNAL_SERVICE_EXCEPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTERNAL_SERVICE_EXCEPTION" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCELLED" + } + }, + "USER_RECOVERABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USER_RECOVERABLE" } - ] + } + }, + "traits": { + "smithy.api#documentation": "Changeset Error Category" } }, "com.amazonaws.finspacedata#ErrorMessage": { @@ -2672,19 +2825,23 @@ "type": "string" }, "com.amazonaws.finspacedata#ExportFileFormat": { - "type": "string", - "traits": { - "smithy.api#documentation": "Data View Export File Format", - "smithy.api#enum": [ - { - "value": "PARQUET", - "name": "PARQUET" - }, - { - "value": "DELIMITED_TEXT", - "name": "DELIMITED_TEXT" + "type": "enum", + "members": { + "PARQUET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARQUET" + } + }, + "DELIMITED_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELIMITED_TEXT" } - ] + } + }, + "traits": { + "smithy.api#documentation": "Data View Export File Format" } }, "com.amazonaws.finspacedata#FirstName": { @@ -2768,7 +2925,8 @@ } }, "traits": { - "smithy.api#documentation": "Request to describe a changeset." + "smithy.api#documentation": "Request to describe a changeset.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#GetChangesetResponse": { @@ -2857,7 +3015,8 @@ } }, "traits": { - "smithy.api#documentation": "The response from a describe changeset operation" + "smithy.api#documentation": "The response from a describe changeset operation", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#GetDataView": { @@ -2915,7 +3074,8 @@ } }, "traits": { - "smithy.api#documentation": "Request for retrieving a data view detail. Grouped / accessible within a dataset by its dataset id." + "smithy.api#documentation": "Request for retrieving a data view detail. Grouped / accessible within a dataset by its dataset id.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#GetDataViewResponse": { @@ -2994,12 +3154,13 @@ "status": { "target": "com.amazonaws.finspacedata#DataViewStatus", "traits": { - "smithy.api#documentation": "

The status of a Dataview creation.

\n " + "smithy.api#documentation": "

The status of a Dataview creation.

\n " } } }, "traits": { - "smithy.api#documentation": "Response from retrieving a dataview, which includes details on the target database and table name" + "smithy.api#documentation": "Response from retrieving a dataview, which includes details on the target database and table name", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#GetDataset": { @@ -3052,7 +3213,8 @@ } }, "traits": { - "smithy.api#documentation": "Request for the GetDataset operation." + "smithy.api#documentation": "Request for the GetDataset operation.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#GetDatasetResponse": { @@ -3122,7 +3284,8 @@ } }, "traits": { - "smithy.api#documentation": "Response for the GetDataset operation" + "smithy.api#documentation": "Response for the GetDataset operation", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#GetExternalDataViewAccessDetails": { @@ -3178,6 +3341,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#GetExternalDataViewAccessDetailsResponse": { @@ -3195,6 +3361,9 @@ "smithy.api#documentation": "

The location where the external Dataview is stored.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#GetPermissionGroup": { @@ -3242,6 +3411,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#GetPermissionGroupResponse": { @@ -3250,6 +3422,9 @@ "permissionGroup": { "target": "com.amazonaws.finspacedata#PermissionGroup" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#GetProgrammaticAccessCredentials": { @@ -3304,7 +3479,8 @@ } }, "traits": { - "smithy.api#documentation": "Request for GetProgrammaticAccessCredentials operation" + "smithy.api#documentation": "Request for GetProgrammaticAccessCredentials operation", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#GetProgrammaticAccessCredentialsResponse": { @@ -3325,7 +3501,8 @@ } }, "traits": { - "smithy.api#documentation": "Response for GetProgrammaticAccessCredentials operation" + "smithy.api#documentation": "Response for GetProgrammaticAccessCredentials operation", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#GetUser": { @@ -3373,6 +3550,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#GetUserResponse": { @@ -3461,6 +3641,9 @@ "smithy.api#documentation": "

Describes the last time that the user logged into their account. The value is determined as epoch time in milliseconds.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#GetWorkingLocation": { @@ -3503,6 +3686,9 @@ "smithy.api#documentation": "

Specify the type of the working location.

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#GetWorkingLocationResponse": { @@ -3526,6 +3712,9 @@ "smithy.api#documentation": "

Returns the Amazon S3 bucket name for the working location.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#IdType": { @@ -3538,31 +3727,41 @@ } }, "com.amazonaws.finspacedata#IngestionStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "Status of the ingestion process returned from scheduler service.", - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "PENDING" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "SUCCESS", - "name": "SUCCESS" - }, - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "STOP_REQUESTED", - "name": "STOP_REQUESTED" + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" + } + }, + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" } - ] + }, + "STOP_REQUESTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOP_REQUESTED" + } + } + }, + "traits": { + "smithy.api#documentation": "Status of the ingestion process returned from scheduler service." } }, "com.amazonaws.finspacedata#InternalServerException": { @@ -3673,7 +3872,8 @@ } }, "traits": { - "smithy.api#documentation": "Request to ListChangesetsRequest. It exposes minimal query filters." + "smithy.api#documentation": "Request to ListChangesetsRequest. It exposes minimal query filters.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#ListChangesetsResponse": { @@ -3693,7 +3893,8 @@ } }, "traits": { - "smithy.api#documentation": "Response to ListChangesetsResponse. This returns a list of dataset changesets that match the query criteria." + "smithy.api#documentation": "Response to ListChangesetsResponse. This returns a list of dataset changesets that match the query criteria.", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#ListDataViews": { @@ -3764,7 +3965,8 @@ } }, "traits": { - "smithy.api#documentation": "Request for a list data views." + "smithy.api#documentation": "Request for a list data views.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#ListDataViewsResponse": { @@ -3782,6 +3984,9 @@ "smithy.api#documentation": "

A list of Dataviews.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#ListDatasets": { @@ -3844,7 +4049,8 @@ } }, "traits": { - "smithy.api#documentation": "Request for the ListDatasets operation." + "smithy.api#documentation": "Request for the ListDatasets operation.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#ListDatasetsResponse": { @@ -3864,7 +4070,8 @@ } }, "traits": { - "smithy.api#documentation": "Response for the ListDatasets operation" + "smithy.api#documentation": "Response for the ListDatasets operation", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#ListPermissionGroups": { @@ -3965,6 +4172,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#ListPermissionGroupsByUserResponse": { @@ -3982,6 +4192,9 @@ "smithy.api#documentation": "

A token that indicates where a results page should begin.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#ListPermissionGroupsRequest": { @@ -4003,6 +4216,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#ListPermissionGroupsResponse": { @@ -4020,6 +4236,9 @@ "smithy.api#documentation": "

A token that indicates where a results page should begin.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#ListUsers": { @@ -4120,6 +4339,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#ListUsersByPermissionGroupResponse": { @@ -4137,6 +4359,9 @@ "smithy.api#documentation": "

A token that indicates where a results page should begin.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#ListUsersRequest": { @@ -4158,6 +4383,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#ListUsersResponse": { @@ -4175,6 +4403,9 @@ "smithy.api#documentation": "

A token that indicates where a results page should begin.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#OwnerName": { @@ -4323,22 +4554,26 @@ } }, "com.amazonaws.finspacedata#PermissionGroupMembershipStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ADDITION_IN_PROGRESS", - "name": "ADDITION_IN_PROGRESS" - }, - { - "value": "ADDITION_SUCCESS", - "name": "ADDITION_SUCCESS" - }, - { - "value": "REMOVAL_IN_PROGRESS", - "name": "REMOVAL_IN_PROGRESS" + "type": "enum", + "members": { + "ADDITION_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDITION_IN_PROGRESS" + } + }, + "ADDITION_SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ADDITION_SUCCESS" + } + }, + "REMOVAL_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REMOVAL_IN_PROGRESS" } - ] + } } }, "com.amazonaws.finspacedata#PermissionGroupName": { @@ -4438,6 +4673,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#ResetUserPasswordResponse": { @@ -4455,6 +4693,9 @@ "smithy.api#documentation": "

A randomly generated temporary password for the requested user account. This password expires in 7 days.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#ResourceNotFoundException": { @@ -4800,13 +5041,14 @@ "formatParams": { "target": "com.amazonaws.finspacedata#FormatParams", "traits": { - "smithy.api#documentation": "

Options that define the structure of the source file(s) including the format type (formatType), header row (withHeader), data separation character (separator) and the type of compression (compression).\n

\n

\n formatType is a required attribute and can have the following values:\n

\n \n \n

Here is an example of how you could specify the formatParams:

\n

\n \n \"formatParams\": \n {\n \"formatType\": \"CSV\",\n \"withHeader\": \"true\",\n \"separator\": \",\",\n \"compression\":\"None\"\n } \n \n

\n

Note that if you only provide formatType as CSV, the rest of the attributes will automatically default to CSV values as following:

\n

\n \n {\n \"withHeader\": \"true\",\n \"separator\": \",\"\n }\n \n

\n

For more information about supported file formats, see Supported Data Types and File Formats in the FinSpace User Guide.

", + "smithy.api#documentation": "

Options that define the structure of the source file(s) including the format type (formatType), header row (withHeader), data separation character (separator) and the type of compression (compression).\n

\n

\n formatType is a required attribute and can have the following values:\n

\n \n

Here is an example of how you could specify the formatParams:

\n

\n \n \"formatParams\": \n {\n \"formatType\": \"CSV\",\n \"withHeader\": \"true\",\n \"separator\": \",\",\n \"compression\":\"None\"\n } \n \n

\n

Note that if you only provide formatType as CSV, the rest of the attributes will automatically default to CSV values as following:

\n

\n \n {\n \"withHeader\": \"true\",\n \"separator\": \",\"\n }\n \n

\n

For more information about supported file formats, see Supported Data Types and File Formats in the FinSpace User Guide.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "Request to update an existing changeset." + "smithy.api#documentation": "Request to update an existing changeset.", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#UpdateChangesetResponse": { @@ -4826,7 +5068,8 @@ } }, "traits": { - "smithy.api#documentation": "The response from a update changeset operation." + "smithy.api#documentation": "The response from a update changeset operation.", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#UpdateDataset": { @@ -4918,7 +5161,8 @@ } }, "traits": { - "smithy.api#documentation": "The request for an UpdateDataset operation" + "smithy.api#documentation": "The request for an UpdateDataset operation", + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#UpdateDatasetResponse": { @@ -4932,7 +5176,8 @@ } }, "traits": { - "smithy.api#documentation": "The response from an UpdateDataset operation" + "smithy.api#documentation": "The response from an UpdateDataset operation", + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#UpdatePermissionGroup": { @@ -5008,6 +5253,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#UpdatePermissionGroupResponse": { @@ -5019,6 +5267,9 @@ "smithy.api#documentation": "

The unique identifier for the updated permission group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#UpdateUser": { @@ -5106,6 +5357,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.finspacedata#UpdateUserResponse": { @@ -5117,6 +5371,9 @@ "smithy.api#documentation": "

The unique identifier of the updated user account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.finspacedata#User": { @@ -5295,37 +5552,43 @@ } }, "com.amazonaws.finspacedata#UserStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" } - ] + } } }, "com.amazonaws.finspacedata#UserType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUPER_USER", - "name": "SUPER_USER" - }, - { - "value": "APP_USER", - "name": "APP_USER" + "type": "enum", + "members": { + "SUPER_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUPER_USER" + } + }, + "APP_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APP_USER" } - ] + } } }, "com.amazonaws.finspacedata#ValidationException": { @@ -5345,18 +5608,20 @@ } }, "com.amazonaws.finspacedata#locationType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INGESTION", - "name": "INGESTION" - }, - { - "value": "SAGEMAKER", - "name": "SAGEMAKER" + "type": "enum", + "members": { + "INGESTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INGESTION" } - ] + }, + "SAGEMAKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SAGEMAKER" + } + } } }, "com.amazonaws.finspacedata#stringValueLength1to1024": { diff --git a/codegen/sdk-codegen/aws-models/fis.json b/codegen/sdk-codegen/aws-models/fis.json index 523592f8894..ef0adce9d2c 100644 --- a/codegen/sdk-codegen/aws-models/fis.json +++ b/codegen/sdk-codegen/aws-models/fis.json @@ -1971,52 +1971,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2024,13 +2028,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2040,92 +2053,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://fis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://fis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -2134,155 +2138,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://fis.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://fis-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://fis.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://fis-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://fis.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://fis.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://fis.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://fis.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2297,8 +2261,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2310,8 +2274,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2323,8 +2287,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2336,8 +2300,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2349,8 +2313,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2362,8 +2326,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2375,8 +2339,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2388,8 +2352,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2401,8 +2365,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2414,8 +2378,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2427,8 +2391,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2440,8 +2404,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2453,8 +2417,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2466,8 +2430,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -2479,8 +2454,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2492,8 +2478,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2505,8 +2502,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2518,8 +2526,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2531,8 +2539,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2544,8 +2552,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2556,8 +2564,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2568,10 +2576,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/fms.json b/codegen/sdk-codegen/aws-models/fms.json index 115d33232da..69f08090654 100644 --- a/codegen/sdk-codegen/aws-models/fms.json +++ b/codegen/sdk-codegen/aws-models/fms.json @@ -250,52 +250,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -303,13 +307,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -319,224 +332,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://fms-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://fms-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://fms-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://fms-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://fms.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://fms.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://fms.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://fms.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/forecast.json b/codegen/sdk-codegen/aws-models/forecast.json index 350df27a9ea..5b16ba68659 100644 --- a/codegen/sdk-codegen/aws-models/forecast.json +++ b/codegen/sdk-codegen/aws-models/forecast.json @@ -359,52 +359,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -412,13 +416,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -428,224 +441,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://forecast-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://forecast-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://forecast-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://forecast-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://forecast.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://forecast.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://forecast.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://forecast.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -660,8 +624,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -673,8 +637,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -686,8 +650,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -699,8 +663,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -712,8 +676,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -725,8 +689,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -738,8 +702,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -751,8 +715,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -764,8 +728,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -777,8 +741,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -790,8 +754,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -803,8 +767,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -816,8 +780,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -829,8 +793,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -842,8 +806,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -855,8 +819,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -868,8 +832,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -881,8 +845,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -894,8 +858,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -907,8 +871,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -920,8 +884,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -933,8 +897,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -946,8 +910,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -959,8 +934,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -972,8 +958,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -985,8 +982,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -998,8 +1006,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1011,8 +1019,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1024,8 +1032,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1036,8 +1044,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1048,10 +1056,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1440,6 +1454,9 @@ "smithy.api#documentation": "

The time boundary Forecast uses to align and aggregate any data that doesn't align with your forecast frequency. Provide the unit of time and the time boundary as a key value pair. \n For more information on specifying a time boundary, see Specifying a Time Boundary.\n If you\n don't provide a time boundary, Forecast uses a set of Default Time Boundaries.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateAutoPredictorResponse": { @@ -1451,6 +1468,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateDataset": { @@ -1534,6 +1554,9 @@ "smithy.api#documentation": "

The optional metadata that you apply to the dataset group to help you categorize and\n organize them. Each tag consists of a key and an optional value, both of which you\n define.

\n

The following basic restrictions apply to tags:

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateDatasetGroupResponse": { @@ -1545,6 +1568,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the dataset group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateDatasetImportJob": { @@ -1643,6 +1669,9 @@ "smithy.api#documentation": "

Specifies whether the dataset import job is a FULL or INCREMENTAL import. A FULL dataset import replaces all of the existing data with the newly imported data. An INCREMENTAL import appends the imported data to the existing data.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateDatasetImportJobResponse": { @@ -1654,6 +1683,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the dataset import job.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateDatasetRequest": { @@ -1705,6 +1737,9 @@ "smithy.api#documentation": "

The optional metadata that you apply to the dataset to help you categorize and organize\n them. Each tag consists of a key and an optional value, both of which you define.

\n

The following basic restrictions apply to tags:

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateDatasetResponse": { @@ -1716,6 +1751,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the dataset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateExplainability": { @@ -1811,6 +1849,9 @@ "smithy.api#documentation": "

The format of the exported data, CSV or PARQUET.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateExplainabilityExportResponse": { @@ -1822,6 +1863,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the export.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateExplainabilityRequest": { @@ -1878,6 +1922,9 @@ "smithy.api#documentation": "

Optional metadata to help you categorize and organize your resources. Each tag\n consists of a key and an optional value, both of which you define. Tag keys and values\n are case sensitive.

\n

The following restrictions apply to tags:

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateExplainabilityResponse": { @@ -1889,6 +1936,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Explainability.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateForecast": { @@ -1985,6 +2035,9 @@ "smithy.api#documentation": "

The format of the exported data, CSV or PARQUET. The default value is CSV.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateForecastExportJobResponse": { @@ -1996,6 +2049,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the export job.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateForecastRequest": { @@ -2033,6 +2089,9 @@ "smithy.api#documentation": "

Defines the set of time series that are used to create the forecasts in a TimeSeriesIdentifiers object.

\n

The TimeSeriesIdentifiers object needs the following information:

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateForecastResponse": { @@ -2044,6 +2103,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the forecast.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateMonitor": { @@ -2098,6 +2160,9 @@ "smithy.api#documentation": "

A list of tags to apply to the monitor resource.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateMonitorResponse": { @@ -2109,6 +2174,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the monitor resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreatePredictor": { @@ -2204,6 +2272,9 @@ "smithy.api#documentation": "

The format of the exported data, CSV or PARQUET. The default value is CSV.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreatePredictorBacktestExportJobResponse": { @@ -2215,6 +2286,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor backtest export job that you want to\n export.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreatePredictorRequest": { @@ -2314,6 +2388,9 @@ "smithy.api#documentation": "

The accuracy metric used to optimize the predictor.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreatePredictorResponse": { @@ -2325,6 +2402,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the predictor.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateWhatIfAnalysis": { @@ -2385,6 +2465,9 @@ "smithy.api#documentation": "

A list of tags to apply to the what if forecast.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateWhatIfAnalysisResponse": { @@ -2396,6 +2479,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the what-if analysis.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateWhatIfForecast": { @@ -2492,6 +2578,9 @@ "smithy.api#documentation": "

The format of the exported data, CSV or PARQUET.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateWhatIfForecastExportResponse": { @@ -2503,6 +2592,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the what-if forecast.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#CreateWhatIfForecastRequest": { @@ -2540,6 +2632,9 @@ "smithy.api#documentation": "

A list of tags to apply to the what if forecast.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#CreateWhatIfForecastResponse": { @@ -2551,6 +2646,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the what-if forecast.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DataConfig": { @@ -2897,6 +2995,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteDatasetImportJob": { @@ -2933,6 +3034,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteDatasetRequest": { @@ -2945,6 +3049,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteExplainability": { @@ -3005,6 +3112,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteExplainabilityRequest": { @@ -3017,6 +3127,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteForecast": { @@ -3077,6 +3190,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteForecastRequest": { @@ -3089,6 +3205,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteMonitor": { @@ -3125,6 +3244,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeletePredictor": { @@ -3185,6 +3307,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeletePredictorRequest": { @@ -3197,6 +3322,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteResourceTree": { @@ -3233,6 +3361,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteWhatIfAnalysis": { @@ -3269,6 +3400,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteWhatIfForecast": { @@ -3329,6 +3463,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DeleteWhatIfForecastRequest": { @@ -3341,6 +3478,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeAutoPredictor": { @@ -3374,6 +3514,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeAutoPredictorResponse": { @@ -3490,6 +3633,9 @@ "smithy.api#documentation": "

The time boundary Forecast uses when aggregating data.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeDataset": { @@ -3544,6 +3690,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeDatasetGroupResponse": { @@ -3591,6 +3740,9 @@ "smithy.api#documentation": "

When the dataset group was created or last updated from a call to the UpdateDatasetGroup operation. While the dataset group is being updated,\n LastModificationTime is the current time of the\n DescribeDatasetGroup call.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeDatasetImportJob": { @@ -3624,6 +3776,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeDatasetImportJobResponse": { @@ -3732,6 +3887,9 @@ "smithy.api#documentation": "

The import mode of the dataset import job, FULL or INCREMENTAL.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeDatasetRequest": { @@ -3744,6 +3902,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeDatasetResponse": { @@ -3809,6 +3970,9 @@ "smithy.api#documentation": "

When you create a dataset, LastModificationTime is the same as\n CreationTime. While data is being imported to the dataset,\n LastModificationTime is the current time of the DescribeDataset\n call. After a CreateDatasetImportJob\n operation has finished, LastModificationTime is when the import job completed or\n failed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeExplainability": { @@ -3863,6 +4027,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeExplainabilityExportResponse": { @@ -3919,6 +4086,9 @@ "smithy.api#documentation": "

The format of the exported data, CSV or PARQUET.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeExplainabilityRequest": { @@ -3931,6 +4101,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeExplainabilityResponse": { @@ -4014,6 +4187,9 @@ "smithy.api#documentation": "

The last time the resource was modified. The timestamp depends on the status of the\n job:

\n " } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeForecast": { @@ -4068,6 +4244,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeForecastExportJobResponse": { @@ -4127,6 +4306,9 @@ "smithy.api#documentation": "

The format of the exported data, CSV or PARQUET.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeForecastRequest": { @@ -4139,6 +4321,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeForecastResponse": { @@ -4210,6 +4395,9 @@ "smithy.api#documentation": "

The time series to include in the forecast.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeMonitor": { @@ -4243,6 +4431,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeMonitorResponse": { @@ -4314,6 +4505,9 @@ "smithy.api#documentation": "

The estimated number of minutes remaining before the monitor resource finishes its current evaluation.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribePredictor": { @@ -4368,6 +4562,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribePredictorBacktestExportJobResponse": { @@ -4424,6 +4621,9 @@ "smithy.api#documentation": "

The format of the exported data, CSV or PARQUET.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribePredictorRequest": { @@ -4436,6 +4636,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribePredictorResponse": { @@ -4585,6 +4788,9 @@ "smithy.api#documentation": "

The accuracy metric used to optimize the predictor.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeWhatIfAnalysis": { @@ -4618,6 +4824,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeWhatIfAnalysisResponse": { @@ -4674,6 +4883,9 @@ "TimeSeriesSelector": { "target": "com.amazonaws.forecast#TimeSeriesSelector" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeWhatIfForecast": { @@ -4728,6 +4940,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeWhatIfForecastExportResponse": { @@ -4790,6 +5005,9 @@ "smithy.api#documentation": "

The format of the exported data, CSV or PARQUET.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#DescribeWhatIfForecastRequest": { @@ -4802,6 +5020,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#DescribeWhatIfForecastResponse": { @@ -4873,6 +5094,9 @@ "smithy.api#documentation": "

The quantiles at which probabilistic forecasts are generated. You can specify up to five quantiles per what-if\n forecast in the CreateWhatIfForecast operation. If you didn't specify quantiles, the default\n values are [\"0.1\", \"0.5\", \"0.9\"].

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#Detail": { @@ -5628,6 +5852,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#GetAccuracyMetricsResponse": { @@ -5657,6 +5884,9 @@ "smithy.api#documentation": "

The accuracy metric used to optimize the predictor.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#Hour": { @@ -5858,6 +6088,9 @@ "smithy.api#documentation": "

The number of items to return in the response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListDatasetGroupsResponse": { @@ -5875,6 +6108,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListDatasetImportJobs": { @@ -5925,6 +6161,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to include\n or exclude the datasets that match the statement from the list, respectively. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n \n

For example, to list all dataset import jobs whose status is ACTIVE, you specify the\n following filter:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListDatasetImportJobsResponse": { @@ -5942,6 +6181,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListDatasets": { @@ -5983,6 +6225,9 @@ "smithy.api#documentation": "

The number of items to return in the response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListDatasetsResponse": { @@ -6000,6 +6245,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListExplainabilities": { @@ -6050,6 +6298,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to\n include or exclude the resources that match the statement from the list. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListExplainabilitiesResponse": { @@ -6067,6 +6318,9 @@ "smithy.api#documentation": "

Returns this token if the response is truncated. To retrieve the next set of results,\n use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListExplainabilityExports": { @@ -6117,6 +6371,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to\n include or exclude resources that match the statement from the list. The match statement\n consists of a key and a value.

\n

\n Filter properties\n

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListExplainabilityExportsResponse": { @@ -6134,6 +6391,9 @@ "smithy.api#documentation": "

Returns this token if the response is truncated. To retrieve the next set of results,\n use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListForecastExportJobs": { @@ -6184,6 +6444,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to include\n or exclude the forecast export jobs that match the statement from the list, respectively. The\n match statement consists of a key and a value.

\n

\n Filter properties\n

\n \n

For example, to list all jobs that export a forecast named\n electricityforecast, specify the following filter:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"ForecastArn\", \"Value\":\n \"arn:aws:forecast:us-west-2::forecast/electricityforecast\" } ]\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListForecastExportJobsResponse": { @@ -6201,6 +6464,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListForecasts": { @@ -6251,6 +6517,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to include\n or exclude the forecasts that match the statement from the list, respectively. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n \n

For example, to list all forecasts whose status is not ACTIVE, you would specify:

\n

\n \"Filters\": [ { \"Condition\": \"IS_NOT\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" }\n ]\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListForecastsResponse": { @@ -6268,6 +6537,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set\n of results, use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListMonitorEvaluations": { @@ -6328,6 +6600,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to\n include or exclude the resources that match the statement from the list. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n \n

For example, to list only successful monitor evaluations, you would specify:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"EvaluationState\", \"Value\": \"SUCCESS\" } ]\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListMonitorEvaluationsResponse": { @@ -6345,6 +6620,9 @@ "smithy.api#documentation": "

The monitoring results and predictor events collected by the monitor resource during different windows of time.

\n

For information about monitoring see Viewing Monitoring Results. For more information about retrieving monitoring results see Viewing Monitoring Results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListMonitors": { @@ -6395,6 +6673,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to\n include or exclude the resources that match the statement from the list. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n \n

For example, to list all monitors who's status is ACTIVE, you would specify:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListMonitorsResponse": { @@ -6412,6 +6693,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListPredictorBacktestExportJobs": { @@ -6462,6 +6746,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to\n include or exclude the predictor backtest export jobs that match the statement from the\n list. The match statement consists of a key and a value.

\n

\n Filter properties\n

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListPredictorBacktestExportJobsResponse": { @@ -6479,6 +6766,9 @@ "smithy.api#documentation": "

Returns this token if the response is truncated. To retrieve the next set of results,\n use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListPredictors": { @@ -6529,6 +6819,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The\n condition is either IS or IS_NOT, which specifies whether to include\n or exclude the predictors that match the statement from the list, respectively. The match\n statement consists of a key and a value.

\n

\n Filter properties\n

\n \n

For example, to list all predictors whose status is ACTIVE, you would specify:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" }\n ]\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListPredictorsResponse": { @@ -6546,6 +6839,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of\n results, use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListTagsForResource": { @@ -6578,6 +6874,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListTagsForResourceResponse": { @@ -6589,6 +6888,9 @@ "smithy.api#documentation": "

The tags for the resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListWhatIfAnalyses": { @@ -6639,6 +6941,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The condition is either\n IS or IS_NOT, which specifies whether to include or exclude the what-if analysis jobs\n that match the statement from the list, respectively. The match statement consists of a key and a value.

\n

\n Filter properties\n

\n \n

For example, to list all jobs that export a forecast named\n electricityWhatIf, specify the following filter:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"WhatIfAnalysisArn\", \"Value\":\n \"arn:aws:forecast:us-west-2::forecast/electricityWhatIf\" } ]\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListWhatIfAnalysesResponse": { @@ -6656,6 +6961,9 @@ "smithy.api#documentation": "

If the response is truncated, Forecast returns this token. To retrieve the next set of results, use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListWhatIfForecastExports": { @@ -6706,6 +7014,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The condition is either\n IS or IS_NOT, which specifies whether to include or exclude the what-if forecast\n export jobs that match the statement from the list, respectively. The match statement consists of a key and a\n value.

\n

\n Filter properties\n

\n \n

For example, to list all jobs that export a forecast named\n electricityWIFExport, specify the following filter:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"WhatIfForecastExportArn\", \"Value\":\n \"arn:aws:forecast:us-west-2::forecast/electricityWIFExport\" } ]\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListWhatIfForecastExportsResponse": { @@ -6723,6 +7034,9 @@ "smithy.api#documentation": "

If the response is truncated, Forecast returns this token. To retrieve the next set of results, use the token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#ListWhatIfForecasts": { @@ -6773,6 +7087,9 @@ "smithy.api#documentation": "

An array of filters. For each filter, you provide a condition and a match statement. The condition is either\n IS or IS_NOT, which specifies whether to include or exclude the what-if forecast\n export jobs that match the statement from the list, respectively. The match statement consists of a key and a\n value.

\n

\n Filter properties\n

\n \n

For example, to list all jobs that export a forecast named\n electricityWhatIfForecast, specify the following filter:

\n

\n \"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"WhatIfForecastArn\", \"Value\":\n \"arn:aws:forecast:us-west-2::forecast/electricityWhatIfForecast\" } ]\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#ListWhatIfForecastsResponse": { @@ -6790,6 +7107,9 @@ "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a NextToken. To retrieve the next set of results, use the token in the next\u2028 request. Tokens expire after 24 hours.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecast#LocalDateTime": { @@ -7604,6 +7924,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#S3Config": { @@ -7859,6 +8182,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#String": { @@ -7990,11 +8316,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.forecast#TagValue": { "type": "string", @@ -8358,11 +8690,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.forecast#UpdateDatasetGroup": { "type": "operation", @@ -8405,11 +8743,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecast#UpdateDatasetGroupResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.forecast#UseGeolocationForTimeZone": { "type": "boolean", diff --git a/codegen/sdk-codegen/aws-models/forecastquery.json b/codegen/sdk-codegen/aws-models/forecastquery.json index 5ebb0b94815..c4b661da373 100644 --- a/codegen/sdk-codegen/aws-models/forecastquery.json +++ b/codegen/sdk-codegen/aws-models/forecastquery.json @@ -114,52 +114,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -167,13 +171,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -183,224 +196,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://forecastquery-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://forecastquery-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://forecastquery-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://forecastquery-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://forecastquery.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://forecastquery.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://forecastquery.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://forecastquery.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -415,8 +379,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -428,8 +392,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -441,8 +405,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -454,8 +418,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -467,8 +431,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -480,8 +444,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -493,8 +457,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -506,8 +470,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -519,8 +483,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -532,8 +496,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -545,8 +509,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -558,8 +522,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -571,8 +535,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -584,8 +548,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -597,8 +561,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -610,8 +574,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -623,8 +587,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -636,8 +600,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -649,8 +613,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -662,8 +626,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -675,8 +639,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -688,8 +652,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -701,8 +665,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -714,8 +689,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -727,8 +713,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -740,8 +737,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -753,8 +761,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -766,8 +774,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -779,8 +787,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -791,8 +799,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -803,10 +811,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1031,6 +1045,9 @@ "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a\n NextToken. To retrieve the next set of results, use the token in the next\n request. Tokens expire after 24 hours.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecastquery#QueryForecastResponse": { @@ -1042,6 +1059,9 @@ "smithy.api#documentation": "

The forecast.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecastquery#QueryWhatIfForecast": { @@ -1108,6 +1128,9 @@ "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a\n NextToken. To retrieve the next set of results, use the token in the next\n request. Tokens expire after 24 hours.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.forecastquery#QueryWhatIfForecastResponse": { @@ -1116,6 +1139,9 @@ "Forecast": { "target": "com.amazonaws.forecastquery#Forecast" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.forecastquery#ResourceInUseException": { diff --git a/codegen/sdk-codegen/aws-models/frauddetector.json b/codegen/sdk-codegen/aws-models/frauddetector.json index 218c312b97f..c762824d965 100644 --- a/codegen/sdk-codegen/aws-models/frauddetector.json +++ b/codegen/sdk-codegen/aws-models/frauddetector.json @@ -402,52 +402,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -455,13 +459,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -471,224 +484,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://frauddetector-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://frauddetector-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://frauddetector-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://frauddetector-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://frauddetector.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://frauddetector.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://frauddetector.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://frauddetector.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/gamesparks.json b/codegen/sdk-codegen/aws-models/gamesparks.json index 252499ccedb..11f7ba159f5 100644 --- a/codegen/sdk-codegen/aws-models/gamesparks.json +++ b/codegen/sdk-codegen/aws-models/gamesparks.json @@ -1096,52 +1096,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1149,13 +1153,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1165,224 +1178,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://gamesparks-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://gamesparks-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://gamesparks-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://gamesparks-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://gamesparks.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://gamesparks.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://gamesparks.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://gamesparks.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1397,8 +1361,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1410,8 +1374,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1423,8 +1387,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1436,8 +1400,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1449,8 +1413,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1462,8 +1426,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1475,8 +1439,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1488,8 +1452,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1501,8 +1465,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1514,8 +1478,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1527,8 +1491,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1540,8 +1504,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1553,8 +1528,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1566,8 +1552,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1579,8 +1576,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1592,8 +1600,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1605,8 +1613,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1618,8 +1626,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1630,8 +1638,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1642,10 +1650,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -4443,4 +4457,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/glacier.json b/codegen/sdk-codegen/aws-models/glacier.json index 6fc9d21fe16..32cb84212f4 100644 --- a/codegen/sdk-codegen/aws-models/glacier.json +++ b/codegen/sdk-codegen/aws-models/glacier.json @@ -2065,44 +2065,6 @@ "conditions": [], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://glacier.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://glacier.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, { "conditions": [], "endpoint": { @@ -2138,8 +2100,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2151,8 +2113,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2164,8 +2126,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2177,8 +2139,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2190,8 +2152,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2203,8 +2165,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2216,8 +2178,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2229,8 +2191,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2242,8 +2204,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2255,8 +2217,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2268,8 +2230,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2281,8 +2243,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2294,8 +2256,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2307,8 +2269,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2320,8 +2282,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2333,8 +2295,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2346,8 +2308,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2359,8 +2321,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2372,8 +2334,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2385,8 +2347,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2398,8 +2360,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2411,8 +2373,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2424,8 +2386,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2437,8 +2399,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2450,8 +2412,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2463,8 +2425,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2476,8 +2438,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2489,8 +2451,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2502,8 +2464,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2515,8 +2477,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2528,8 +2490,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2541,8 +2503,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2554,8 +2516,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2567,8 +2529,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2580,8 +2542,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2593,8 +2555,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2606,8 +2568,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2619,8 +2581,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2632,8 +2594,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2645,8 +2607,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2658,8 +2620,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2671,8 +2633,19 @@ }, "params": { "Region": "us-iso-west-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2684,8 +2657,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2697,8 +2681,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2710,8 +2705,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2723,8 +2729,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2736,8 +2742,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2748,8 +2754,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2760,10 +2766,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/global-accelerator.json b/codegen/sdk-codegen/aws-models/global-accelerator.json index da143331f8b..56e20b38c45 100644 --- a/codegen/sdk-codegen/aws-models/global-accelerator.json +++ b/codegen/sdk-codegen/aws-models/global-accelerator.json @@ -2893,6 +2893,7 @@ "arnNamespace": "globalaccelerator", "cloudFormationName": "GlobalAccelerator", "cloudTrailEventSource": "globalaccelerator.amazonaws.com", + "docId": "globalaccelerator-2018-08-08", "endpointPrefix": "globalaccelerator" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/greengrass.json b/codegen/sdk-codegen/aws-models/greengrass.json index 09939ad652f..89464773c0b 100644 --- a/codegen/sdk-codegen/aws-models/greengrass.json +++ b/codegen/sdk-codegen/aws-models/greengrass.json @@ -199,21 +199,18 @@ "InvalidInputRecords": { "target": "com.amazonaws.greengrass#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The total number of records that returned a non-retryable error. For example, this can occur if a group record from the input file uses an invalid format or specifies a nonexistent group version, or if the execution role doesn't grant permission to deploy a group or group version." } }, "RecordsProcessed": { "target": "com.amazonaws.greengrass#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The total number of group records from the input file that have been processed so far, or attempted." } }, "RetryAttempts": { "target": "com.amazonaws.greengrass#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The total number of deployment attempts that returned a retryable error. For example, a retry is triggered if the attempt to deploy a group returns a throttling error. ''StartBulkDeployment'' retries a group deployment up to five times." } } @@ -375,7 +372,6 @@ "PortNumber": { "target": "com.amazonaws.greengrass#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port of the Greengrass core. Usually 8883." } } @@ -446,7 +442,6 @@ "SyncShadow": { "target": "com.amazonaws.greengrass#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "If true, the core's local shadow is automatically synced with the cloud." } }, @@ -2783,7 +2778,6 @@ "SyncShadow": { "target": "com.amazonaws.greengrass#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "If true, the device's local shadow will be automatically synced with the cloud." } }, @@ -3014,21 +3008,18 @@ "MemorySize": { "target": "com.amazonaws.greengrass#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The memory size, in KB, which the function requires. This setting is not applicable and should be cleared when you run the Lambda function without containerization." } }, "Pinned": { "target": "com.amazonaws.greengrass#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "True if the function is pinned. Pinned means the function is long-lived and starts when the core starts." } }, "Timeout": { "target": "com.amazonaws.greengrass#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request." } }, @@ -3049,7 +3040,6 @@ "AccessSysfs": { "target": "com.amazonaws.greengrass#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container." } }, @@ -3161,14 +3151,12 @@ "Gid": { "target": "com.amazonaws.greengrass#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The group ID whose permissions are used to run a Lambda function." } }, "Uid": { "target": "com.amazonaws.greengrass#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The user ID whose permissions are used to run a Lambda function." } } @@ -5557,52 +5545,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -5610,13 +5602,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -5626,239 +5627,86 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://greengrass-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://greengrass.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://greengrass.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://greengrass-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://greengrass-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://greengrass.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { @@ -5869,21 +5717,13 @@ { "ref": "Region" }, - "dataplane-us-gov-east-1" + "us-gov-east-1" ] } ], "endpoint": { - "url": "https://greengrass-ats.iot.us-gov-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "greengrass", - "signingRegion": "us-gov-east-1" - } - ] - }, + "url": "https://greengrass.us-gov-east-1.amazonaws.com", + "properties": {}, "headers": {} }, "type": "endpoint" @@ -5896,84 +5736,158 @@ { "ref": "Region" }, - "dataplane-us-gov-west-1" + "us-gov-west-1" ] } ], "endpoint": { - "url": "https://greengrass-ats.iot.us-gov-west-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "greengrass", - "signingRegion": "us-gov-west-1" - } - ] - }, + "url": "https://greengrass.us-gov-west-1.amazonaws.com", + "properties": {}, "headers": {} }, "type": "endpoint" }, { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://greengrass.us-gov-east-1.amazonaws.com", + "url": "https://greengrass-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-gov-west-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://greengrass.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://greengrass.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://greengrass.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "dataplane-us-gov-east-1" + ] + } + ], + "endpoint": { + "url": "https://greengrass-ats.iot.us-gov-east-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "greengrass", + "signingRegion": "us-gov-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "dataplane-us-gov-west-1" + ] + } + ], + "endpoint": { + "url": "https://greengrass-ats.iot.us-gov-west-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "greengrass", + "signingRegion": "us-gov-west-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://greengrass.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -5988,8 +5902,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6001,8 +5915,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6014,8 +5928,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6027,8 +5941,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6040,8 +5954,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6053,8 +5967,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6066,8 +5980,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6079,8 +5993,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6092,8 +6006,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6105,8 +6019,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6118,8 +6032,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6131,8 +6045,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6144,8 +6058,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -6157,8 +6071,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -6170,8 +6084,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -6183,8 +6097,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6196,8 +6110,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -6209,8 +6123,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -6222,8 +6136,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -6244,8 +6158,8 @@ }, "params": { "Region": "dataplane-us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6266,8 +6180,8 @@ }, "params": { "Region": "dataplane-us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6279,8 +6193,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6292,8 +6206,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -6305,8 +6219,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6318,8 +6232,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -6331,8 +6245,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -6344,8 +6258,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -6357,8 +6282,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -6370,8 +6306,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -6383,8 +6330,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -6396,8 +6354,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6409,8 +6367,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -6422,8 +6380,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -6434,8 +6392,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -6446,10 +6404,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -6532,7 +6496,6 @@ "AutoAddGroupOwner": { "target": "com.amazonaws.greengrass#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "If true, AWS IoT Greengrass automatically adds the specified Linux OS group owner of the resource to the Lambda process privileges. Thus the Lambda process will have the file access permissions of the added Linux group." } }, @@ -8052,7 +8015,6 @@ "Space": { "target": "com.amazonaws.greengrass#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The amount of file space, in KB, to use if the local file system is used for logging purposes." } }, @@ -8206,7 +8168,6 @@ "Force": { "target": "com.amazonaws.greengrass#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "If true, performs a best-effort only core reset." } }, @@ -9565,16 +9526,10 @@ } }, "com.amazonaws.greengrass#__boolean": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } + "type": "boolean" }, "com.amazonaws.greengrass#__integer": { - "type": "integer", - "traits": { - "smithy.api#default": 0 - } + "type": "integer" }, "com.amazonaws.greengrass#__listOfConnectivityInfo": { "type": "list", diff --git a/codegen/sdk-codegen/aws-models/greengrassv2.json b/codegen/sdk-codegen/aws-models/greengrassv2.json index dfc206db23c..c90c9366588 100644 --- a/codegen/sdk-codegen/aws-models/greengrassv2.json +++ b/codegen/sdk-codegen/aws-models/greengrassv2.json @@ -2794,52 +2794,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2847,13 +2851,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2863,239 +2876,86 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://greengrass-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://greengrass.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://greengrass.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://greengrass-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://greengrass-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://greengrass.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { @@ -3106,21 +2966,13 @@ { "ref": "Region" }, - "dataplane-us-gov-east-1" + "us-gov-east-1" ] } ], "endpoint": { - "url": "https://greengrass-ats.iot.us-gov-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "greengrass", - "signingRegion": "us-gov-east-1" - } - ] - }, + "url": "https://greengrass.us-gov-east-1.amazonaws.com", + "properties": {}, "headers": {} }, "type": "endpoint" @@ -3133,21 +2985,13 @@ { "ref": "Region" }, - "dataplane-us-gov-west-1" + "us-gov-west-1" ] } ], "endpoint": { - "url": "https://greengrass-ats.iot.us-gov-west-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "greengrass", - "signingRegion": "us-gov-west-1" - } - ] - }, + "url": "https://greengrass.us-gov-west-1.amazonaws.com", + "properties": {}, "headers": {} }, "type": "endpoint" @@ -3155,24 +2999,144 @@ { "conditions": [], "endpoint": { - "url": "https://greengrass.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://greengrass-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" } ] + }, + { + "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://greengrass.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "dataplane-us-gov-east-1" + ] + } + ], + "endpoint": { + "url": "https://greengrass-ats.iot.us-gov-east-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "greengrass", + "signingRegion": "us-gov-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "dataplane-us-gov-west-1" + ] + } + ], + "endpoint": { + "url": "https://greengrass-ats.iot.us-gov-west-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "greengrass", + "signingRegion": "us-gov-west-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://greengrass.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3187,8 +3151,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3200,8 +3164,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3213,8 +3177,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3226,8 +3190,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3239,8 +3203,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3252,8 +3216,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3265,8 +3229,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3278,8 +3242,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3291,8 +3255,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3304,8 +3268,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3317,8 +3281,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3330,8 +3294,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3343,8 +3307,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3356,8 +3320,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3369,8 +3333,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3382,8 +3346,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3395,8 +3359,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3408,8 +3372,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3421,8 +3385,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3443,8 +3407,8 @@ }, "params": { "Region": "dataplane-us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3465,8 +3429,8 @@ }, "params": { "Region": "dataplane-us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3478,8 +3442,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3491,8 +3455,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3504,8 +3468,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3517,8 +3481,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3530,8 +3494,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3543,8 +3507,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3554,8 +3518,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3567,8 +3531,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3578,8 +3542,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3591,8 +3555,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3602,8 +3566,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3615,8 +3579,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3626,8 +3590,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3639,8 +3603,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3652,8 +3616,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3665,8 +3629,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3677,8 +3641,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3689,8 +3653,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } }, diff --git a/codegen/sdk-codegen/aws-models/groundstation.json b/codegen/sdk-codegen/aws-models/groundstation.json index 85c6659a014..27d362585f1 100644 --- a/codegen/sdk-codegen/aws-models/groundstation.json +++ b/codegen/sdk-codegen/aws-models/groundstation.json @@ -3238,52 +3238,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3291,13 +3295,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3307,224 +3320,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://groundstation-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://groundstation-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://groundstation-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://groundstation-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://groundstation.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://groundstation.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://groundstation.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://groundstation.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/healthlake.json b/codegen/sdk-codegen/aws-models/healthlake.json index 3870006bb1d..ffe2c05aafe 100644 --- a/codegen/sdk-codegen/aws-models/healthlake.json +++ b/codegen/sdk-codegen/aws-models/healthlake.json @@ -885,52 +885,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -938,13 +942,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -954,224 +967,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://healthlake-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://healthlake-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://healthlake-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://healthlake-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://healthlake.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://healthlake.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://healthlake.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://healthlake.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/honeycode.json b/codegen/sdk-codegen/aws-models/honeycode.json index a15ac50ccec..42d4199f3ed 100644 --- a/codegen/sdk-codegen/aws-models/honeycode.json +++ b/codegen/sdk-codegen/aws-models/honeycode.json @@ -112,7 +112,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n The BatchCreateTableRows API allows you to create one or more rows at the end of a table in a workbook.\n The API allows you to specify the values to set in some or all of the columns in the new rows.\n

\n

\n If a column is not explicitly set in a specific row, then the column level formula specified in the table\n will be applied to the new row. If there is no column level formula but the last row of the table has a\n formula, then that formula will be copied down to the new row. If there is no column level formula and\n no formula in the last row of the table, then that column will be left blank for the new rows.\n

", + "smithy.api#documentation": "

\n The BatchCreateTableRows API allows you to create one or more rows at the end of a table in a workbook.\n The API allows you to specify the values to set in some or all of the columns in the new rows.\n

\n

\n If a column is not explicitly set in a specific row, then the column level formula specified in the table\n will be applied to the new row. If there is no column level formula but the last row of the table has a\n formula, then that formula will be copied down to the new row. If there is no column level formula and\n no formula in the last row of the table, then that column will be left blank for the new rows.\n

", "smithy.api#http": { "method": "POST", "uri": "/workbooks/{workbookId}/tables/{tableId}/rows/batchcreate", @@ -126,7 +126,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook where the new rows are being added.

\n

\n If a workbook with the specified ID could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook where the new rows are being added.

\n

\n If a workbook with the specified ID could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -134,7 +134,7 @@ "tableId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the table where the new rows are being added.

\n

\n If a table with the specified ID could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the table where the new rows are being added.

\n

\n If a table with the specified ID could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -142,16 +142,19 @@ "rowsToCreate": { "target": "com.amazonaws.honeycode#CreateRowDataList", "traits": { - "smithy.api#documentation": "

\n The list of rows to create at the end of the table. Each item in this list needs to have a batch item id\n to uniquely identify the element in the request and the cells to create for that row.\n You need to specify at least one item in this list.\n

\n

\n Note that if one of the column ids in any of the rows in the request does not exist in the table, then the\n request fails and no updates are made to the table.\n

", + "smithy.api#documentation": "

\n The list of rows to create at the end of the table. Each item in this list needs to have a batch item id\n to uniquely identify the element in the request and the cells to create for that row.\n You need to specify at least one item in this list.\n

\n

\n Note that if one of the column ids in any of the rows in the request does not exist in the table, then the\n request fails and no updates are made to the table.\n

", "smithy.api#required": {} } }, "clientRequestToken": { "target": "com.amazonaws.honeycode#ClientRequestToken", "traits": { - "smithy.api#documentation": "

\n The request token for performing the batch create operation.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the operation again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" + "smithy.api#documentation": "

\n The request token for performing the batch create operation.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the operation again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#BatchCreateTableRowsResult": { @@ -178,6 +181,9 @@ "smithy.api#documentation": "

\n The list of batch items in the request that could not be added to the table. Each element in this list\n contains one item from the request that could not be added to the table along with the reason why\n that item could not be added.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#BatchDeleteTableRows": { @@ -226,7 +232,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook where the rows are being deleted.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook where the rows are being deleted.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -234,7 +240,7 @@ "tableId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the table where the rows are being deleted.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the table where the rows are being deleted.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -242,16 +248,19 @@ "rowIds": { "target": "com.amazonaws.honeycode#RowIdList", "traits": { - "smithy.api#documentation": "

\n The list of row ids to delete from the table. You need to specify at least one row id in this list.\n

\n

\n Note that if one of the row ids provided in the request does not exist in the table, then the request fails\n and no rows are deleted from the table.\n

", + "smithy.api#documentation": "

\n The list of row ids to delete from the table. You need to specify at least one row id in this list.\n

\n

\n Note that if one of the row ids provided in the request does not exist in the table, then the request fails\n and no rows are deleted from the table.\n

", "smithy.api#required": {} } }, "clientRequestToken": { "target": "com.amazonaws.honeycode#ClientRequestToken", "traits": { - "smithy.api#documentation": "

\n The request token for performing the delete action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" + "smithy.api#documentation": "

\n The request token for performing the delete action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#BatchDeleteTableRowsResult": { @@ -271,6 +280,9 @@ "smithy.api#documentation": "

\n The list of row ids in the request that could not be deleted from the table. Each element in this list\n contains one row id from the request that could not be deleted along with the reason why that item could not\n be deleted.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#BatchErrorMessage": { @@ -321,7 +333,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n The BatchUpdateTableRows API allows you to update one or more rows in a table in a workbook.\n

\n

\n You can specify the values to set in some or all of the columns in the table for the specified\n rows.\n If a column is not explicitly specified in a particular row, then that column will not be updated\n for that row. To clear out the data in a specific cell, you need to set the value as an empty string\n (\"\").\n

", + "smithy.api#documentation": "

\n The BatchUpdateTableRows API allows you to update one or more rows in a table in a workbook.\n

\n

\n You can specify the values to set in some or all of the columns in the table for the specified\n rows.\n If a column is not explicitly specified in a particular row, then that column will not be updated\n for that row. To clear out the data in a specific cell, you need to set the value as an empty string\n (\"\").\n

", "smithy.api#http": { "method": "POST", "uri": "/workbooks/{workbookId}/tables/{tableId}/rows/batchupdate", @@ -335,7 +347,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook where the rows are being updated.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook where the rows are being updated.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -343,7 +355,7 @@ "tableId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the table where the rows are being updated.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the table where the rows are being updated.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -351,16 +363,19 @@ "rowsToUpdate": { "target": "com.amazonaws.honeycode#UpdateRowDataList", "traits": { - "smithy.api#documentation": "

\n The list of rows to update in the table. Each item in this list needs to contain the row id to update\n along with the map of column id to cell values for each column in that row that needs to be updated.\n You need to specify at least one row in this list, and for each row, you need to specify at least one\n column to update.\n

\n

\n Note that if one of the row or column ids in the request does not exist in the table, then the request fails\n and no updates are made to the table.\n

", + "smithy.api#documentation": "

\n The list of rows to update in the table. Each item in this list needs to contain the row id to update\n along with the map of column id to cell values for each column in that row that needs to be updated.\n You need to specify at least one row in this list, and for each row, you need to specify at least one\n column to update.\n

\n

\n Note that if one of the row or column ids in the request does not exist in the table, then the request fails\n and no updates are made to the table.\n

", "smithy.api#required": {} } }, "clientRequestToken": { "target": "com.amazonaws.honeycode#ClientRequestToken", "traits": { - "smithy.api#documentation": "

\n The request token for performing the update action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" + "smithy.api#documentation": "

\n The request token for performing the update action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#BatchUpdateTableRowsResult": { @@ -380,6 +395,9 @@ "smithy.api#documentation": "

\n The list of batch items in the request that could not be updated in the table. Each element in this list\n contains one item from the request that could not be updated in the table along with the reason why\n that item could not be updated.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#BatchUpsertTableRows": { @@ -417,7 +435,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n The BatchUpsertTableRows API allows you to upsert one or more rows in a table. The upsert\n operation takes a filter expression as input and evaluates it to find matching rows on the destination\n table. If matching rows are found, it will update the cells in the matching rows to new values specified\n in the request. If no matching rows are found, a new row is added at the end of the table and the cells in\n that row are set to the new values specified in the request.\n

\n

\n You can specify the values to set in some or all of the columns in the table for the\n matching or newly appended rows. If a column is not explicitly specified for a particular row, then that\n column will not be updated for that row. To clear out the data in a specific cell, you need to set the value\n as an empty string (\"\").\n

", + "smithy.api#documentation": "

\n The BatchUpsertTableRows API allows you to upsert one or more rows in a table. The upsert\n operation takes a filter expression as input and evaluates it to find matching rows on the destination\n table. If matching rows are found, it will update the cells in the matching rows to new values specified\n in the request. If no matching rows are found, a new row is added at the end of the table and the cells in\n that row are set to the new values specified in the request.\n

\n

\n You can specify the values to set in some or all of the columns in the table for the\n matching or newly appended rows. If a column is not explicitly specified for a particular row, then that\n column will not be updated for that row. To clear out the data in a specific cell, you need to set the value\n as an empty string (\"\").\n

", "smithy.api#http": { "method": "POST", "uri": "/workbooks/{workbookId}/tables/{tableId}/rows/batchupsert", @@ -431,7 +449,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook where the rows are being upserted.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook where the rows are being upserted.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -439,7 +457,7 @@ "tableId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the table where the rows are being upserted.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the table where the rows are being upserted.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -447,16 +465,19 @@ "rowsToUpsert": { "target": "com.amazonaws.honeycode#UpsertRowDataList", "traits": { - "smithy.api#documentation": "

\n The list of rows to upsert in the table. Each item in this list needs to have a batch item id to uniquely\n identify the element in the request, a filter expression to find the rows to update for that element\n and the cell values to set for each column in the upserted rows. You need to specify\n at least one item in this list.\n

\n

\n Note that if one of the filter formulas in the request fails to evaluate because of an error or one of the\n column ids in any of the rows does not exist in the table, then the request fails\n and no updates are made to the table.\n

", + "smithy.api#documentation": "

\n The list of rows to upsert in the table. Each item in this list needs to have a batch item id to uniquely\n identify the element in the request, a filter expression to find the rows to update for that element\n and the cell values to set for each column in the upserted rows. You need to specify\n at least one item in this list.\n

\n

\n Note that if one of the filter formulas in the request fails to evaluate because of an error or one of the\n column ids in any of the rows does not exist in the table, then the request fails\n and no updates are made to the table.\n

", "smithy.api#required": {} } }, "clientRequestToken": { "target": "com.amazonaws.honeycode#ClientRequestToken", "traits": { - "smithy.api#documentation": "

\n The request token for performing the update action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" + "smithy.api#documentation": "

\n The request token for performing the update action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#BatchUpsertTableRowsResult": { @@ -483,6 +504,9 @@ "smithy.api#documentation": "

\n The list of batch items in the request that could not be updated or appended in the table. Each element in\n this list contains one item from the request that could not be updated in the table along with the reason\n why that item could not be updated or appended.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#Cell": { @@ -503,13 +527,13 @@ "rawValue": { "target": "com.amazonaws.honeycode#RawValue", "traits": { - "smithy.api#documentation": "

\n The raw value of the data contained in the cell. The raw value depends on the format of the data in the\n cell. However the attribute in the API return value is always a string containing the raw value.\n

\n

\n Cells with format DATE, DATE_TIME or TIME have the raw value as a floating point\n number where the whole number represents the number of days since 1/1/1900 and the fractional part\n represents the fraction of the day since midnight. For example, a cell with date 11/3/2020 has the raw value\n \"44138\". A cell with the time 9:00 AM has the raw value \"0.375\" and a cell with date/time value of\n 11/3/2020 9:00 AM has the raw value \"44138.375\". Notice that even though the raw value is a number in all\n three cases, it is still represented as a string.\n

\n

\n Cells with format NUMBER, CURRENCY, PERCENTAGE and ACCOUNTING have the raw value of the data as the number\n representing the data being displayed. For example, the number 1.325 with two decimal places in the format\n will have it's raw value as \"1.325\" and formatted value as \"1.33\". A currency value for\n $10 will have the raw value as \"10\" and formatted value as \"$10.00\". A value representing 20% with two\n decimal places in the format will have its raw value as \"0.2\" and the formatted value as \"20.00%\". An\n accounting value of -$25 will have \"-25\" as the raw value and \"$ (25.00)\" as the formatted value.\n

\n

\n Cells with format TEXT will have the raw text as the raw value. For example, a cell with text \"John Smith\"\n will have \"John Smith\" as both the raw value and the formatted value.\n

\n

\n Cells with format CONTACT will have the name of the contact as a formatted value and the email address of\n the contact as the raw value. For example, a contact for John Smith will have \"John Smith\" as the\n formatted value and \"john.smith@example.com\" as the raw value.\n

\n

\n Cells with format ROWLINK (aka picklist) will have the first column of the linked row as the formatted value\n and the row id of the linked row as the raw value. For example, a cell containing a picklist to a table\n that displays task status might have \"Completed\" as the formatted value and\n \"row:dfcefaee-5b37-4355-8f28-40c3e4ff5dd4/ca432b2f-b8eb-431d-9fb5-cbe0342f9f03\" as the raw value.\n

\n

\n Cells with format ROWSET (aka multi-select or multi-record picklist) will by default have the first column\n of each of the linked rows as the formatted value in the list, and the rowset id of the linked rows as the\n raw value. For example, a cell containing a multi-select picklist to a table that contains items might have\n \"Item A\", \"Item B\" in the formatted value list and \"rows:b742c1f4-6cb0-4650-a845-35eb86fcc2bb/\n [fdea123b-8f68-474a-aa8a-5ff87aa333af,6daf41f0-a138-4eee-89da-123086d36ecf]\" as the raw value.\n

\n

\n Cells with format ATTACHMENT will have the name of the attachment as the formatted value and the attachment\n id as the raw value. For example, a cell containing an attachment named \"image.jpeg\" will have\n \"image.jpeg\" as the formatted value and \"attachment:ca432b2f-b8eb-431d-9fb5-cbe0342f9f03\" as the raw value.\n

\n

\n Cells with format AUTO or cells without any format that are auto-detected as one of the formats above will\n contain the raw and formatted values as mentioned above, based on the auto-detected formats. If there is no\n auto-detected format, the raw and formatted values will be the same as the data in the cell.\n

" + "smithy.api#documentation": "

\n The raw value of the data contained in the cell. The raw value depends on the format of the data in the\n cell. However the attribute in the API return value is always a string containing the raw value.\n

\n

\n Cells with format DATE, DATE_TIME or TIME have the raw value as a floating point\n number where the whole number represents the number of days since 1/1/1900 and the fractional part\n represents the fraction of the day since midnight. For example, a cell with date 11/3/2020 has the raw value\n \"44138\". A cell with the time 9:00 AM has the raw value \"0.375\" and a cell with date/time value of\n 11/3/2020 9:00 AM has the raw value \"44138.375\". Notice that even though the raw value is a number in all\n three cases, it is still represented as a string.\n

\n

\n Cells with format NUMBER, CURRENCY, PERCENTAGE and ACCOUNTING have the raw value of the data as the number\n representing the data being displayed. For example, the number 1.325 with two decimal places in the format\n will have it's raw value as \"1.325\" and formatted value as \"1.33\". A currency value for\n $10 will have the raw value as \"10\" and formatted value as \"$10.00\". A value representing 20% with two\n decimal places in the format will have its raw value as \"0.2\" and the formatted value as \"20.00%\". An\n accounting value of -$25 will have \"-25\" as the raw value and \"$ (25.00)\" as the formatted value.\n

\n

\n Cells with format TEXT will have the raw text as the raw value. For example, a cell with text \"John Smith\"\n will have \"John Smith\" as both the raw value and the formatted value.\n

\n

\n Cells with format CONTACT will have the name of the contact as a formatted value and the email address of\n the contact as the raw value. For example, a contact for John Smith will have \"John Smith\" as the\n formatted value and \"john.smith@example.com\" as the raw value.\n

\n

\n Cells with format ROWLINK (aka picklist) will have the first column of the linked row as the formatted value\n and the row id of the linked row as the raw value. For example, a cell containing a picklist to a table\n that displays task status might have \"Completed\" as the formatted value and\n \"row:dfcefaee-5b37-4355-8f28-40c3e4ff5dd4/ca432b2f-b8eb-431d-9fb5-cbe0342f9f03\" as the raw value.\n

\n

\n Cells with format ROWSET (aka multi-select or multi-record picklist) will by default have the first column\n of each of the linked rows as the formatted value in the list, and the rowset id of the linked rows as the\n raw value. For example, a cell containing a multi-select picklist to a table that contains items might have\n \"Item A\", \"Item B\" in the formatted value list and \"rows:b742c1f4-6cb0-4650-a845-35eb86fcc2bb/\n [fdea123b-8f68-474a-aa8a-5ff87aa333af,6daf41f0-a138-4eee-89da-123086d36ecf]\" as the raw value.\n

\n

\n Cells with format ATTACHMENT will have the name of the attachment as the formatted value and the attachment\n id as the raw value. For example, a cell containing an attachment named \"image.jpeg\" will have\n \"image.jpeg\" as the formatted value and \"attachment:ca432b2f-b8eb-431d-9fb5-cbe0342f9f03\" as the raw value.\n

\n

\n Cells with format AUTO or cells without any format that are auto-detected as one of the formats above will\n contain the raw and formatted values as mentioned above, based on the auto-detected formats. If there is no\n auto-detected format, the raw and formatted values will be the same as the data in the cell.\n

" } }, "formattedValue": { "target": "com.amazonaws.honeycode#FormattedValue", "traits": { - "smithy.api#documentation": "

\n The formatted value of the cell. This is the value that you see displayed in the cell in the UI.\n

\n

\n Note that the formatted value of a cell is always represented as a string irrespective of the data that is\n stored in the cell. For example, if a cell contains a date, the formatted value of the cell is the string\n representation of the formatted date being shown in the cell in the UI. See details in the rawValue field\n below for how cells of different formats will have different raw and formatted values.\n

" + "smithy.api#documentation": "

\n The formatted value of the cell. This is the value that you see displayed in the cell in the UI.\n

\n

\n Note that the formatted value of a cell is always represented as a string irrespective of the data that is\n stored in the cell. For example, if a cell contains a date, the formatted value of the cell is the string\n representation of the formatted date being shown in the cell in the UI. See details in the rawValue field\n below for how cells of different formats will have different raw and formatted values.\n

" } }, "formattedValues": { @@ -541,7 +565,7 @@ } }, "traits": { - "smithy.api#documentation": "

\n CellInput object contains the data needed to create or update cells in a table.\n

\n \n

\n CellInput object has only a facts field or a fact field, but not both. A 400 bad request will be\n thrown if both fact and facts field are present.\n

\n
" + "smithy.api#documentation": "

\n CellInput object contains the data needed to create or update cells in a table.\n

\n \n

\n CellInput object has only a facts field or a fact field, but not both. A 400 bad request will be\n thrown if both fact and facts field are present.\n

\n
" } }, "com.amazonaws.honeycode#Cells": { @@ -749,7 +773,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook into which data was imported.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook into which data was imported.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -757,7 +781,7 @@ "tableId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the table into which data was imported.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the table into which data was imported.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -765,11 +789,14 @@ "jobId": { "target": "com.amazonaws.honeycode#JobId", "traits": { - "smithy.api#documentation": "

The ID of the job that was returned by the StartTableDataImportJob request.

\n

\n If a job with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the job that was returned by the StartTableDataImportJob request.

\n

\n If a job with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#DescribeTableDataImportJobResult": { @@ -802,6 +829,9 @@ "smithy.api#documentation": "

\n If job status is failed, error code to understand reason for the failure.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#DestinationOptions": { @@ -830,66 +860,92 @@ } }, "com.amazonaws.honeycode#ErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACCESS_DENIED", - "name": "AccessDenied" - }, - { - "value": "INVALID_URL_ERROR", - "name": "InvalidUrlError" - }, - { - "value": "INVALID_IMPORT_OPTIONS_ERROR", - "name": "InvalidImportOptionsError" - }, - { - "value": "INVALID_TABLE_ID_ERROR", - "name": "InvalidTableIdError" - }, - { - "value": "INVALID_TABLE_COLUMN_ID_ERROR", - "name": "InvalidTableColumnIdError" - }, - { - "value": "TABLE_NOT_FOUND_ERROR", - "name": "TableNotFoundError" - }, - { - "value": "FILE_EMPTY_ERROR", - "name": "FileEmptyError" - }, - { - "value": "INVALID_FILE_TYPE_ERROR", - "name": "InvalidFileTypeError" - }, - { - "value": "FILE_PARSING_ERROR", - "name": "FileParsingError" - }, - { - "value": "FILE_SIZE_LIMIT_ERROR", - "name": "FileSizeLimitError" - }, - { - "value": "FILE_NOT_FOUND_ERROR", - "name": "FileNotFoundError" - }, - { - "value": "UNKNOWN_ERROR", - "name": "UnknownError" - }, - { - "value": "RESOURCE_NOT_FOUND_ERROR", - "name": "ResourceNotFoundError" - }, - { - "value": "SYSTEM_LIMIT_ERROR", - "name": "SystemLimitError" + "type": "enum", + "members": { + "AccessDenied": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED" + } + }, + "InvalidUrlError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_URL_ERROR" + } + }, + "InvalidImportOptionsError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_IMPORT_OPTIONS_ERROR" + } + }, + "InvalidTableIdError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_TABLE_ID_ERROR" + } + }, + "InvalidTableColumnIdError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_TABLE_COLUMN_ID_ERROR" + } + }, + "TableNotFoundError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TABLE_NOT_FOUND_ERROR" + } + }, + "FileEmptyError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FILE_EMPTY_ERROR" + } + }, + "InvalidFileTypeError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_FILE_TYPE_ERROR" + } + }, + "FileParsingError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FILE_PARSING_ERROR" } - ] + }, + "FileSizeLimitError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FILE_SIZE_LIMIT_ERROR" + } + }, + "FileNotFoundError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FILE_NOT_FOUND_ERROR" + } + }, + "UnknownError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN_ERROR" + } + }, + "ResourceNotFoundError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESOURCE_NOT_FOUND_ERROR" + } + }, + "SystemLimitError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SYSTEM_LIMIT_ERROR" + } + } } }, "com.amazonaws.honeycode#ErrorMessage": { @@ -974,58 +1030,80 @@ } }, "com.amazonaws.honeycode#Format": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AUTO", - "name": "Auto" - }, - { - "value": "NUMBER", - "name": "Number" - }, - { - "value": "CURRENCY", - "name": "Currency" - }, - { - "value": "DATE", - "name": "Date" - }, - { - "value": "TIME", - "name": "Time" - }, - { - "value": "DATE_TIME", - "name": "DateTime" - }, - { - "value": "PERCENTAGE", - "name": "Percentage" - }, - { - "value": "TEXT", - "name": "Text" - }, - { - "value": "ACCOUNTING", - "name": "Accounting" - }, - { - "value": "CONTACT", - "name": "Contact" - }, - { - "value": "ROWLINK", - "name": "Rowlink" - }, - { - "value": "ROWSET", - "name": "Rowset" + "type": "enum", + "members": { + "Auto": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUTO" + } + }, + "Number": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NUMBER" + } + }, + "Currency": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CURRENCY" + } + }, + "Date": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATE" + } + }, + "Time": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIME" + } + }, + "DateTime": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATE_TIME" + } + }, + "Percentage": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PERCENTAGE" + } + }, + "Text": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEXT" + } + }, + "Accounting": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCOUNTING" + } + }, + "Contact": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTACT" + } + }, + "Rowlink": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROWLINK" } - ] + }, + "Rowset": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROWSET" + } + } } }, "com.amazonaws.honeycode#FormattedValue": { @@ -1134,15 +1212,18 @@ "maxResults": { "target": "com.amazonaws.honeycode#MaxResults", "traits": { - "smithy.api#documentation": "

\n The number of results to be returned on a single page.\n Specify a number between 1 and 100. The maximum value is 100.\n

\n

\n This parameter is optional. If you don't specify this parameter, the default page size is 100.\n

" + "smithy.api#documentation": "

\n The number of results to be returned on a single page.\n Specify a number between 1 and 100. The maximum value is 100.\n

\n

\n This parameter is optional. If you don't specify this parameter, the default page size is 100.\n

" } }, "nextToken": { "target": "com.amazonaws.honeycode#PaginationToken", "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

" + "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#GetScreenDataResult": { @@ -1169,6 +1250,9 @@ "smithy.api#documentation": "

\n Provides the pagination token to load the next page if there are more results matching the request. If a\n pagination token is not present in the response, it means that all data matching the query has been loaded.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#HasHeaderRow": { @@ -1199,34 +1283,44 @@ } }, "com.amazonaws.honeycode#ImportDataCharacterEncoding": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "UTF-8", - "name": "UTF_8" - }, - { - "value": "US-ASCII", - "name": "US_ASCII" - }, - { - "value": "ISO-8859-1", - "name": "ISO_8859_1" - }, - { - "value": "UTF-16BE", - "name": "UTF_16BE" - }, - { - "value": "UTF-16LE", - "name": "UTF_16LE" - }, - { - "value": "UTF-16", - "name": "UTF_16" + "type": "enum", + "members": { + "UTF_8": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UTF-8" + } + }, + "US_ASCII": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "US-ASCII" } - ] + }, + "ISO_8859_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ISO-8859-1" + } + }, + "UTF_16BE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UTF-16BE" + } + }, + "UTF_16LE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UTF-16LE" + } + }, + "UTF_16": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UTF-16" + } + } } }, "com.amazonaws.honeycode#ImportDataSource": { @@ -1299,14 +1393,14 @@ } }, "com.amazonaws.honeycode#ImportSourceDataFormat": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DELIMITED_TEXT", - "name": "DelimitedText" + "type": "enum", + "members": { + "DelimitedText": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELIMITED_TEXT" } - ] + } } }, "com.amazonaws.honeycode#InternalServerException": { @@ -1421,9 +1515,12 @@ "clientRequestToken": { "target": "com.amazonaws.honeycode#ClientRequestToken", "traits": { - "smithy.api#documentation": "

\n The request token for performing the automation action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will return the\n response of the previous call rather than performing the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" + "smithy.api#documentation": "

\n The request token for performing the automation action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will return the\n response of the previous call rather than performing the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#InvokeScreenAutomationResult": { @@ -1437,6 +1534,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#JobId": { @@ -1489,7 +1589,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "items": "tableColumns" } } }, @@ -1499,7 +1600,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook that contains the table whose columns are being retrieved.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook that contains the table whose columns are being retrieved.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1507,7 +1608,7 @@ "tableId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the table whose columns are being retrieved.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the table whose columns are being retrieved.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1515,10 +1616,13 @@ "nextToken": { "target": "com.amazonaws.honeycode#PaginationToken", "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

", + "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

", "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#ListTableColumnsResult": { @@ -1544,6 +1648,9 @@ "smithy.api#documentation": "

\n Indicates the cursor of the workbook at which the data returned by this request is read. Workbook cursor\n keeps increasing with every update and the increments are not sequential.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#ListTableRows": { @@ -1587,6 +1694,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "rows", "pageSize": "maxResults" } } @@ -1597,7 +1705,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook that contains the table whose rows are being retrieved.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook that contains the table whose rows are being retrieved.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1605,7 +1713,7 @@ "tableId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the table whose rows are being retrieved.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the table whose rows are being retrieved.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1625,9 +1733,12 @@ "nextToken": { "target": "com.amazonaws.honeycode#PaginationToken", "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

" + "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#ListTableRowsResult": { @@ -1667,6 +1778,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#ListTables": { @@ -1710,6 +1824,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "tables", "pageSize": "maxResults" } } @@ -1720,7 +1835,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook whose tables are being retrieved.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook whose tables are being retrieved.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1735,10 +1850,13 @@ "nextToken": { "target": "com.amazonaws.honeycode#PaginationToken", "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

", + "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

", "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#ListTablesResult": { @@ -1764,6 +1882,9 @@ "smithy.api#documentation": "

\n Indicates the cursor of the workbook at which the data returned by this request is read. Workbook cursor\n keeps increasing with every update and the increments are not sequential.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#ListTagsForResource": { @@ -1817,6 +1938,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#ListTagsForResourceResult": { @@ -1828,6 +1952,9 @@ "smithy.api#documentation": "

The resource's tags.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#MaxResults": { @@ -1896,6 +2023,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "rows", "pageSize": "maxResults" } } @@ -1906,7 +2034,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook whose table rows are being queried.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook whose table rows are being queried.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1914,7 +2042,7 @@ "tableId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the table whose rows are being queried.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the table whose rows are being queried.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -1935,9 +2063,12 @@ "nextToken": { "target": "com.amazonaws.honeycode#PaginationToken", "traits": { - "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

" + "smithy.api#documentation": "

\n This parameter is optional. If a nextToken is not specified, the API returns the first page of data.\n

\n

\n Pagination tokens expire after 1 hour. If you use a token that was returned more than an hour back, the API\n will throw ValidationException.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#QueryTableRowsResult": { @@ -1971,6 +2102,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#RawValue": { @@ -2080,7 +2214,7 @@ "headers": { "target": "com.amazonaws.honeycode#ResultHeader", "traits": { - "smithy.api#documentation": "

\n List of headers for all the data cells in the block. The header identifies the name and default format of\n the data cell. Data cells appear in the same order in all rows as defined in the header. The names and\n formats are not repeated in the rows. If a particular row does not have a value for a data cell, a blank\n value is used.\n

\n

\n For example, a task list that displays the task name, due date and assigned person might have headers\n [ { \"name\": \"Task Name\"}, {\"name\": \"Due Date\", \"format\": \"DATE\"}, {\"name\": \"Assigned\", \"format\": \"CONTACT\"} ].\n Every row in the result will have the task name as the first item, due date as the second item and assigned\n person as the third item. If a particular task does not have a due date, that row will still have a blank\n value in the second element and the assigned person will still be in the third element.\n

", + "smithy.api#documentation": "

\n List of headers for all the data cells in the block. The header identifies the name and default format of\n the data cell. Data cells appear in the same order in all rows as defined in the header. The names and\n formats are not repeated in the rows. If a particular row does not have a value for a data cell, a blank\n value is used.\n

\n

\n For example, a task list that displays the task name, due date and assigned person might have headers\n [ { \"name\": \"Task Name\"}, {\"name\": \"Due Date\", \"format\": \"DATE\"}, {\"name\": \"Assigned\", \"format\": \"CONTACT\"} ].\n Every row in the result will have the task name as the first item, due date as the second item and assigned\n person as the third item. If a particular task does not have a due date, that row will still have a blank\n value in the second element and the assigned person will still be in the third element.\n

", "smithy.api#required": {} } }, @@ -2306,52 +2440,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2359,13 +2497,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2375,224 +2522,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://honeycode-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://honeycode-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://honeycode-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://honeycode-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://honeycode.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://honeycode.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://honeycode.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://honeycode.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2607,8 +2705,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2620,8 +2718,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2633,8 +2731,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2646,8 +2744,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2659,8 +2757,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2672,8 +2770,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2685,8 +2783,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2698,8 +2796,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2711,8 +2809,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2724,8 +2822,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2737,8 +2835,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2750,8 +2848,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2763,8 +2861,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2776,8 +2885,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2789,8 +2909,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2802,8 +2933,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2815,8 +2957,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2828,8 +2970,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2841,8 +2983,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2853,8 +2995,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2865,10 +3007,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2948,7 +3096,7 @@ "workbookId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the workbook where the rows are being imported.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the workbook where the rows are being imported.

\n

\n If a workbook with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2970,7 +3118,7 @@ "destinationTableId": { "target": "com.amazonaws.honeycode#ResourceId", "traits": { - "smithy.api#documentation": "

The ID of the table where the rows are being imported.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", + "smithy.api#documentation": "

The ID of the table where the rows are being imported.

\n

\n If a table with the specified id could not be found, this API throws ResourceNotFoundException.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -2985,10 +3133,13 @@ "clientRequestToken": { "target": "com.amazonaws.honeycode#ClientRequestToken", "traits": { - "smithy.api#documentation": "

\n The request token for performing the update action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

", + "smithy.api#documentation": "

\n The request token for performing the update action.\n Request tokens help to identify duplicate requests. If a call times out or fails due to a transient error\n like a failed network connection, you can retry the call with the same request token. The service ensures\n that if the first call using that request token is successfully performed, the second call will not perform\n the action again.\n

\n

\n Note that request tokens are valid only for a few minutes. You cannot use request tokens to dedupe requests\n spanning hours or days.\n

", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#StartTableDataImportJobResult": { @@ -3008,6 +3159,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.honeycode#Table": { @@ -3105,26 +3259,32 @@ } }, "com.amazonaws.honeycode#TableDataImportJobStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUBMITTED", - "name": "Submitted" - }, - { - "value": "IN_PROGRESS", - "name": "InProgress" - }, - { - "value": "COMPLETED", - "name": "Completed" - }, - { - "value": "FAILED", - "name": "Failed" + "type": "enum", + "members": { + "Submitted": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUBMITTED" + } + }, + "InProgress": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" } - ] + }, + "Completed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + }, + "Failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } } }, "com.amazonaws.honeycode#TableName": { @@ -3245,11 +3405,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#TagResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.honeycode#TagValue": { "type": "string", @@ -3352,11 +3518,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.honeycode#UntagResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.honeycode#UpdateRowData": { "type": "structure", @@ -3393,18 +3565,20 @@ } }, "com.amazonaws.honeycode#UpsertAction": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "UPDATED", - "name": "Updated" - }, - { - "value": "APPENDED", - "name": "Appended" + "type": "enum", + "members": { + "Updated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATED" } - ] + }, + "Appended": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPENDED" + } + } } }, "com.amazonaws.honeycode#UpsertRowData": { @@ -3420,7 +3594,7 @@ "filter": { "target": "com.amazonaws.honeycode#Filter", "traits": { - "smithy.api#documentation": "

\n The filter formula to use to find existing matching rows to update. The formula needs to return zero or more\n rows. If the formula returns 0 rows, then a new row will be appended in the target table. If the formula\n returns one or more rows, then the returned rows will be updated.\n

\n

\n Note that the filter formula needs to return rows from the target table for the upsert operation to succeed.\n If the filter formula has a syntax error or it doesn't evaluate to zero or more rows in the target table\n for any one item in the input list, then the entire BatchUpsertTableRows request fails and no updates are\n made to the table.\n

", + "smithy.api#documentation": "

\n The filter formula to use to find existing matching rows to update. The formula needs to return zero or more\n rows. If the formula returns 0 rows, then a new row will be appended in the target table. If the formula\n returns one or more rows, then the returned rows will be updated.\n

\n

\n Note that the filter formula needs to return rows from the target table for the upsert operation to succeed.\n If the filter formula has a syntax error or it doesn't evaluate to zero or more rows in the target table\n for any one item in the input list, then the entire BatchUpsertTableRows request fails and no updates are\n made to the table.\n

", "smithy.api#required": {} } }, diff --git a/codegen/sdk-codegen/aws-models/iam.json b/codegen/sdk-codegen/aws-models/iam.json index d1b5c5e6220..8ad03eb5281 100644 --- a/codegen/sdk-codegen/aws-models/iam.json +++ b/codegen/sdk-codegen/aws-models/iam.json @@ -588,52 +588,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -641,597 +645,557 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://iam.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "iam", - "signingRegion": "us-east-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://iam.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "iam", + "signingRegion": "us-east-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] + "ref": "UseFIPS" }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://iam-fips.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "iam", - "signingRegion": "us-east-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://iam-fips.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "iam", + "signingRegion": "us-east-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-cn" + "name" ] }, + "aws-cn" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://iam.cn-north-1.amazonaws.com.cn", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "iam", - "signingRegion": "cn-north-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://iam.cn-north-1.amazonaws.com.cn", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "iam", + "signingRegion": "cn-north-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-us-gov" + "name" ] }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://iam.us-gov.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "iam", - "signingRegion": "us-gov-west-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://iam.us-gov.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "iam", + "signingRegion": "us-gov-west-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-us-gov" + "name" ] }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://iam.us-gov.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "iam", + "signingRegion": "us-gov-west-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", "argv": [ { - "ref": "UseFIPS" + "ref": "PartitionResult" }, - true + "name" ] }, + "aws-iso" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://iam.us-iso-east-1.c2s.ic.gov", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "iam", + "signingRegion": "us-iso-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ { - "ref": "UseDualStack" + "ref": "PartitionResult" }, - false - ] - } - ], - "endpoint": { - "url": "https://iam.us-gov.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "iam", - "signingRegion": "us-gov-west-1" - } + "name" ] }, - "headers": {} - }, - "type": "endpoint" + "aws-iso-b" + ] }, { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - }, - "aws-iso" - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://iam.us-isob-east-1.sc2s.sgov.gov", + "properties": { + "authSchemes": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "name": "sigv4", + "signingName": "iam", + "signingRegion": "us-isob-east-1" } - ], - "endpoint": { - "url": "https://iam.us-iso-east-1.c2s.ic.gov", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "iam", - "signingRegion": "us-iso-east-1" - } - ] + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" }, - "headers": {} - }, - "type": "endpoint" + true + ] }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { - "fn": "stringEquals", + "fn": "booleanEquals", "argv": [ + true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "name" + "supportsFIPS" ] - }, - "aws-iso-b" - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://iam.us-isob-east-1.sc2s.sgov.gov", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "iam", - "signingRegion": "us-isob-east-1" } ] }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iam-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://iam-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iam-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://iam-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iam.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://iam.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://iam.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://iam.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1978,7 +1942,17 @@ } ], "traits": { - "smithy.api#documentation": "

Adds a new client ID (also known as audience) to the list of client IDs already\n registered for the specified IAM OpenID Connect (OIDC) provider resource.

\n

This operation is idempotent; it does not fail or return an error if you add an\n existing client ID to the provider.

" + "smithy.api#documentation": "

Adds a new client ID (also known as audience) to the list of client IDs already\n registered for the specified IAM OpenID Connect (OIDC) provider resource.

\n

This operation is idempotent; it does not fail or return an error if you add an\n existing client ID to the provider.

", + "smithy.api#examples": [ + { + "title": "To add a client ID (audience) to an Open-ID Connect (OIDC) provider", + "documentation": "The following add-client-id-to-open-id-connect-provider command adds the client ID my-application-ID to the OIDC provider named server.example.com:", + "input": { + "ClientID": "my-application-ID", + "OpenIDConnectProviderArn": "arn:aws:iam::123456789012:oidc-provider/server.example.com" + } + } + ] } }, "com.amazonaws.iam#AddClientIDToOpenIDConnectProviderRequest": { @@ -2029,7 +2003,17 @@ } ], "traits": { - "smithy.api#documentation": "

Adds the specified IAM role to the specified instance profile. An instance profile\n can contain only one role, and this quota cannot be increased. You can remove the\n existing role and then add a different role to an instance profile. You must then wait\n for the change to appear across all of Amazon Web Services because of eventual\n consistency. To force the change, you must disassociate the instance profile and then associate the\n instance profile, or you can stop your instance and then restart it.

\n \n

The caller of this operation must be granted the PassRole permission\n on the IAM role by a permissions policy.

\n
\n

For more information about roles, see IAM roles in the\n IAM User Guide. For more information about instance profiles,\n see Using\n instance profiles in the IAM User Guide.

" + "smithy.api#documentation": "

Adds the specified IAM role to the specified instance profile. An instance profile\n can contain only one role, and this quota cannot be increased. You can remove the\n existing role and then add a different role to an instance profile. You must then wait\n for the change to appear across all of Amazon Web Services because of eventual\n consistency. To force the change, you must disassociate the instance profile and then associate the\n instance profile, or you can stop your instance and then restart it.

\n \n

The caller of this operation must be granted the PassRole permission\n on the IAM role by a permissions policy.

\n
\n

For more information about roles, see IAM roles in the\n IAM User Guide. For more information about instance profiles,\n see Using\n instance profiles in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To add a role to an instance profile", + "documentation": "The following command adds the role named S3Access to the instance profile named Webserver:", + "input": { + "RoleName": "S3Access", + "InstanceProfileName": "Webserver" + } + } + ] } }, "com.amazonaws.iam#AddRoleToInstanceProfileRequest": { @@ -2074,7 +2058,17 @@ } ], "traits": { - "smithy.api#documentation": "

Adds the specified user to the specified group.

" + "smithy.api#documentation": "

Adds the specified user to the specified group.

", + "smithy.api#examples": [ + { + "title": "To add a user to an IAM group", + "documentation": "The following command adds an IAM user named Bob to the IAM group named Admins:", + "input": { + "UserName": "Bob", + "GroupName": "Admins" + } + } + ] } }, "com.amazonaws.iam#AddUserToGroupRequest": { @@ -2131,7 +2125,17 @@ } ], "traits": { - "smithy.api#documentation": "

Attaches the specified managed policy to the specified IAM group.

\n

You use this operation to attach a managed policy to a group. To embed an inline\n policy in a group, use \n PutGroupPolicy\n .

\n

As a best practice, you can validate your IAM policies. \n To learn more, see Validating IAM policies \n in the IAM User Guide.

\n

For more information about policies, see Managed policies and inline\n policies in the IAM User Guide.

" + "smithy.api#documentation": "

Attaches the specified managed policy to the specified IAM group.

\n

You use this operation to attach a managed policy to a group. To embed an inline\n policy in a group, use \n PutGroupPolicy\n .

\n

As a best practice, you can validate your IAM policies. \n To learn more, see Validating IAM policies \n in the IAM User Guide.

\n

For more information about policies, see Managed policies and inline\n policies in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To attach a managed policy to an IAM group", + "documentation": "The following command attaches the AWS managed policy named ReadOnlyAccess to the IAM group named Finance.", + "input": { + "GroupName": "Finance", + "PolicyArn": "arn:aws:iam::aws:policy/ReadOnlyAccess" + } + } + ] } }, "com.amazonaws.iam#AttachGroupPolicyRequest": { @@ -2185,7 +2189,17 @@ } ], "traits": { - "smithy.api#documentation": "

Attaches the specified managed policy to the specified IAM role. When you attach a\n managed policy to a role, the managed policy becomes part of the role's permission\n (access) policy.

\n \n

You cannot use a managed policy as the role's trust policy. The role's trust\n policy is created at the same time as the role, using \n CreateRole\n . You can update a role's trust policy using\n \n UpdateAssumerolePolicy\n .

\n
\n

Use this operation to attach a managed policy to a role. To embed\n an inline policy in a role, use \n PutRolePolicy\n . For more information about policies, see Managed\n policies and inline policies in the\n IAM User Guide.

\n

As a best practice, you can validate your IAM policies. \n To learn more, see Validating IAM policies \n in the IAM User Guide.

" + "smithy.api#documentation": "

Attaches the specified managed policy to the specified IAM role. When you attach a\n managed policy to a role, the managed policy becomes part of the role's permission\n (access) policy.

\n \n

You cannot use a managed policy as the role's trust policy. The role's trust\n policy is created at the same time as the role, using \n CreateRole\n . You can update a role's trust policy using\n \n UpdateAssumerolePolicy\n .

\n
\n

Use this operation to attach a managed policy to a role. To embed\n an inline policy in a role, use \n PutRolePolicy\n . For more information about policies, see Managed\n policies and inline policies in the\n IAM User Guide.

\n

As a best practice, you can validate your IAM policies. \n To learn more, see Validating IAM policies \n in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To attach a managed policy to an IAM role", + "documentation": "The following command attaches the AWS managed policy named ReadOnlyAccess to the IAM role named ReadOnlyRole.", + "input": { + "RoleName": "ReadOnlyRole", + "PolicyArn": "arn:aws:iam::aws:policy/ReadOnlyAccess" + } + } + ] } }, "com.amazonaws.iam#AttachRolePolicyRequest": { @@ -2236,7 +2250,17 @@ } ], "traits": { - "smithy.api#documentation": "

Attaches the specified managed policy to the specified user.

\n

You use this operation to attach a managed policy to a user. To\n embed an inline policy in a user, use \n PutUserPolicy\n .

\n

As a best practice, you can validate your IAM policies. \n To learn more, see Validating IAM policies \n in the IAM User Guide.

\n

For more information about policies, see Managed policies and inline\n policies in the IAM User Guide.

" + "smithy.api#documentation": "

Attaches the specified managed policy to the specified user.

\n

You use this operation to attach a managed policy to a user. To\n embed an inline policy in a user, use \n PutUserPolicy\n .

\n

As a best practice, you can validate your IAM policies. \n To learn more, see Validating IAM policies \n in the IAM User Guide.

\n

For more information about policies, see Managed policies and inline\n policies in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To attach a managed policy to an IAM user", + "documentation": "The following command attaches the AWS managed policy named AdministratorAccess to the IAM user named Alice.", + "input": { + "UserName": "Alice", + "PolicyArn": "arn:aws:iam::aws:policy/AdministratorAccess" + } + } + ] } }, "com.amazonaws.iam#AttachUserPolicyRequest": { @@ -2362,7 +2386,17 @@ } ], "traits": { - "smithy.api#documentation": "

Changes the password of the IAM user who is calling this operation. This operation\n can be performed using the CLI, the Amazon Web Services API, or the My\n Security Credentials page in the Amazon Web Services Management Console. The Amazon Web Services account root user password is\n not affected by this operation.

\n

Use UpdateLoginProfile to use the CLI, the Amazon Web Services API, or the\n Users page in the IAM console to change the\n password for any IAM user. For more information about modifying passwords, see Managing\n passwords in the IAM User Guide.

" + "smithy.api#documentation": "

Changes the password of the IAM user who is calling this operation. This operation\n can be performed using the CLI, the Amazon Web Services API, or the My\n Security Credentials page in the Amazon Web Services Management Console. The Amazon Web Services account root user password is\n not affected by this operation.

\n

Use UpdateLoginProfile to use the CLI, the Amazon Web Services API, or the\n Users page in the IAM console to change the\n password for any IAM user. For more information about modifying passwords, see Managing\n passwords in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To change the password for your IAM user", + "documentation": "The following command changes the password for the current IAM user.", + "input": { + "NewPassword": "]35d/{pB9Fo9wJ", + "OldPassword": "3s0K_;xh4~8XXI" + } + } + ] } }, "com.amazonaws.iam#ChangePasswordRequest": { @@ -2566,7 +2600,25 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new Amazon Web Services secret access key and corresponding Amazon Web Services access key ID for the\n specified user. The default status for new keys is Active.

\n

If you do not specify a user name, IAM determines the user name implicitly based on\n the Amazon Web Services access key ID signing the request. This operation works for access keys under\n the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root\n user credentials. This is true even if the Amazon Web Services account has no associated users.

\n

For information about quotas on the number of keys you can create, see IAM and STS\n quotas in the IAM User Guide.

\n \n

To ensure the security of your Amazon Web Services account, the secret access key is accessible\n only during key and user creation. You must save the key (for example, in a text\n file) if you want to be able to access it again. If a secret key is lost, you can\n delete the access keys for the associated user and then create new keys.

\n
" + "smithy.api#documentation": "

Creates a new Amazon Web Services secret access key and corresponding Amazon Web Services access key ID for the\n specified user. The default status for new keys is Active.

\n

If you do not specify a user name, IAM determines the user name implicitly based on\n the Amazon Web Services access key ID signing the request. This operation works for access keys under\n the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root\n user credentials. This is true even if the Amazon Web Services account has no associated users.

\n

For information about quotas on the number of keys you can create, see IAM and STS\n quotas in the IAM User Guide.

\n \n

To ensure the security of your Amazon Web Services account, the secret access key is accessible\n only during key and user creation. You must save the key (for example, in a text\n file) if you want to be able to access it again. If a secret key is lost, you can\n delete the access keys for the associated user and then create new keys.

\n
", + "smithy.api#examples": [ + { + "title": "To create an access key for an IAM user", + "documentation": "The following command creates an access key (access key ID and secret access key) for the IAM user named Bob.", + "input": { + "UserName": "Bob" + }, + "output": { + "AccessKey": { + "UserName": "Bob", + "Status": "Active", + "CreateDate": "2015-03-09T18:39:23.411Z", + "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + "AccessKeyId": "AKIAIOSFODNN7EXAMPLE" + } + } + } + ] } }, "com.amazonaws.iam#CreateAccessKeyRequest": { @@ -2622,7 +2674,16 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an alias for your Amazon Web Services account. For information about using an Amazon Web Services account\n alias, see Creating, deleting, and\n listing an Amazon Web Services account alias in the Amazon Web Services Sign-In User\n Guide.

" + "smithy.api#documentation": "

Creates an alias for your Amazon Web Services account. For information about using an Amazon Web Services account\n alias, see Creating, deleting, and\n listing an Amazon Web Services account alias in the Amazon Web Services Sign-In User\n Guide.

", + "smithy.api#examples": [ + { + "title": "To create an account alias", + "documentation": "The following command associates the alias examplecorp to your AWS account.", + "input": { + "AccountAlias": "examplecorp" + } + } + ] } }, "com.amazonaws.iam#CreateAccountAliasRequest": { @@ -2663,7 +2724,25 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new group.

\n

For information about the number of groups you can create, see IAM and STS\n quotas in the IAM User Guide.

" + "smithy.api#documentation": "

Creates a new group.

\n

For information about the number of groups you can create, see IAM and STS\n quotas in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To create an IAM group", + "documentation": "The following command creates an IAM group named Admins.", + "input": { + "GroupName": "Admins" + }, + "output": { + "Group": { + "Path": "/", + "CreateDate": "2015-03-09T20:30:24.940Z", + "GroupId": "AIDGPMS9RO4H3FEXAMPLE", + "Arn": "arn:aws:iam::123456789012:group/Admins", + "GroupName": "Admins" + } + } + } + ] } }, "com.amazonaws.iam#CreateGroupRequest": { @@ -2729,7 +2808,26 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new instance profile. For information about instance profiles, see Using\n roles for applications on Amazon EC2 in the\n IAM User Guide, and Instance profiles in the Amazon EC2 User Guide.

\n

For information about the number of instance profiles you can create, see IAM object\n quotas in the IAM User Guide.

" + "smithy.api#documentation": "

Creates a new instance profile. For information about instance profiles, see Using\n roles for applications on Amazon EC2 in the\n IAM User Guide, and Instance profiles in the Amazon EC2 User Guide.

\n

For information about the number of instance profiles you can create, see IAM object\n quotas in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To create an instance profile", + "documentation": "The following command creates an instance profile named Webserver that is ready to have a role attached and then be associated with an EC2 instance.", + "input": { + "InstanceProfileName": "Webserver" + }, + "output": { + "InstanceProfile": { + "InstanceProfileId": "AIPAJMBYC7DLSPEXAMPLE", + "Roles": [], + "CreateDate": "2015-03-09T20:33:19.626Z", + "InstanceProfileName": "Webserver", + "Path": "/", + "Arn": "arn:aws:iam::123456789012:instance-profile/Webserver" + } + } + } + ] } }, "com.amazonaws.iam#CreateInstanceProfileRequest": { @@ -2801,7 +2899,25 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a password for the specified IAM user. A password allows an IAM user to\n access Amazon Web Services services through the Amazon Web Services Management Console.

\n

You can use the CLI, the Amazon Web Services API, or the Users\n page in the IAM console to create a password for any IAM user. Use ChangePassword to update your own existing password in the My Security Credentials page in the Amazon Web Services Management Console.

\n

For more information about managing passwords, see Managing passwords in the\n IAM User Guide.

" + "smithy.api#documentation": "

Creates a password for the specified IAM user. A password allows an IAM user to\n access Amazon Web Services services through the Amazon Web Services Management Console.

\n

You can use the CLI, the Amazon Web Services API, or the Users\n page in the IAM console to create a password for any IAM user. Use ChangePassword to update your own existing password in the My Security Credentials page in the Amazon Web Services Management Console.

\n

For more information about managing passwords, see Managing passwords in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To create an instance profile", + "documentation": "The following command changes IAM user Bob's password and sets the flag that required Bob to change the password the next time he signs in.", + "input": { + "UserName": "Bob", + "Password": "h]6EszR}vJ*m", + "PasswordResetRequired": true + }, + "output": { + "LoginProfile": { + "UserName": "Bob", + "CreateDate": "2015-03-10T20:55:40.274Z", + "PasswordResetRequired": true + } + } + } + ] } }, "com.amazonaws.iam#CreateLoginProfileRequest": { @@ -2875,7 +2991,25 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC).

\n

The OIDC provider that you create with this operation can be used as a principal in a\n role's trust policy. Such a policy establishes a trust relationship between Amazon Web Services and\n the OIDC provider.

\n

If you are using an OIDC identity provider from Google, Facebook, or Amazon Cognito, you don't\n need to create a separate IAM identity provider. These OIDC identity providers are\n already built-in to Amazon Web Services and are available for your use. Instead, you can move directly\n to creating new roles using your identity provider. To learn more, see Creating\n a role for web identity or OpenID connect federation in the IAM\n User Guide.

\n

When you create the IAM OIDC provider, you specify the following:

\n \n

You get all of this information from the OIDC IdP you want to use to access\n Amazon Web Services.

\n \n

Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our\n library of trusted root certificate authorities (CAs) instead of using a certificate\n thumbprint to verify your IdP server certificate. These OIDC IdPs include Auth0, GitHub,\n Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. In\n these cases, your legacy thumbprint remains in your configuration, but is no longer used\n for validation.

\n
\n \n

The trust for the OIDC provider is derived from the IAM provider that this\n operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged\n users.

\n
" + "smithy.api#documentation": "

Creates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC).

\n

The OIDC provider that you create with this operation can be used as a principal in a\n role's trust policy. Such a policy establishes a trust relationship between Amazon Web Services and\n the OIDC provider.

\n

If you are using an OIDC identity provider from Google, Facebook, or Amazon Cognito, you don't\n need to create a separate IAM identity provider. These OIDC identity providers are\n already built-in to Amazon Web Services and are available for your use. Instead, you can move directly\n to creating new roles using your identity provider. To learn more, see Creating\n a role for web identity or OpenID connect federation in the IAM\n User Guide.

\n

When you create the IAM OIDC provider, you specify the following:

\n \n

You get all of this information from the OIDC IdP you want to use to access\n Amazon Web Services.

\n \n

Amazon Web Services secures communication with some OIDC identity providers (IdPs) through our\n library of trusted root certificate authorities (CAs) instead of using a certificate\n thumbprint to verify your IdP server certificate. These OIDC IdPs include Auth0, GitHub,\n Google, and those that use an Amazon S3 bucket to host a JSON Web Key Set (JWKS) endpoint. In\n these cases, your legacy thumbprint remains in your configuration, but is no longer used\n for validation.

\n
\n \n

The trust for the OIDC provider is derived from the IAM provider that this\n operation creates. Therefore, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged\n users.

\n
", + "smithy.api#examples": [ + { + "title": "To create an instance profile", + "documentation": "The following example defines a new OIDC provider in IAM with a client ID of my-application-id and pointing at the server with a URL of https://server.example.com.", + "input": { + "ClientIDList": [ + "my-application-id" + ], + "ThumbprintList": [ + "3768084dfb3d2b68b7897bf5f565da8efEXAMPLE" + ], + "Url": "https://server.example.com" + }, + "output": { + "OpenIDConnectProviderArn": "arn:aws:iam::123456789012:oidc-provider/server.example.com" + } + } + ] } }, "com.amazonaws.iam#CreateOpenIDConnectProviderRequest": { @@ -3122,7 +3256,28 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new role for your Amazon Web Services account.

\n

For more information about roles, see IAM roles in the\n IAM User Guide. For information about quotas for role names\n and the number of roles you can create, see IAM and STS quotas in the\n IAM User Guide.

" + "smithy.api#documentation": "

Creates a new role for your Amazon Web Services account.

\n

For more information about roles, see IAM roles in the\n IAM User Guide. For information about quotas for role names\n and the number of roles you can create, see IAM and STS quotas in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To create an IAM role", + "documentation": "The following command creates a role named Test-Role and attaches a trust policy that you must convert from JSON to a string. Upon success, the response includes the same policy as a URL-encoded JSON string.", + "input": { + "AssumeRolePolicyDocument": "", + "Path": "/", + "RoleName": "Test-Role" + }, + "output": { + "Role": { + "Arn": "arn:aws:iam::123456789012:role/Test-Role", + "AssumeRolePolicyDocument": "", + "CreateDate": "2013-06-07T20:43:32.821Z", + "Path": "/", + "RoleId": "AKIAIOSFODNN7EXAMPLE", + "RoleName": "Test-Role" + } + } + } + ] } }, "com.amazonaws.iam#CreateRoleRequest": { @@ -3426,7 +3581,25 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new IAM user for your Amazon Web Services account.

\n

For information about quotas for the number of IAM users you can create, see IAM and STS\n quotas in the IAM User Guide.

" + "smithy.api#documentation": "

Creates a new IAM user for your Amazon Web Services account.

\n

For information about quotas for the number of IAM users you can create, see IAM and STS\n quotas in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To create an IAM user", + "documentation": "The following create-user command creates an IAM user named Bob in the current account.", + "input": { + "UserName": "Bob" + }, + "output": { + "User": { + "UserName": "Bob", + "Path": "/", + "CreateDate": "2013-06-08T03:20:41.270Z", + "UserId": "AKIAIOSFODNN7EXAMPLE", + "Arn": "arn:aws:iam::123456789012:user/Bob" + } + } + } + ] } }, "com.amazonaws.iam#CreateUserRequest": { @@ -3671,7 +3844,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the access key pair associated with the specified IAM user.

\n

If you do not specify a user name, IAM determines the user name implicitly based on\n the Amazon Web Services access key ID signing the request. This operation works for access keys under\n the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root\n user credentials even if the Amazon Web Services account has no associated users.

" + "smithy.api#documentation": "

Deletes the access key pair associated with the specified IAM user.

\n

If you do not specify a user name, IAM determines the user name implicitly based on\n the Amazon Web Services access key ID signing the request. This operation works for access keys under\n the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root\n user credentials even if the Amazon Web Services account has no associated users.

", + "smithy.api#examples": [ + { + "title": "To delete an access key for an IAM user", + "documentation": "The following command deletes one access key (access key ID and secret access key) assigned to the IAM user named Bob.", + "input": { + "UserName": "Bob", + "AccessKeyId": "AKIDPMS9RO4H3FEXAMPLE" + } + } + ] } }, "com.amazonaws.iam#DeleteAccessKeyRequest": { @@ -3718,7 +3901,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified Amazon Web Services account alias. For information about using an Amazon Web Services\n account alias, see Creating, deleting, and\n listing an Amazon Web Services account alias in the Amazon Web Services Sign-In User\n Guide.

" + "smithy.api#documentation": "

Deletes the specified Amazon Web Services account alias. For information about using an Amazon Web Services\n account alias, see Creating, deleting, and\n listing an Amazon Web Services account alias in the Amazon Web Services Sign-In User\n Guide.

", + "smithy.api#examples": [ + { + "title": "To delete an account alias", + "documentation": "The following command removes the alias mycompany from the current AWS account:", + "input": { + "AccountAlias": "mycompany" + } + } + ] } }, "com.amazonaws.iam#DeleteAccountAliasRequest": { @@ -3756,7 +3948,13 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the password policy for the Amazon Web Services account. There are no parameters.

" + "smithy.api#documentation": "

Deletes the password policy for the Amazon Web Services account. There are no parameters.

", + "smithy.api#examples": [ + { + "title": "To delete the current account password policy", + "documentation": "The following command removes the password policy from the current AWS account:" + } + ] } }, "com.amazonaws.iam#DeleteConflictException": { @@ -3822,7 +4020,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified inline policy that is embedded in the specified IAM\n group.

\n

A group can also have managed policies attached to it. To detach a managed policy from\n a group, use DetachGroupPolicy. For more information about policies,\n refer to Managed policies and inline\n policies in the IAM User Guide.

" + "smithy.api#documentation": "

Deletes the specified inline policy that is embedded in the specified IAM\n group.

\n

A group can also have managed policies attached to it. To detach a managed policy from\n a group, use DetachGroupPolicy. For more information about policies,\n refer to Managed policies and inline\n policies in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To delete a policy from an IAM group", + "documentation": "The following command deletes the policy named ExamplePolicy from the group named Admins:", + "input": { + "GroupName": "Admins", + "PolicyName": "ExamplePolicy" + } + } + ] } }, "com.amazonaws.iam#DeleteGroupPolicyRequest": { @@ -3885,7 +4093,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified instance profile. The instance profile must not have an\n associated role.

\n \n

Make sure that you do not have any Amazon EC2 instances running with the instance\n profile you are about to delete. Deleting a role or instance profile that is\n associated with a running instance will break any applications running on the\n instance.

\n
\n

For more information about instance profiles, see Using\n instance profiles in the IAM User Guide.

" + "smithy.api#documentation": "

Deletes the specified instance profile. The instance profile must not have an\n associated role.

\n \n

Make sure that you do not have any Amazon EC2 instances running with the instance\n profile you are about to delete. Deleting a role or instance profile that is\n associated with a running instance will break any applications running on the\n instance.

\n
\n

For more information about instance profiles, see Using\n instance profiles in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To delete an instance profile", + "documentation": "The following command deletes the instance profile named ExampleInstanceProfile", + "input": { + "InstanceProfileName": "ExampleInstanceProfile" + } + } + ] } }, "com.amazonaws.iam#DeleteInstanceProfileRequest": { @@ -3926,7 +4143,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the password for the specified IAM user, For more information, see Managing\n passwords for IAM users.

\n

You can use the CLI, the Amazon Web Services API, or the Users\n page in the IAM console to delete a password for any IAM user. You can use ChangePassword to update, but not delete, your own password in the\n My Security Credentials page in the\n Amazon Web Services Management Console.

\n \n

Deleting a user's password does not prevent a user from accessing Amazon Web Services through\n the command line interface or the API. To prevent all user access, you must also\n either make any access keys inactive or delete them. For more information about\n making keys inactive or deleting them, see UpdateAccessKey and\n DeleteAccessKey.

\n
" + "smithy.api#documentation": "

Deletes the password for the specified IAM user, For more information, see Managing\n passwords for IAM users.

\n

You can use the CLI, the Amazon Web Services API, or the Users\n page in the IAM console to delete a password for any IAM user. You can use ChangePassword to update, but not delete, your own password in the\n My Security Credentials page in the\n Amazon Web Services Management Console.

\n \n

Deleting a user's password does not prevent a user from accessing Amazon Web Services through\n the command line interface or the API. To prevent all user access, you must also\n either make any access keys inactive or delete them. For more information about\n making keys inactive or deleting them, see UpdateAccessKey and\n DeleteAccessKey.

\n
", + "smithy.api#examples": [ + { + "title": "To delete a password for an IAM user", + "documentation": "The following command deletes the password for the IAM user named Bob.", + "input": { + "UserName": "Bob" + } + } + ] } }, "com.amazonaws.iam#DeleteLoginProfileRequest": { @@ -4106,7 +4332,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified role. Unlike the Amazon Web Services Management Console, when you delete a role\n programmatically, you must delete the items attached to the role manually, or the\n deletion fails. For more information, see Deleting an IAM role. Before attempting to delete a role, remove the\n following attached items:

\n \n \n

Make sure that you do not have any Amazon EC2 instances running with the role you\n are about to delete. Deleting a role or instance profile that is associated with a\n running instance will break any applications running on the instance.

\n
" + "smithy.api#documentation": "

Deletes the specified role. Unlike the Amazon Web Services Management Console, when you delete a role\n programmatically, you must delete the items attached to the role manually, or the\n deletion fails. For more information, see Deleting an IAM role. Before attempting to delete a role, remove the\n following attached items:

\n \n \n

Make sure that you do not have any Amazon EC2 instances running with the role you\n are about to delete. Deleting a role or instance profile that is associated with a\n running instance will break any applications running on the instance.

\n
", + "smithy.api#examples": [ + { + "title": "To delete an IAM role", + "documentation": "The following command removes the role named Test-Role.", + "input": { + "RoleName": "Test-Role" + } + } + ] } }, "com.amazonaws.iam#DeleteRolePermissionsBoundary": { @@ -4170,7 +4405,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified inline policy that is embedded in the specified IAM\n role.

\n

A role can also have managed policies attached to it. To detach a managed policy from\n a role, use DetachRolePolicy. For more information about policies,\n refer to Managed policies and inline\n policies in the IAM User Guide.

" + "smithy.api#documentation": "

Deletes the specified inline policy that is embedded in the specified IAM\n role.

\n

A role can also have managed policies attached to it. To detach a managed policy from\n a role, use DetachRolePolicy. For more information about policies,\n refer to Managed policies and inline\n policies in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To remove a policy from an IAM role", + "documentation": "The following command removes the policy named ExamplePolicy from the role named Test-Role.", + "input": { + "RoleName": "Test-Role", + "PolicyName": "ExamplePolicy" + } + } + ] } }, "com.amazonaws.iam#DeleteRolePolicyRequest": { @@ -4445,7 +4690,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a signing certificate associated with the specified IAM user.

\n

If you do not specify a user name, IAM determines the user name implicitly based on\n the Amazon Web Services access key ID signing the request. This operation works for access keys under\n the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root\n user credentials even if the Amazon Web Services account has no associated IAM users.

" + "smithy.api#documentation": "

Deletes a signing certificate associated with the specified IAM user.

\n

If you do not specify a user name, IAM determines the user name implicitly based on\n the Amazon Web Services access key ID signing the request. This operation works for access keys under\n the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root\n user credentials even if the Amazon Web Services account has no associated IAM users.

", + "smithy.api#examples": [ + { + "title": "To delete a signing certificate for an IAM user", + "documentation": "The following command deletes the specified signing certificate for the IAM user named Anika.", + "input": { + "UserName": "Anika", + "CertificateId": "TA7SMP42TDN5Z26OBPJE7EXAMPLE" + } + } + ] } }, "com.amazonaws.iam#DeleteSigningCertificateRequest": { @@ -4495,7 +4750,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified IAM user. Unlike the Amazon Web Services Management Console, when you delete a user\n programmatically, you must delete the items attached to the user manually, or the\n deletion fails. For more information, see Deleting an IAM\n user. Before attempting to delete a user, remove the following items:

\n " + "smithy.api#documentation": "

Deletes the specified IAM user. Unlike the Amazon Web Services Management Console, when you delete a user\n programmatically, you must delete the items attached to the user manually, or the\n deletion fails. For more information, see Deleting an IAM\n user. Before attempting to delete a user, remove the following items:

\n ", + "smithy.api#examples": [ + { + "title": "To delete an IAM user", + "documentation": "The following command removes the IAM user named Bob from the current account.", + "input": { + "UserName": "Bob" + } + } + ] } }, "com.amazonaws.iam#DeleteUserPermissionsBoundary": { @@ -4553,7 +4817,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified inline policy that is embedded in the specified IAM\n user.

\n

A user can also have managed policies attached to it. To detach a managed policy from\n a user, use DetachUserPolicy. For more information about policies,\n refer to Managed policies and inline\n policies in the IAM User Guide.

" + "smithy.api#documentation": "

Deletes the specified inline policy that is embedded in the specified IAM\n user.

\n

A user can also have managed policies attached to it. To detach a managed policy from\n a user, use DetachUserPolicy. For more information about policies,\n refer to Managed policies and inline\n policies in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To remove a policy from an IAM user", + "documentation": "The following delete-user-policy command removes the specified policy from the IAM user named Juan:", + "input": { + "UserName": "Juan", + "PolicyName": "ExamplePolicy" + } + } + ] } }, "com.amazonaws.iam#DeleteUserPolicyRequest": { @@ -4619,7 +4893,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a virtual MFA device.

\n \n

You must deactivate a user's virtual MFA device before you can delete it. For\n information about deactivating MFA devices, see DeactivateMFADevice.

\n
" + "smithy.api#documentation": "

Deletes a virtual MFA device.

\n \n

You must deactivate a user's virtual MFA device before you can delete it. For\n information about deactivating MFA devices, see DeactivateMFADevice.

\n
", + "smithy.api#examples": [ + { + "title": "To remove a virtual MFA device", + "documentation": "The following delete-virtual-mfa-device command removes the specified MFA device from the current AWS account.", + "input": { + "SerialNumber": "arn:aws:iam::123456789012:mfa/ExampleName" + } + } + ] } }, "com.amazonaws.iam#DeleteVirtualMFADeviceRequest": { @@ -5243,7 +5526,19 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a report for service last accessed data for Organizations. You can generate a\n report for any entities (organization root, organizational unit, or account) or policies\n in your organization.

\n

To call this operation, you must be signed in using your Organizations management account\n credentials. You can use your long-term IAM user or root user credentials, or temporary\n credentials from assuming an IAM role. SCPs must be enabled for your organization\n root. You must have the required IAM and Organizations permissions. For more information, see\n Refining permissions using service last accessed data in the\n IAM User Guide.

\n

You can generate a service last accessed data report for entities by specifying only\n the entity's path. This data includes a list of services that are allowed by any service\n control policies (SCPs) that apply to the entity.

\n

You can generate a service last accessed data report for a policy by specifying an\n entity's path and an optional Organizations policy ID. This data includes a list of services that\n are allowed by the specified SCP.

\n

For each service in both report types, the data includes the most recent account\n activity that the policy allows to account principals in the entity or the entity's\n children. For important information about the data, reporting period, permissions\n required, troubleshooting, and supported Regions see Reducing permissions using\n service last accessed data in the\n IAM User Guide.

\n \n

The data includes all attempts to access Amazon Web Services, not just the successful ones. This\n includes all attempts that were made using the Amazon Web Services Management Console, the Amazon Web Services API through any\n of the SDKs, or any of the command line tools. An unexpected entry in the service\n last accessed data does not mean that an account has been compromised, because the\n request might have been denied. Refer to your CloudTrail logs as the authoritative\n source for information about all API calls and whether they were successful or\n denied access. For more information, see Logging IAM events with\n CloudTrail in the IAM User Guide.

\n
\n

This operation returns a JobId. Use this parameter in the \n GetOrganizationsAccessReport\n operation to check the status of\n the report generation. To check the status of this request, use the JobId\n parameter in the \n GetOrganizationsAccessReport\n operation\n and test the JobStatus response parameter. When the job is complete, you\n can retrieve the report.

\n

To generate a service last accessed data report for entities, specify an entity path\n without specifying the optional Organizations policy ID. The type of entity that you specify\n determines the data returned in the report.

\n
    \n
  • \n

    \n Root – When you specify the\n organizations root as the entity, the resulting report lists all of the services\n allowed by SCPs that are attached to your root. For each service, the report\n includes data for all accounts in your organization except the\n management account, because the management account is not limited by SCPs.

    \n
  • \n
  • \n

    \n OU – When you specify an\n organizational unit (OU) as the entity, the resulting report lists all of the\n services allowed by SCPs that are attached to the OU and its parents. For each\n service, the report includes data for all accounts in the OU or its children.\n This data excludes the management account, because the management account is not\n limited by SCPs.

    \n
  • \n
  • \n

    \n management account – When you specify the\n management account, the resulting report lists all Amazon Web Services services, because the\n management account is not limited by SCPs. For each service, the report includes\n data for only the management account.

    \n
  • \n
  • \n

    \n Account – When you specify another\n account as the entity, the resulting report lists all of the services allowed by\n SCPs that are attached to the account and its parents. For each service, the\n report includes data for only the specified account.

    \n
  • \n
\n

To generate a service last accessed data report for policies, specify an entity path\n and the optional Organizations policy ID. The type of entity that you specify determines the data\n returned for each service.

\n
    \n
  • \n

    \n Root – When you specify the root\n entity and a policy ID, the resulting report lists all of the services that are\n allowed by the specified SCP. For each service, the report includes data for all\n accounts in your organization to which the SCP applies. This data excludes the\n management account, because the management account is not limited by SCPs. If the\n SCP is not attached to any entities in the organization, then the report will\n return a list of services with no data.

    \n
  • \n
  • \n

    \n OU – When you specify an OU entity and\n a policy ID, the resulting report lists all of the services that are allowed by\n the specified SCP. For each service, the report includes data for all accounts\n in the OU or its children to which the SCP applies. This means that other\n accounts outside the OU that are affected by the SCP might not be included in\n the data. This data excludes the management account, because the\n management account is not limited by SCPs. If the SCP is not attached to the OU\n or one of its children, the report will return a list of services with no\n data.

    \n
  • \n
  • \n

    \n management account – When you specify the\n management account, the resulting report lists all Amazon Web Services services, because the\n management account is not limited by SCPs. If you specify a policy ID in the CLI\n or API, the policy is ignored. For each service, the report includes data for\n only the management account.

    \n
  • \n
  • \n

    \n Account – When you specify another\n account entity and a policy ID, the resulting report lists all of the services\n that are allowed by the specified SCP. For each service, the report includes\n data for only the specified account. This means that other accounts in the\n organization that are affected by the SCP might not be included in the data. If\n the SCP is not attached to the account, the report will return a list of\n services with no data.

    \n
  • \n
\n \n

Service last accessed data does not use other policy types when determining\n whether a principal could access a service. These other policy types include\n identity-based policies, resource-based policies, access control lists, IAM\n permissions boundaries, and STS assume role policies. It only applies SCP logic.\n For more about the evaluation of policy types, see Evaluating policies in the\n IAM User Guide.

\n
\n

For more information about service last accessed data, see Reducing policy scope by\n viewing user activity in the IAM User Guide.

" + "smithy.api#documentation": "

Generates a report for service last accessed data for Organizations. You can generate a\n report for any entities (organization root, organizational unit, or account) or policies\n in your organization.

\n

To call this operation, you must be signed in using your Organizations management account\n credentials. You can use your long-term IAM user or root user credentials, or temporary\n credentials from assuming an IAM role. SCPs must be enabled for your organization\n root. You must have the required IAM and Organizations permissions. For more information, see\n Refining permissions using service last accessed data in the\n IAM User Guide.

\n

You can generate a service last accessed data report for entities by specifying only\n the entity's path. This data includes a list of services that are allowed by any service\n control policies (SCPs) that apply to the entity.

\n

You can generate a service last accessed data report for a policy by specifying an\n entity's path and an optional Organizations policy ID. This data includes a list of services that\n are allowed by the specified SCP.

\n

For each service in both report types, the data includes the most recent account\n activity that the policy allows to account principals in the entity or the entity's\n children. For important information about the data, reporting period, permissions\n required, troubleshooting, and supported Regions see Reducing permissions using\n service last accessed data in the\n IAM User Guide.

\n \n

The data includes all attempts to access Amazon Web Services, not just the successful ones. This\n includes all attempts that were made using the Amazon Web Services Management Console, the Amazon Web Services API through any\n of the SDKs, or any of the command line tools. An unexpected entry in the service\n last accessed data does not mean that an account has been compromised, because the\n request might have been denied. Refer to your CloudTrail logs as the authoritative\n source for information about all API calls and whether they were successful or\n denied access. For more information, see Logging IAM events with\n CloudTrail in the IAM User Guide.

\n
\n

This operation returns a JobId. Use this parameter in the \n GetOrganizationsAccessReport\n operation to check the status of\n the report generation. To check the status of this request, use the JobId\n parameter in the \n GetOrganizationsAccessReport\n operation\n and test the JobStatus response parameter. When the job is complete, you\n can retrieve the report.

\n

To generate a service last accessed data report for entities, specify an entity path\n without specifying the optional Organizations policy ID. The type of entity that you specify\n determines the data returned in the report.

\n
    \n
  • \n

    \n Root – When you specify the\n organizations root as the entity, the resulting report lists all of the services\n allowed by SCPs that are attached to your root. For each service, the report\n includes data for all accounts in your organization except the\n management account, because the management account is not limited by SCPs.

    \n
  • \n
  • \n

    \n OU – When you specify an\n organizational unit (OU) as the entity, the resulting report lists all of the\n services allowed by SCPs that are attached to the OU and its parents. For each\n service, the report includes data for all accounts in the OU or its children.\n This data excludes the management account, because the management account is not\n limited by SCPs.

    \n
  • \n
  • \n

    \n management account – When you specify the\n management account, the resulting report lists all Amazon Web Services services, because the\n management account is not limited by SCPs. For each service, the report includes\n data for only the management account.

    \n
  • \n
  • \n

    \n Account – When you specify another\n account as the entity, the resulting report lists all of the services allowed by\n SCPs that are attached to the account and its parents. For each service, the\n report includes data for only the specified account.

    \n
  • \n
\n

To generate a service last accessed data report for policies, specify an entity path\n and the optional Organizations policy ID. The type of entity that you specify determines the data\n returned for each service.

\n
    \n
  • \n

    \n Root – When you specify the root\n entity and a policy ID, the resulting report lists all of the services that are\n allowed by the specified SCP. For each service, the report includes data for all\n accounts in your organization to which the SCP applies. This data excludes the\n management account, because the management account is not limited by SCPs. If the\n SCP is not attached to any entities in the organization, then the report will\n return a list of services with no data.

    \n
  • \n
  • \n

    \n OU – When you specify an OU entity and\n a policy ID, the resulting report lists all of the services that are allowed by\n the specified SCP. For each service, the report includes data for all accounts\n in the OU or its children to which the SCP applies. This means that other\n accounts outside the OU that are affected by the SCP might not be included in\n the data. This data excludes the management account, because the\n management account is not limited by SCPs. If the SCP is not attached to the OU\n or one of its children, the report will return a list of services with no\n data.

    \n
  • \n
  • \n

    \n management account – When you specify the\n management account, the resulting report lists all Amazon Web Services services, because the\n management account is not limited by SCPs. If you specify a policy ID in the CLI\n or API, the policy is ignored. For each service, the report includes data for\n only the management account.

    \n
  • \n
  • \n

    \n Account – When you specify another\n account entity and a policy ID, the resulting report lists all of the services\n that are allowed by the specified SCP. For each service, the report includes\n data for only the specified account. This means that other accounts in the\n organization that are affected by the SCP might not be included in the data. If\n the SCP is not attached to the account, the report will return a list of\n services with no data.

    \n
  • \n
\n \n

Service last accessed data does not use other policy types when determining\n whether a principal could access a service. These other policy types include\n identity-based policies, resource-based policies, access control lists, IAM\n permissions boundaries, and STS assume role policies. It only applies SCP logic.\n For more about the evaluation of policy types, see Evaluating policies in the\n IAM User Guide.

\n
\n

For more information about service last accessed data, see Reducing policy scope by\n viewing user activity in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To generate a service last accessed data report for an organizational unit", + "documentation": "The following operation generates a report for the organizational unit ou-rge0-awexample", + "input": { + "EntityPath": "o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-1a2b3c-k9l8m7n6o5example" + }, + "output": { + "JobId": "examplea-1234-b567-cde8-90fg123abcd4" + } + } + ] } }, "com.amazonaws.iam#GenerateOrganizationsAccessReportRequest": { @@ -5298,7 +5593,19 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a report that includes details about when an IAM resource (user, group,\n role, or policy) was last used in an attempt to access Amazon Web Services services. Recent activity\n usually appears within four hours. IAM reports activity for at least the last 400\n days, or less if your Region began supporting this feature within the last year. For\n more information, see Regions where data is tracked.

\n \n

The service last accessed data includes all attempts to access an Amazon Web Services API, not\n just the successful ones. This includes all attempts that were made using the\n Amazon Web Services Management Console, the Amazon Web Services API through any of the SDKs, or any of the command line tools.\n An unexpected entry in the service last accessed data does not mean that your\n account has been compromised, because the request might have been denied. Refer to\n your CloudTrail logs as the authoritative source for information about all API calls\n and whether they were successful or denied access. For more information, see Logging\n IAM events with CloudTrail in the\n IAM User Guide.

\n
\n

The GenerateServiceLastAccessedDetails operation returns a\n JobId. Use this parameter in the following operations to retrieve the\n following details from your report:

\n
    \n
  • \n

    \n GetServiceLastAccessedDetails – Use this operation\n for users, groups, roles, or policies to list every Amazon Web Services service that the\n resource could access using permissions policies. For each service, the response\n includes information about the most recent access attempt.

    \n

    The JobId returned by\n GenerateServiceLastAccessedDetail must be used by the same role\n within a session, or by the same user when used to call\n GetServiceLastAccessedDetail.

    \n
  • \n
  • \n

    \n GetServiceLastAccessedDetailsWithEntities – Use this\n operation for groups and policies to list information about the associated\n entities (users or roles) that attempted to access a specific Amazon Web Services service.\n

    \n
  • \n
\n

To check the status of the GenerateServiceLastAccessedDetails request,\n use the JobId parameter in the same operations and test the\n JobStatus response parameter.

\n

For additional information about the permissions policies that allow an identity\n (user, group, or role) to access specific services, use the ListPoliciesGrantingServiceAccess operation.

\n \n

Service last accessed data does not use other policy types when determining\n whether a resource could access a service. These other policy types include\n resource-based policies, access control lists, Organizations policies, IAM permissions\n boundaries, and STS assume role policies. It only applies permissions policy\n logic. For more about the evaluation of policy types, see Evaluating policies in the\n IAM User Guide.

\n
\n

For more information about service and action last accessed data, see Reducing permissions using service last accessed data in the\n IAM User Guide.

" + "smithy.api#documentation": "

Generates a report that includes details about when an IAM resource (user, group,\n role, or policy) was last used in an attempt to access Amazon Web Services services. Recent activity\n usually appears within four hours. IAM reports activity for at least the last 400\n days, or less if your Region began supporting this feature within the last year. For\n more information, see Regions where data is tracked.

\n \n

The service last accessed data includes all attempts to access an Amazon Web Services API, not\n just the successful ones. This includes all attempts that were made using the\n Amazon Web Services Management Console, the Amazon Web Services API through any of the SDKs, or any of the command line tools.\n An unexpected entry in the service last accessed data does not mean that your\n account has been compromised, because the request might have been denied. Refer to\n your CloudTrail logs as the authoritative source for information about all API calls\n and whether they were successful or denied access. For more information, see Logging\n IAM events with CloudTrail in the\n IAM User Guide.

\n
\n

The GenerateServiceLastAccessedDetails operation returns a\n JobId. Use this parameter in the following operations to retrieve the\n following details from your report:

\n
    \n
  • \n

    \n GetServiceLastAccessedDetails – Use this operation\n for users, groups, roles, or policies to list every Amazon Web Services service that the\n resource could access using permissions policies. For each service, the response\n includes information about the most recent access attempt.

    \n

    The JobId returned by\n GenerateServiceLastAccessedDetail must be used by the same role\n within a session, or by the same user when used to call\n GetServiceLastAccessedDetail.

    \n
  • \n
  • \n

    \n GetServiceLastAccessedDetailsWithEntities – Use this\n operation for groups and policies to list information about the associated\n entities (users or roles) that attempted to access a specific Amazon Web Services service.\n

    \n
  • \n
\n

To check the status of the GenerateServiceLastAccessedDetails request,\n use the JobId parameter in the same operations and test the\n JobStatus response parameter.

\n

For additional information about the permissions policies that allow an identity\n (user, group, or role) to access specific services, use the ListPoliciesGrantingServiceAccess operation.

\n \n

Service last accessed data does not use other policy types when determining\n whether a resource could access a service. These other policy types include\n resource-based policies, access control lists, Organizations policies, IAM permissions\n boundaries, and STS assume role policies. It only applies permissions policy\n logic. For more about the evaluation of policy types, see Evaluating policies in the\n IAM User Guide.

\n
\n

For more information about service and action last accessed data, see Reducing permissions using service last accessed data in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To generate a service last accessed data report for a policy", + "documentation": "The following operation generates a report for the policy: ExamplePolicy1", + "input": { + "Arn": "arn:aws:iam::123456789012:policy/ExamplePolicy1" + }, + "output": { + "JobId": "examplef-1305-c245-eba4-71fe298bcda7" + } + } + ] } }, "com.amazonaws.iam#GenerateServiceLastAccessedDetailsRequest": { @@ -5500,7 +5807,27 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the password policy for the Amazon Web Services account. This tells you the complexity\n requirements and mandatory rotation periods for the IAM user passwords in your account.\n For more information about using a password policy, see Managing an IAM password\n policy.

" + "smithy.api#documentation": "

Retrieves the password policy for the Amazon Web Services account. This tells you the complexity\n requirements and mandatory rotation periods for the IAM user passwords in your account.\n For more information about using a password policy, see Managing an IAM password\n policy.

", + "smithy.api#examples": [ + { + "title": "To see the current account password policy", + "documentation": "The following command displays details about the password policy for the current AWS account.", + "output": { + "PasswordPolicy": { + "AllowUsersToChangePassword": false, + "RequireNumbers": true, + "RequireLowercaseCharacters": false, + "RequireUppercaseCharacters": false, + "MinimumPasswordLength": 8, + "RequireSymbols": true, + "ExpirePasswords": false, + "PasswordReusePrevention": 12, + "MaxPasswordAge": 90, + "HardExpiry": false + } + } + } + ] } }, "com.amazonaws.iam#GetAccountPasswordPolicyResponse": { @@ -5533,7 +5860,43 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves information about IAM entity usage and IAM quotas in the Amazon Web Services\n account.

\n

For information about IAM quotas, see IAM and STS quotas in the\n IAM User Guide.

" + "smithy.api#documentation": "

Retrieves information about IAM entity usage and IAM quotas in the Amazon Web Services\n account.

\n

For information about IAM quotas, see IAM and STS quotas in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To get information about IAM entity quotas and usage in the current account", + "documentation": "The following command returns information about the IAM entity quotas and usage in the current AWS account.", + "output": { + "SummaryMap": { + "Users": 27, + "UsersQuota": 5000, + "Groups": 15, + "GroupsQuota": 100, + "Policies": 8, + "PoliciesQuota": 1000, + "PolicySizeQuota": 5120, + "PolicyVersionsInUse": 22, + "PolicyVersionsInUseQuota": 10000, + "VersionsPerPolicyQuota": 5, + "ServerCertificates": 1, + "ServerCertificatesQuota": 20, + "UserPolicySizeQuota": 2048, + "GroupPolicySizeQuota": 5120, + "GroupsPerUserQuota": 10, + "GlobalEndpointTokenVersion": 2, + "SigningCertificatesPerUserQuota": 2, + "AccessKeysPerUserQuota": 2, + "MFADevices": 6, + "MFADevicesInUse": 3, + "AccountMFAEnabled": 0, + "AccountAccessKeysPresent": 1, + "AccountSigningCertificatesPresent": 0, + "AttachedPoliciesPerGroupQuota": 10, + "AttachedPoliciesPerRoleQuota": 10, + "AttachedPoliciesPerUserQuota": 10 + } + } + } + ] } }, "com.amazonaws.iam#GetAccountSummaryResponse": { @@ -5870,6 +6233,34 @@ ], "traits": { "smithy.api#documentation": "

Retrieves information about the specified instance profile, including the instance\n profile's path, GUID, ARN, and role. For more information about instance profiles, see\n Using\n instance profiles in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To get information about an instance profile", + "documentation": "The following command gets information about the instance profile named ExampleInstanceProfile.", + "input": { + "InstanceProfileName": "ExampleInstanceProfile" + }, + "output": { + "InstanceProfile": { + "InstanceProfileId": "AID2MAB8DPLSRHEXAMPLE", + "Roles": [ + { + "AssumeRolePolicyDocument": "", + "RoleId": "AIDGPMS9RO4H3FEXAMPLE", + "CreateDate": "2013-01-09T06:33:26Z", + "Path": "/", + "RoleName": "Test-Role", + "Arn": "arn:aws:iam::336924118301:role/Test-Role" + } + ], + "CreateDate": "2013-06-12T23:52:02Z", + "InstanceProfileName": "ExampleInstanceProfile", + "Path": "/", + "Arn": "arn:aws:iam::336924118301:instance-profile/ExampleInstanceProfile" + } + } + } + ], "smithy.waiters#waitable": { "InstanceProfileExists": { "acceptors": [ @@ -5939,7 +6330,22 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the user name for the specified IAM user. A login profile is created when\n you create a password for the user to access the Amazon Web Services Management Console. If the user does not exist\n or does not have a password, the operation returns a 404 (NoSuchEntity)\n error.

\n

If you create an IAM user with access to the console, the CreateDate\n reflects the date you created the initial password for the user.

\n

If you create an IAM user with programmatic access, and then later add a password\n for the user to access the Amazon Web Services Management Console, the CreateDate reflects the initial\n password creation date. A user with programmatic access does not have a login profile\n unless you create a password for the user to access the Amazon Web Services Management Console.

" + "smithy.api#documentation": "

Retrieves the user name for the specified IAM user. A login profile is created when\n you create a password for the user to access the Amazon Web Services Management Console. If the user does not exist\n or does not have a password, the operation returns a 404 (NoSuchEntity)\n error.

\n

If you create an IAM user with access to the console, the CreateDate\n reflects the date you created the initial password for the user.

\n

If you create an IAM user with programmatic access, and then later add a password\n for the user to access the Amazon Web Services Management Console, the CreateDate reflects the initial\n password creation date. A user with programmatic access does not have a login profile\n unless you create a password for the user to access the Amazon Web Services Management Console.

", + "smithy.api#examples": [ + { + "title": "To get password information for an IAM user", + "documentation": "The following command gets information about the password for the IAM user named Anika.", + "input": { + "UserName": "Anika" + }, + "output": { + "LoginProfile": { + "UserName": "Anika", + "CreateDate": "2012-09-21T23:03:39Z" + } + } + } + ] } }, "com.amazonaws.iam#GetLoginProfileRequest": { @@ -6138,7 +6544,47 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the service last accessed data report for Organizations that was previously\n generated using the \n GenerateOrganizationsAccessReport\n \n operation. This operation retrieves the status of your report job and the report\n contents.

\n

Depending on the parameters that you passed when you generated the report, the data\n returned could include different information. For details, see GenerateOrganizationsAccessReport.

\n

To call this operation, you must be signed in to the management account in your\n organization. SCPs must be enabled for your organization root. You must have permissions\n to perform this operation. For more information, see Refining permissions using\n service last accessed data in the\n IAM User Guide.

\n

For each service that principals in an account (root user, IAM users, or IAM roles)\n could access using SCPs, the operation returns details about the most recent access\n attempt. If there was no attempt, the service is listed without details about the most\n recent attempt to access the service. If the operation fails, it returns the reason that\n it failed.

\n

By default, the list is sorted by service namespace.

" + "smithy.api#documentation": "

Retrieves the service last accessed data report for Organizations that was previously\n generated using the \n GenerateOrganizationsAccessReport\n \n operation. This operation retrieves the status of your report job and the report\n contents.

\n

Depending on the parameters that you passed when you generated the report, the data\n returned could include different information. For details, see GenerateOrganizationsAccessReport.

\n

To call this operation, you must be signed in to the management account in your\n organization. SCPs must be enabled for your organization root. You must have permissions\n to perform this operation. For more information, see Refining permissions using\n service last accessed data in the\n IAM User Guide.

\n

For each service that principals in an account (root user, IAM users, or IAM roles)\n could access using SCPs, the operation returns details about the most recent access\n attempt. If there was no attempt, the service is listed without details about the most\n recent attempt to access the service. If the operation fails, it returns the reason that\n it failed.

\n

By default, the list is sorted by service namespace.

", + "smithy.api#examples": [ + { + "title": "To get details from a previously generated organizational unit report", + "documentation": "The following operation gets details about the report with the job ID: examplea-1234-b567-cde8-90fg123abcd4", + "input": { + "JobId": "examplea-1234-b567-cde8-90fg123abcd4" + }, + "output": { + "IsTruncated": false, + "JobCompletionDate": "2019-06-18T19:47:35.241Z", + "JobCreationDate": "2019-06-18T19:47:31.466Z", + "JobStatus": "COMPLETED", + "NumberOfServicesAccessible": 3, + "NumberOfServicesNotAccessed": 1, + "AccessDetails": [ + { + "EntityPath": "o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-1a2b3c-k9l8m7n6o5example/111122223333", + "LastAuthenticatedTime": "2019-05-25T16:29:52Z", + "Region": "us-east-1", + "ServiceName": "Amazon DynamoDB", + "ServiceNamespace": "dynamodb", + "TotalAuthenticatedEntities": 2 + }, + { + "EntityPath": "o-a1b2c3d4e5/r-f6g7h8i9j0example/ou-1a2b3c-k9l8m7n6o5example/123456789012", + "LastAuthenticatedTime": "2019-06-15T13:12:06Z", + "Region": "us-east-1", + "ServiceName": "AWS Identity and Access Management", + "ServiceNamespace": "iam", + "TotalAuthenticatedEntities": 4 + }, + { + "ServiceName": "Amazon Simple Storage Service", + "ServiceNamespace": "s3", + "TotalAuthenticatedEntities": 0 + } + ] + } + } + ] } }, "com.amazonaws.iam#GetOrganizationsAccessReportRequest": { @@ -6389,6 +6835,30 @@ ], "traits": { "smithy.api#documentation": "

Retrieves information about the specified role, including the role's path, GUID, ARN,\n and the role's trust policy that grants permission to assume the role. For more\n information about roles, see IAM roles in the\n IAM User Guide.

\n \n

Policies returned by this operation are URL-encoded compliant \n with RFC 3986. You can use a URL \n decoding method to convert the policy back to plain JSON text. For example, if you use Java, you \n can use the decode method of the java.net.URLDecoder utility class in \n the Java SDK. Other languages and SDKs provide similar functionality.

\n
", + "smithy.api#examples": [ + { + "title": "To get information about an IAM role", + "documentation": "The following command gets information about the role named Test-Role.", + "input": { + "RoleName": "Test-Role" + }, + "output": { + "Role": { + "Arn": "arn:aws:iam::123456789012:role/Test-Role", + "AssumeRolePolicyDocument": "", + "CreateDate": "2013-04-18T05:01:58Z", + "MaxSessionDuration": 3600, + "Path": "/", + "RoleId": "AROADBQP57FF2AEXAMPLE", + "RoleLastUsed": { + "LastUsedDate": "2019-11-18T05:01:58Z", + "Region": "us-east-1" + }, + "RoleName": "Test-Role" + } + } + } + ], "smithy.api#suppress": [ "WaitableTraitInvalidErrorType" ], @@ -6719,7 +7189,36 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a service last accessed report that was created using the\n GenerateServiceLastAccessedDetails operation. You can use the\n JobId parameter in GetServiceLastAccessedDetails to\n retrieve the status of your report job. When the report is complete, you can retrieve\n the generated report. The report includes a list of Amazon Web Services services that the resource\n (user, group, role, or managed policy) can access.

\n \n

Service last accessed data does not use other policy types when determining\n whether a resource could access a service. These other policy types include\n resource-based policies, access control lists, Organizations policies, IAM permissions\n boundaries, and STS assume role policies. It only applies permissions policy\n logic. For more about the evaluation of policy types, see Evaluating policies in the\n IAM User Guide.

\n
\n

For each service that the resource could access using permissions policies, the\n operation returns details about the most recent access attempt. If there was no attempt,\n the service is listed without details about the most recent attempt to access the\n service. If the operation fails, the GetServiceLastAccessedDetails\n operation returns the reason that it failed.

\n

The GetServiceLastAccessedDetails operation returns a list of services.\n This list includes the number of entities that have attempted to access the service and\n the date and time of the last attempt. It also returns the ARN of the following entity,\n depending on the resource ARN that you used to generate the report:

\n
    \n
  • \n

    \n User – Returns the user ARN that you\n used to generate the report

    \n
  • \n
  • \n

    \n Group – Returns the ARN of the group\n member (user) that last attempted to access the service

    \n
  • \n
  • \n

    \n Role – Returns the role ARN that you\n used to generate the report

    \n
  • \n
  • \n

    \n Policy – Returns the ARN of the user\n or role that last used the policy to attempt to access the service

    \n
  • \n
\n

By default, the list is sorted by service namespace.

\n

If you specified ACTION_LEVEL granularity when you generated the report,\n this operation returns service and action last accessed data. This includes the most\n recent access attempt for each tracked action within a service. Otherwise, this\n operation returns only service data.

\n

For more information about service and action last accessed data, see Reducing permissions using service last accessed data in the\n IAM User Guide.

" + "smithy.api#documentation": "

Retrieves a service last accessed report that was created using the\n GenerateServiceLastAccessedDetails operation. You can use the\n JobId parameter in GetServiceLastAccessedDetails to\n retrieve the status of your report job. When the report is complete, you can retrieve\n the generated report. The report includes a list of Amazon Web Services services that the resource\n (user, group, role, or managed policy) can access.

\n \n

Service last accessed data does not use other policy types when determining\n whether a resource could access a service. These other policy types include\n resource-based policies, access control lists, Organizations policies, IAM permissions\n boundaries, and STS assume role policies. It only applies permissions policy\n logic. For more about the evaluation of policy types, see Evaluating policies in the\n IAM User Guide.

\n
\n

For each service that the resource could access using permissions policies, the\n operation returns details about the most recent access attempt. If there was no attempt,\n the service is listed without details about the most recent attempt to access the\n service. If the operation fails, the GetServiceLastAccessedDetails\n operation returns the reason that it failed.

\n

The GetServiceLastAccessedDetails operation returns a list of services.\n This list includes the number of entities that have attempted to access the service and\n the date and time of the last attempt. It also returns the ARN of the following entity,\n depending on the resource ARN that you used to generate the report:

\n
    \n
  • \n

    \n User – Returns the user ARN that you\n used to generate the report

    \n
  • \n
  • \n

    \n Group – Returns the ARN of the group\n member (user) that last attempted to access the service

    \n
  • \n
  • \n

    \n Role – Returns the role ARN that you\n used to generate the report

    \n
  • \n
  • \n

    \n Policy – Returns the ARN of the user\n or role that last used the policy to attempt to access the service

    \n
  • \n
\n

By default, the list is sorted by service namespace.

\n

If you specified ACTION_LEVEL granularity when you generated the report,\n this operation returns service and action last accessed data. This includes the most\n recent access attempt for each tracked action within a service. Otherwise, this\n operation returns only service data.

\n

For more information about service and action last accessed data, see Reducing permissions using service last accessed data in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To get details from a previously-generated report", + "documentation": "The following operation gets details about the report with the job ID: examplef-1305-c245-eba4-71fe298bcda7", + "input": { + "JobId": "examplef-1305-c245-eba4-71fe298bcda7" + }, + "output": { + "JobStatus": "COMPLETED", + "JobCreationDate": "2018-10-24T19:47:31.466Z", + "ServicesLastAccessed": [ + { + "TotalAuthenticatedEntities": 2, + "LastAuthenticated": "2018-10-24T19:11:00Z", + "ServiceNamespace": "iam", + "LastAuthenticatedEntity": "arn:aws:iam::123456789012:user/AWSExampleUser01", + "ServiceName": "AWS Identity and Access Management" + }, + { + "TotalAuthenticatedEntities": 0, + "ServiceNamespace": "s3", + "ServiceName": "Amazon Simple Storage Service" + } + ], + "JobCompletionDate": "2018-10-24T19:47:35.241Z", + "IsTruncated": false + } + } + ] } }, "com.amazonaws.iam#GetServiceLastAccessedDetailsRequest": { @@ -6827,7 +7326,44 @@ } ], "traits": { - "smithy.api#documentation": "

After you generate a group or policy report using the\n GenerateServiceLastAccessedDetails operation, you can use the\n JobId parameter in\n GetServiceLastAccessedDetailsWithEntities. This operation retrieves the\n status of your report job and a list of entities that could have used group or policy\n permissions to access the specified service.

\n
    \n
  • \n

    \n Group – For a group report, this\n operation returns a list of users in the group that could have used the group’s\n policies in an attempt to access the service.

    \n
  • \n
  • \n

    \n Policy – For a policy report, this\n operation returns a list of entities (users or roles) that could have used the\n policy in an attempt to access the service.

    \n
  • \n
\n

You can also use this operation for user or role reports to retrieve details about\n those entities.

\n

If the operation fails, the GetServiceLastAccessedDetailsWithEntities\n operation returns the reason that it failed.

\n

By default, the list of associated entities is sorted by date, with the most recent\n access listed first.

" + "smithy.api#documentation": "

After you generate a group or policy report using the\n GenerateServiceLastAccessedDetails operation, you can use the\n JobId parameter in\n GetServiceLastAccessedDetailsWithEntities. This operation retrieves the\n status of your report job and a list of entities that could have used group or policy\n permissions to access the specified service.

\n
    \n
  • \n

    \n Group – For a group report, this\n operation returns a list of users in the group that could have used the group’s\n policies in an attempt to access the service.

    \n
  • \n
  • \n

    \n Policy – For a policy report, this\n operation returns a list of entities (users or roles) that could have used the\n policy in an attempt to access the service.

    \n
  • \n
\n

You can also use this operation for user or role reports to retrieve details about\n those entities.

\n

If the operation fails, the GetServiceLastAccessedDetailsWithEntities\n operation returns the reason that it failed.

\n

By default, the list of associated entities is sorted by date, with the most recent\n access listed first.

", + "smithy.api#examples": [ + { + "title": "To get sntity details from a previously-generated report", + "documentation": "The following operation returns details about the entities that attempted to access the IAM service.", + "input": { + "JobId": "examplef-1305-c245-eba4-71fe298bcda7", + "ServiceNamespace": "iam" + }, + "output": { + "JobStatus": "COMPLETED", + "JobCreationDate": "2018-10-24T19:47:31.466Z", + "JobCompletionDate": "2018-10-24T19:47:35.241Z", + "EntityDetailsList": [ + { + "EntityInfo": { + "Id": "AIDAEX2EXAMPLEB6IGCDC", + "Name": "AWSExampleUser01", + "Type": "USER", + "Path": "/", + "Arn": "arn:aws:iam::123456789012:user/AWSExampleUser01" + }, + "LastAuthenticated": "2018-10-24T19:10:00Z" + }, + { + "EntityInfo": { + "Id": "AROAEAEXAMPLEIANXSIU4", + "Name": "AWSExampleRole01", + "Type": "ROLE", + "Path": "/", + "Arn": "arn:aws:iam::123456789012:role/AWSExampleRole01" + } + } + ], + "IsTruncated": false + } + } + ] } }, "com.amazonaws.iam#GetServiceLastAccessedDetailsWithEntitiesRequest": { @@ -6996,6 +7532,24 @@ ], "traits": { "smithy.api#documentation": "

Retrieves information about the specified IAM user, including the user's creation\n date, path, unique ID, and ARN.

\n

If you do not specify a user name, IAM determines the user name implicitly based on\n the Amazon Web Services access key ID used to sign the request to this operation.

", + "smithy.api#examples": [ + { + "title": "To get information about an IAM user", + "documentation": "The following command gets information about the IAM user named Bob.", + "input": { + "UserName": "Bob" + }, + "output": { + "User": { + "UserName": "Bob", + "Path": "/", + "CreateDate": "2012-09-21T23:03:13Z", + "UserId": "AKIAIOSFODNN7EXAMPLE", + "Arn": "arn:aws:iam::123456789012:user/Bob" + } + } + } + ], "smithy.api#suppress": [ "WaitableTraitInvalidErrorType" ], @@ -7411,6 +7965,31 @@ ], "traits": { "smithy.api#documentation": "

Returns information about the access key IDs associated with the specified IAM user.\n If there is none, the operation returns an empty list.

\n

Although each user is limited to a small number of keys, you can still paginate the\n results using the MaxItems and Marker parameters.

\n

If the UserName is not specified, the user name is determined implicitly\n based on the Amazon Web Services access key ID used to sign the request. If a temporary access key is\n used, then UserName is required. If a long-term key is assigned to the\n user, then UserName is not required. This operation works for access keys\n under the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root user\n credentials even if the Amazon Web Services account has no associated users.

\n \n

To ensure the security of your Amazon Web Services account, the secret access key is accessible\n only during key and user creation.

\n
", + "smithy.api#examples": [ + { + "title": "To list the access key IDs for an IAM user", + "documentation": "The following command lists the access keys IDs for the IAM user named Alice.", + "input": { + "UserName": "Alice" + }, + "output": { + "AccessKeyMetadata": [ + { + "UserName": "Alice", + "Status": "Active", + "CreateDate": "2016-12-01T22:19:58Z", + "AccessKeyId": "AKIA111111111EXAMPLE" + }, + { + "UserName": "Alice", + "Status": "Active", + "CreateDate": "2016-12-01T22:20:01Z", + "AccessKeyId": "AKIA222222222EXAMPLE" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -7489,6 +8068,17 @@ ], "traits": { "smithy.api#documentation": "

Lists the account alias associated with the Amazon Web Services account (Note: you can have only\n one). For information about using an Amazon Web Services account alias, see Creating,\n deleting, and listing an Amazon Web Services account alias in the Amazon Web Services Sign-In\n User Guide.

", + "smithy.api#examples": [ + { + "title": "To list account aliases", + "documentation": "The following command lists the aliases for the current account.", + "output": { + "AccountAliases": [ + "exmaple-corporation" + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -7947,6 +8537,21 @@ ], "traits": { "smithy.api#documentation": "

Lists the names of the inline policies that are embedded in the specified IAM\n group.

\n

An IAM group can also have managed policies attached to it. To list the managed\n policies that are attached to a group, use ListAttachedGroupPolicies.\n For more information about policies, see Managed policies and inline\n policies in the IAM User Guide.

\n

You can paginate the results using the MaxItems and Marker\n parameters. If there are no inline policies embedded with the specified group, the\n operation returns an empty list.

", + "smithy.api#examples": [ + { + "title": "To list the in-line policies for an IAM group", + "documentation": "The following command lists the names of in-line policies that are embedded in the IAM group named Admins.", + "input": { + "GroupName": "Admins" + }, + "output": { + "PolicyNames": [ + "AdminRoot", + "KeyPolicy" + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -8026,6 +8631,37 @@ ], "traits": { "smithy.api#documentation": "

Lists the IAM groups that have the specified path prefix.

\n

You can paginate the results using the MaxItems and Marker\n parameters.

", + "smithy.api#examples": [ + { + "title": "To list the IAM groups for the current account", + "documentation": "The following command lists the IAM groups in the current account:", + "output": { + "Groups": [ + { + "Path": "/division_abc/subdivision_xyz/", + "GroupName": "Admins", + "CreateDate": "2016-12-15T21:40:08.121Z", + "GroupId": "AGPA1111111111EXAMPLE", + "Arn": "arn:aws:iam::123456789012:group/Admins" + }, + { + "Path": "/division_abc/subdivision_xyz/product_1234/engineering/", + "GroupName": "Test", + "CreateDate": "2016-11-30T14:10:01.156Z", + "GroupId": "AGP22222222222EXAMPLE", + "Arn": "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/engineering/Test" + }, + { + "Path": "/division_abc/subdivision_xyz/product_1234/", + "GroupName": "Managers", + "CreateDate": "2016-06-12T20:14:52.032Z", + "GroupId": "AGPI3333333333EXAMPLE", + "Arn": "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/Managers" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -8052,6 +8688,33 @@ ], "traits": { "smithy.api#documentation": "

Lists the IAM groups that the specified IAM user belongs to.

\n

You can paginate the results using the MaxItems and Marker\n parameters.

", + "smithy.api#examples": [ + { + "title": "To list the groups that an IAM user belongs to", + "documentation": "The following command displays the groups that the IAM user named Bob belongs to.", + "input": { + "UserName": "Bob" + }, + "output": { + "Groups": [ + { + "Path": "/division_abc/subdivision_xyz/product_1234/engineering/", + "GroupName": "Test", + "CreateDate": "2016-11-30T14:10:01.156Z", + "GroupId": "AGP2111111111EXAMPLE", + "Arn": "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/engineering/Test" + }, + { + "Path": "/division_abc/subdivision_xyz/product_1234/", + "GroupName": "Managers", + "CreateDate": "2016-06-12T20:14:52.032Z", + "GroupId": "AGPI222222222SEXAMPLE", + "Arn": "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/Managers" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -8740,7 +9403,51 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a list of policies that the IAM identity (user, group, or role) can use to\n access each specified service.

\n \n

This operation does not use other policy types when determining whether a resource\n could access a service. These other policy types include resource-based policies,\n access control lists, Organizations policies, IAM permissions boundaries, and STS\n assume role policies. It only applies permissions policy logic. For more about the\n evaluation of policy types, see Evaluating policies in the\n IAM User Guide.

\n
\n

The list of policies returned by the operation depends on the ARN of the identity that\n you provide.

\n
    \n
  • \n

    \n User – The list of policies includes\n the managed and inline policies that are attached to the user directly. The list\n also includes any additional managed and inline policies that are attached to\n the group to which the user belongs.

    \n
  • \n
  • \n

    \n Group – The list of policies includes\n only the managed and inline policies that are attached to the group directly.\n Policies that are attached to the group’s user are not included.

    \n
  • \n
  • \n

    \n Role – The list of policies includes\n only the managed and inline policies that are attached to the role.

    \n
  • \n
\n

For each managed policy, this operation returns the ARN and policy name. For each\n inline policy, it returns the policy name and the entity to which it is attached. Inline\n policies do not have an ARN. For more information about these policy types, see Managed policies and inline policies in the\n IAM User Guide.

\n

Policies that are attached to users and roles as permissions boundaries are not\n returned. To view which managed policy is currently used to set the permissions boundary\n for a user or role, use the GetUser or GetRole\n operations.

" + "smithy.api#documentation": "

Retrieves a list of policies that the IAM identity (user, group, or role) can use to\n access each specified service.

\n \n

This operation does not use other policy types when determining whether a resource\n could access a service. These other policy types include resource-based policies,\n access control lists, Organizations policies, IAM permissions boundaries, and STS\n assume role policies. It only applies permissions policy logic. For more about the\n evaluation of policy types, see Evaluating policies in the\n IAM User Guide.

\n
\n

The list of policies returned by the operation depends on the ARN of the identity that\n you provide.

\n
    \n
  • \n

    \n User – The list of policies includes\n the managed and inline policies that are attached to the user directly. The list\n also includes any additional managed and inline policies that are attached to\n the group to which the user belongs.

    \n
  • \n
  • \n

    \n Group – The list of policies includes\n only the managed and inline policies that are attached to the group directly.\n Policies that are attached to the group’s user are not included.

    \n
  • \n
  • \n

    \n Role – The list of policies includes\n only the managed and inline policies that are attached to the role.

    \n
  • \n
\n

For each managed policy, this operation returns the ARN and policy name. For each\n inline policy, it returns the policy name and the entity to which it is attached. Inline\n policies do not have an ARN. For more information about these policy types, see Managed policies and inline policies in the\n IAM User Guide.

\n

Policies that are attached to users and roles as permissions boundaries are not\n returned. To view which managed policy is currently used to set the permissions boundary\n for a user or role, use the GetUser or GetRole\n operations.

", + "smithy.api#examples": [ + { + "title": "To list policies that allow access to a service", + "documentation": "The following operation lists policies that allow ExampleUser01 to access IAM or EC2.", + "input": { + "Arn": "arn:aws:iam::123456789012:user/ExampleUser01", + "ServiceNamespaces": [ + "iam", + "ec2" + ] + }, + "output": { + "IsTruncated": false, + "PoliciesGrantingServiceAccess": [ + { + "Policies": [ + { + "PolicyArn": "arn:aws:iam::123456789012:policy/ExampleIamPolicy", + "PolicyType": "MANAGED", + "PolicyName": "ExampleIamPolicy" + }, + { + "EntityName": "AWSExampleGroup1", + "EntityType": "GROUP", + "PolicyType": "INLINE", + "PolicyName": "ExampleGroup1Policy" + } + ], + "ServiceNamespace": "iam" + }, + { + "Policies": [ + { + "PolicyArn": "arn:aws:iam::123456789012:policy/ExampleEc2Policy", + "PolicyType": "MANAGED", + "PolicyName": "ExampleEc2Policy" + } + ], + "ServiceNamespace": "ec2" + } + ] + } + } + ] } }, "com.amazonaws.iam#ListPoliciesGrantingServiceAccessEntry": { @@ -9160,6 +9867,28 @@ ], "traits": { "smithy.api#documentation": "

Lists the tags that are attached to the specified role. The returned list of tags is\n sorted by tag key. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To list the tags attached to an IAM role", + "documentation": "The following example shows how to list the tags attached to a role.", + "input": { + "RoleName": "taggedrole1" + }, + "output": { + "Tags": [ + { + "Key": "Dept", + "Value": "12345" + }, + { + "Key": "Team", + "Value": "Accounting" + } + ], + "IsTruncated": false + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -9732,6 +10461,26 @@ ], "traits": { "smithy.api#documentation": "

Returns information about the signing certificates associated with the specified IAM\n user. If none exists, the operation returns an empty list.

\n

Although each user is limited to a small number of signing certificates, you can still\n paginate the results using the MaxItems and Marker\n parameters.

\n

If the UserName field is not specified, the user name is determined\n implicitly based on the Amazon Web Services access key ID used to sign the request for this operation.\n This operation works for access keys under the Amazon Web Services account. Consequently, you can use\n this operation to manage Amazon Web Services account root user credentials even if the Amazon Web Services account has no\n associated users.

", + "smithy.api#examples": [ + { + "title": "To list the signing certificates for an IAM user", + "documentation": "The following command lists the signing certificates for the IAM user named Bob.", + "input": { + "UserName": "Bob" + }, + "output": { + "Certificates": [ + { + "UserName": "Bob", + "Status": "Active", + "CertificateBody": "-----BEGIN CERTIFICATE----------END CERTIFICATE-----", + "CertificateId": "TA7SMP42TDN5Z26OBPJE7EXAMPLE", + "UploadDate": "2013-06-06T21:40:08Z" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -9895,6 +10644,28 @@ ], "traits": { "smithy.api#documentation": "

Lists the tags that are attached to the specified IAM user. The returned list of tags is sorted by tag key. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To list the tags attached to an IAM user", + "documentation": "The following example shows how to list the tags attached to a user.", + "input": { + "UserName": "anika" + }, + "output": { + "Tags": [ + { + "Key": "Dept", + "Value": "12345" + }, + { + "Key": "Team", + "Value": "Accounting" + } + ], + "IsTruncated": false + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -9973,6 +10744,32 @@ ], "traits": { "smithy.api#documentation": "

Lists the IAM users that have the specified path prefix. If no path prefix is\n specified, the operation returns all users in the Amazon Web Services account. If there are none, the\n operation returns an empty list.

\n \n

IAM resource-listing operations return a subset of the available \n attributes for the resource. This operation does not return the following attributes, even though they are an attribute of the returned object:

\n
    \n
  • \n

    PermissionsBoundary

    \n
  • \n
  • \n

    Tags

    \n
  • \n
\n

To view all of the information for a user, see GetUser.

\n
\n

You can paginate the results using the MaxItems and Marker\n parameters.

", + "smithy.api#examples": [ + { + "title": "To list IAM users", + "documentation": "The following command lists the IAM users in the current account.", + "output": { + "Users": [ + { + "UserId": "AID2MAB8DPLSRHEXAMPLE", + "Path": "/division_abc/subdivision_xyz/engineering/", + "UserName": "Juan", + "Arn": "arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/engineering/Juan", + "CreateDate": "2012-09-05T19:38:48Z", + "PasswordLastUsed": "2016-09-08T21:47:36Z" + }, + { + "UserId": "AIDIODR4TAW7CSEXAMPLE", + "Path": "/division_abc/subdivision_xyz/engineering/", + "UserName": "Anika", + "Arn": "arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/engineering/Anika", + "CreateDate": "2014-04-09T15:43:45Z", + "PasswordLastUsed": "2016-09-24T16:18:07Z" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -10046,6 +10843,22 @@ }, "traits": { "smithy.api#documentation": "

Lists the virtual MFA devices defined in the Amazon Web Services account by assignment status. If\n you do not specify an assignment status, the operation returns a list of all virtual MFA\n devices. Assignment status can be Assigned, Unassigned, or\n Any.

\n \n

IAM resource-listing operations return a subset of the available \n attributes for the resource. For example, this operation does not return tags, even though they are an attribute of the returned object. To view tag information for a virtual MFA device, see ListMFADeviceTags.

\n
\n

You can paginate the results using the MaxItems and Marker\n parameters.

", + "smithy.api#examples": [ + { + "title": "To list virtual MFA devices", + "documentation": "The following command lists the virtual MFA devices that have been configured for the current account.", + "output": { + "VirtualMFADevices": [ + { + "SerialNumber": "arn:aws:iam::123456789012:mfa/ExampleMFADevice" + }, + { + "SerialNumber": "arn:aws:iam::123456789012:mfa/Juan" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -10882,7 +11695,18 @@ } ], "traits": { - "smithy.api#documentation": "

Adds or updates an inline policy document that is embedded in the specified IAM\n group.

\n

A user can also have managed policies attached to it. To attach a managed policy to a\n group, use \n AttachGroupPolicy\n . To create a new managed policy, use\n \n CreatePolicy\n . For information about policies, see Managed\n policies and inline policies in the\n IAM User Guide.

\n

For information about the maximum number of inline policies that you can embed in a\n group, see IAM and STS quotas in the IAM User Guide.

\n \n

Because policy documents can be large, you should use POST rather than GET when\n calling PutGroupPolicy. For general information about using the Query\n API with IAM, see Making query requests in the\n IAM User Guide.

\n
" + "smithy.api#documentation": "

Adds or updates an inline policy document that is embedded in the specified IAM\n group.

\n

A user can also have managed policies attached to it. To attach a managed policy to a\n group, use \n AttachGroupPolicy\n . To create a new managed policy, use\n \n CreatePolicy\n . For information about policies, see Managed\n policies and inline policies in the\n IAM User Guide.

\n

For information about the maximum number of inline policies that you can embed in a\n group, see IAM and STS quotas in the IAM User Guide.

\n \n

Because policy documents can be large, you should use POST rather than GET when\n calling PutGroupPolicy. For general information about using the Query\n API with IAM, see Making query requests in the\n IAM User Guide.

\n
", + "smithy.api#examples": [ + { + "title": "To add a policy to a group", + "documentation": "The following command adds a policy named AllPerms to the IAM group named Admins.", + "input": { + "GroupName": "Admins", + "PolicyName": "AllPerms", + "PolicyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"*\",\"Resource\":\"*\"}}" + } + } + ] } }, "com.amazonaws.iam#PutGroupPolicyRequest": { @@ -10991,7 +11815,18 @@ } ], "traits": { - "smithy.api#documentation": "

Adds or updates an inline policy document that is embedded in the specified IAM\n role.

\n

When you embed an inline policy in a role, the inline policy is used as part of the\n role's access (permissions) policy. The role's trust policy is created at the same time\n as the role, using \n CreateRole\n .\n You can update a role's trust policy using \n UpdateAssumeRolePolicy\n . For more information about roles,\n see IAM\n roles in the IAM User Guide.

\n

A role can also have a managed policy attached to it. To attach a managed policy to a\n role, use \n AttachRolePolicy\n . To create a new managed policy, use\n \n CreatePolicy\n . For information about policies, see Managed\n policies and inline policies in the\n IAM User Guide.

\n

For information about the maximum number of inline policies that you can embed with a\n role, see IAM and STS quotas in the IAM User Guide.

\n \n

Because policy documents can be large, you should use POST rather than GET when\n calling PutRolePolicy. For general information about using the Query\n API with IAM, see Making query requests in the\n IAM User Guide.

\n
" + "smithy.api#documentation": "

Adds or updates an inline policy document that is embedded in the specified IAM\n role.

\n

When you embed an inline policy in a role, the inline policy is used as part of the\n role's access (permissions) policy. The role's trust policy is created at the same time\n as the role, using \n CreateRole\n .\n You can update a role's trust policy using \n UpdateAssumeRolePolicy\n . For more information about roles,\n see IAM\n roles in the IAM User Guide.

\n

A role can also have a managed policy attached to it. To attach a managed policy to a\n role, use \n AttachRolePolicy\n . To create a new managed policy, use\n \n CreatePolicy\n . For information about policies, see Managed\n policies and inline policies in the\n IAM User Guide.

\n

For information about the maximum number of inline policies that you can embed with a\n role, see IAM and STS quotas in the IAM User Guide.

\n \n

Because policy documents can be large, you should use POST rather than GET when\n calling PutRolePolicy. For general information about using the Query\n API with IAM, see Making query requests in the\n IAM User Guide.

\n
", + "smithy.api#examples": [ + { + "title": "To attach a permissions policy to an IAM role", + "documentation": "The following command adds a permissions policy to the role named Test-Role.", + "input": { + "RoleName": "S3Access", + "PolicyName": "S3AccessPolicy", + "PolicyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}}" + } + } + ] } }, "com.amazonaws.iam#PutRolePolicyRequest": { @@ -11094,7 +11929,18 @@ } ], "traits": { - "smithy.api#documentation": "

Adds or updates an inline policy document that is embedded in the specified IAM\n user.

\n

An IAM user can also have a managed policy attached to it. To attach a managed\n policy to a user, use \n AttachUserPolicy\n . To create a new managed policy, use\n \n CreatePolicy\n . For information about policies, see Managed\n policies and inline policies in the\n IAM User Guide.

\n

For information about the maximum number of inline policies that you can embed in a\n user, see IAM and STS quotas in the IAM User Guide.

\n \n

Because policy documents can be large, you should use POST rather than GET when\n calling PutUserPolicy. For general information about using the Query\n API with IAM, see Making query requests in the\n IAM User Guide.

\n
" + "smithy.api#documentation": "

Adds or updates an inline policy document that is embedded in the specified IAM\n user.

\n

An IAM user can also have a managed policy attached to it. To attach a managed\n policy to a user, use \n AttachUserPolicy\n . To create a new managed policy, use\n \n CreatePolicy\n . For information about policies, see Managed\n policies and inline policies in the\n IAM User Guide.

\n

For information about the maximum number of inline policies that you can embed in a\n user, see IAM and STS quotas in the IAM User Guide.

\n \n

Because policy documents can be large, you should use POST rather than GET when\n calling PutUserPolicy. For general information about using the Query\n API with IAM, see Making query requests in the\n IAM User Guide.

\n
", + "smithy.api#examples": [ + { + "title": "To attach a policy to an IAM user", + "documentation": "The following command attaches a policy to the IAM user named Bob.", + "input": { + "UserName": "Bob", + "PolicyName": "AllAccessPolicy", + "PolicyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"*\",\"Resource\":\"*\"}}" + } + } + ] } }, "com.amazonaws.iam#PutUserPolicyRequest": { @@ -11212,7 +12058,17 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the specified IAM role from the specified EC2 instance profile.

\n \n

Make sure that you do not have any Amazon EC2 instances running with the role you\n are about to remove from the instance profile. Removing a role from an instance\n profile that is associated with a running instance might break any applications\n running on the instance.

\n
\n

For more information about roles, see IAM roles in the\n IAM User Guide. For more information about instance profiles,\n see Using\n instance profiles in the IAM User Guide.

" + "smithy.api#documentation": "

Removes the specified IAM role from the specified EC2 instance profile.

\n \n

Make sure that you do not have any Amazon EC2 instances running with the role you\n are about to remove from the instance profile. Removing a role from an instance\n profile that is associated with a running instance might break any applications\n running on the instance.

\n
\n

For more information about roles, see IAM roles in the\n IAM User Guide. For more information about instance profiles,\n see Using\n instance profiles in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To remove a role from an instance profile", + "documentation": "The following command removes the role named Test-Role from the instance profile named ExampleInstanceProfile.", + "input": { + "RoleName": "Test-Role", + "InstanceProfileName": "ExampleInstanceProfile" + } + } + ] } }, "com.amazonaws.iam#RemoveRoleFromInstanceProfileRequest": { @@ -11257,7 +12113,17 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the specified user from the specified group.

" + "smithy.api#documentation": "

Removes the specified user from the specified group.

", + "smithy.api#examples": [ + { + "title": "To remove a user from an IAM group", + "documentation": "The following command removes the user named Bob from the IAM group named Admins.", + "input": { + "UserName": "Bob", + "GroupName": "Admins" + } + } + ] } }, "com.amazonaws.iam#RemoveUserFromGroupRequest": { @@ -12225,7 +13091,16 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the specified version of the global endpoint token as the token version used for\n the Amazon Web Services account.

\n

By default, Security Token Service (STS) is available as a global service, and all STS requests\n go to a single endpoint at https://sts.amazonaws.com. Amazon Web Services recommends\n using Regional STS endpoints to reduce latency, build in redundancy, and increase\n session token availability. For information about Regional endpoints for STS, see\n Security Token Service\n endpoints and quotas in the Amazon Web Services General Reference.

\n

If you make an STS call to the global endpoint, the resulting session tokens might\n be valid in some Regions but not others. It depends on the version that is set in this\n operation. Version 1 tokens are valid only in Amazon Web Services Regions that are\n available by default. These tokens do not work in manually enabled Regions, such as Asia\n Pacific (Hong Kong). Version 2 tokens are valid in all Regions. However, version 2\n tokens are longer and might affect systems where you temporarily store tokens. For\n information, see Activating and\n deactivating STS in an Amazon Web Services Region in the\n IAM User Guide.

\n

To view the current session token version, see the\n GlobalEndpointTokenVersion entry in the response of the GetAccountSummary operation.

" + "smithy.api#documentation": "

Sets the specified version of the global endpoint token as the token version used for\n the Amazon Web Services account.

\n

By default, Security Token Service (STS) is available as a global service, and all STS requests\n go to a single endpoint at https://sts.amazonaws.com. Amazon Web Services recommends\n using Regional STS endpoints to reduce latency, build in redundancy, and increase\n session token availability. For information about Regional endpoints for STS, see\n Security Token Service\n endpoints and quotas in the Amazon Web Services General Reference.

\n

If you make an STS call to the global endpoint, the resulting session tokens might\n be valid in some Regions but not others. It depends on the version that is set in this\n operation. Version 1 tokens are valid only in Amazon Web Services Regions that are\n available by default. These tokens do not work in manually enabled Regions, such as Asia\n Pacific (Hong Kong). Version 2 tokens are valid in all Regions. However, version 2\n tokens are longer and might affect systems where you temporarily store tokens. For\n information, see Activating and\n deactivating STS in an Amazon Web Services Region in the\n IAM User Guide.

\n

To view the current session token version, see the\n GlobalEndpointTokenVersion entry in the response of the GetAccountSummary operation.

", + "smithy.api#examples": [ + { + "title": "To delete an access key for an IAM user", + "documentation": "The following command sets the STS global endpoint token to version 2. Version 2 tokens are valid in all Regions.", + "input": { + "GlobalEndpointTokenVersion": "v2Token" + } + } + ] } }, "com.amazonaws.iam#SetSecurityTokenServicePreferencesRequest": { @@ -12821,7 +13696,26 @@ } ], "traits": { - "smithy.api#documentation": "

Adds one or more tags to an IAM role. The role can be a regular role or a\n service-linked role. If a tag with the same key name already exists, then that tag is\n overwritten with the new value.

\n

A tag consists of a key name and an associated value. By assigning tags to your\n resources, you can do the following:

\n
    \n
  • \n

    \n Administrative grouping and discovery - Attach\n tags to resources to aid in organization and search. For example, you could search for all\n resources with the key name Project and the value\n MyImportantProject. Or search for all resources with the key name\n Cost Center and the value 41200.

    \n
  • \n
  • \n

    \n Access control - Include tags in IAM user-based\n and resource-based policies. You can use tags to restrict access to only an IAM role\n that has a specified tag attached. You can also restrict access to only those resources\n that have a certain tag attached. For examples of policies that show how to use tags to\n control access, see Control access using IAM tags in the\n IAM User Guide.

    \n
  • \n
  • \n

    \n Cost allocation - Use tags to help track which\n individuals and teams are using which Amazon Web Services resources.

    \n
  • \n
\n \n
    \n
  • \n

    If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request \n fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

    \n
  • \n
  • \n

    Amazon Web Services always interprets the tag Value as a single string. If you\n need to store an array, you can store comma-separated values in the string. However, you\n must interpret the value in your code.

    \n
  • \n
\n
\n

For more information about tagging, see Tagging IAM identities in the\n IAM User Guide.

" + "smithy.api#documentation": "

Adds one or more tags to an IAM role. The role can be a regular role or a\n service-linked role. If a tag with the same key name already exists, then that tag is\n overwritten with the new value.

\n

A tag consists of a key name and an associated value. By assigning tags to your\n resources, you can do the following:

\n
    \n
  • \n

    \n Administrative grouping and discovery - Attach\n tags to resources to aid in organization and search. For example, you could search for all\n resources with the key name Project and the value\n MyImportantProject. Or search for all resources with the key name\n Cost Center and the value 41200.

    \n
  • \n
  • \n

    \n Access control - Include tags in IAM user-based\n and resource-based policies. You can use tags to restrict access to only an IAM role\n that has a specified tag attached. You can also restrict access to only those resources\n that have a certain tag attached. For examples of policies that show how to use tags to\n control access, see Control access using IAM tags in the\n IAM User Guide.

    \n
  • \n
  • \n

    \n Cost allocation - Use tags to help track which\n individuals and teams are using which Amazon Web Services resources.

    \n
  • \n
\n \n
    \n
  • \n

    If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request \n fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

    \n
  • \n
  • \n

    Amazon Web Services always interprets the tag Value as a single string. If you\n need to store an array, you can store comma-separated values in the string. However, you\n must interpret the value in your code.

    \n
  • \n
\n
\n

For more information about tagging, see Tagging IAM identities in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To add a tag key and value to an IAM role", + "documentation": "The following example shows how to add tags to an existing role.", + "input": { + "RoleName": "taggedrole", + "Tags": [ + { + "Key": "Dept", + "Value": "Accounting" + }, + { + "Key": "CostCenter", + "Value": "12345" + } + ] + } + } + ] } }, "com.amazonaws.iam#TagRoleRequest": { @@ -12974,7 +13868,26 @@ } ], "traits": { - "smithy.api#documentation": "

Adds one or more tags to an IAM user. If a tag with the same key name already exists,\n then that tag is overwritten with the new value.

\n

A tag consists of a key name and an associated value. By assigning tags to your\n resources, you can do the following:

\n
    \n
  • \n

    \n Administrative grouping and discovery - Attach\n tags to resources to aid in organization and search. For example, you could search for all\n resources with the key name Project and the value\n MyImportantProject. Or search for all resources with the key name\n Cost Center and the value 41200.

    \n
  • \n
  • \n

    \n Access control - Include tags in IAM identity-based\n and resource-based policies. You can use tags to restrict access to only an IAM\n requesting user that has a specified tag attached. You can also restrict access to only\n those resources that have a certain tag attached. For examples of policies that show how\n to use tags to control access, see Control access using IAM tags in the\n IAM User Guide.

    \n
  • \n
  • \n

    \n Cost allocation - Use tags to help track which\n individuals and teams are using which Amazon Web Services resources.

    \n
  • \n
\n \n
    \n
  • \n

    If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request \n fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

    \n
  • \n
  • \n

    Amazon Web Services always interprets the tag Value as a single string. If you\n need to store an array, you can store comma-separated values in the string. However, you\n must interpret the value in your code.

    \n
  • \n
\n
\n

For more information about tagging, see Tagging IAM identities in the\n IAM User Guide.

" + "smithy.api#documentation": "

Adds one or more tags to an IAM user. If a tag with the same key name already exists,\n then that tag is overwritten with the new value.

\n

A tag consists of a key name and an associated value. By assigning tags to your\n resources, you can do the following:

\n
    \n
  • \n

    \n Administrative grouping and discovery - Attach\n tags to resources to aid in organization and search. For example, you could search for all\n resources with the key name Project and the value\n MyImportantProject. Or search for all resources with the key name\n Cost Center and the value 41200.

    \n
  • \n
  • \n

    \n Access control - Include tags in IAM identity-based\n and resource-based policies. You can use tags to restrict access to only an IAM\n requesting user that has a specified tag attached. You can also restrict access to only\n those resources that have a certain tag attached. For examples of policies that show how\n to use tags to control access, see Control access using IAM tags in the\n IAM User Guide.

    \n
  • \n
  • \n

    \n Cost allocation - Use tags to help track which\n individuals and teams are using which Amazon Web Services resources.

    \n
  • \n
\n \n
    \n
  • \n

    If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request \n fails and the resource is not created. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

    \n
  • \n
  • \n

    Amazon Web Services always interprets the tag Value as a single string. If you\n need to store an array, you can store comma-separated values in the string. However, you\n must interpret the value in your code.

    \n
  • \n
\n
\n

For more information about tagging, see Tagging IAM identities in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To add a tag key and value to an IAM user", + "documentation": "The following example shows how to add tags to an existing user.", + "input": { + "UserName": "anika", + "Tags": [ + { + "Key": "Dept", + "Value": "Accounting" + }, + { + "Key": "CostCenter", + "Value": "12345" + } + ] + } + } + ] } }, "com.amazonaws.iam#TagUserRequest": { @@ -13280,7 +14193,19 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the specified tags from the role. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

" + "smithy.api#documentation": "

Removes the specified tags from the role. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To remove a tag from an IAM role", + "documentation": "The following example shows how to remove a tag with the key 'Dept' from a role named 'taggedrole'.", + "input": { + "RoleName": "taggedrole", + "TagKeys": [ + "Dept" + ] + } + } + ] } }, "com.amazonaws.iam#UntagRoleRequest": { @@ -13421,7 +14346,19 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the specified tags from the user. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

" + "smithy.api#documentation": "

Removes the specified tags from the user. For more information about tagging, see Tagging IAM resources in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To remove a tag from an IAM user", + "documentation": "The following example shows how to remove tags that are attached to a user named 'anika'.", + "input": { + "UserName": "anika", + "TagKeys": [ + "Dept" + ] + } + } + ] } }, "com.amazonaws.iam#UntagUserRequest": { @@ -13466,7 +14403,18 @@ } ], "traits": { - "smithy.api#documentation": "

Changes the status of the specified access key from Active to Inactive, or vice versa.\n This operation can be used to disable a user's key as part of a key rotation\n workflow.

\n

If the UserName is not specified, the user name is determined implicitly\n based on the Amazon Web Services access key ID used to sign the request. If a temporary access key is\n used, then UserName is required. If a long-term key is assigned to the\n user, then UserName is not required. This operation works for access keys\n under the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root user\n credentials even if the Amazon Web Services account has no associated users.

\n

For information about rotating keys, see Managing keys and certificates\n in the IAM User Guide.

" + "smithy.api#documentation": "

Changes the status of the specified access key from Active to Inactive, or vice versa.\n This operation can be used to disable a user's key as part of a key rotation\n workflow.

\n

If the UserName is not specified, the user name is determined implicitly\n based on the Amazon Web Services access key ID used to sign the request. If a temporary access key is\n used, then UserName is required. If a long-term key is assigned to the\n user, then UserName is not required. This operation works for access keys\n under the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root user\n credentials even if the Amazon Web Services account has no associated users.

\n

For information about rotating keys, see Managing keys and certificates\n in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To activate or deactivate an access key for an IAM user", + "documentation": "The following command deactivates the specified access key (access key ID and secret access key) for the IAM user named Bob.", + "input": { + "UserName": "Bob", + "Status": "Inactive", + "AccessKeyId": "AKIAIOSFODNN7EXAMPLE" + } + } + ] } }, "com.amazonaws.iam#UpdateAccessKeyRequest": { @@ -13520,7 +14468,17 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the password policy settings for the Amazon Web Services account.

\n \n

This operation does not support partial updates. No parameters are required, but\n if you do not specify a parameter, that parameter's value reverts to its default\n value. See the Request Parameters section for each\n parameter's default value. Also note that some parameters do not allow the default\n parameter to be explicitly set. Instead, to invoke the default value, do not include\n that parameter when you invoke the operation.

\n
\n

For more information about using a password policy, see Managing an IAM password\n policy in the IAM User Guide.

" + "smithy.api#documentation": "

Updates the password policy settings for the Amazon Web Services account.

\n \n

This operation does not support partial updates. No parameters are required, but\n if you do not specify a parameter, that parameter's value reverts to its default\n value. See the Request Parameters section for each\n parameter's default value. Also note that some parameters do not allow the default\n parameter to be explicitly set. Instead, to invoke the default value, do not include\n that parameter when you invoke the operation.

\n
\n

For more information about using a password policy, see Managing an IAM password\n policy in the IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To set or change the current account password policy", + "documentation": "The following command sets the password policy to require a minimum length of eight characters and to require one or more numbers in the password:", + "input": { + "MinimumPasswordLength": 8, + "RequireNumbers": true + } + } + ] } }, "com.amazonaws.iam#UpdateAccountPasswordPolicyRequest": { @@ -13616,7 +14574,17 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the policy that grants an IAM entity permission to assume a role. This is\n typically referred to as the \"role trust policy\". For more information about roles, see\n Using roles to\n delegate permissions and federate identities.

" + "smithy.api#documentation": "

Updates the policy that grants an IAM entity permission to assume a role. This is\n typically referred to as the \"role trust policy\". For more information about roles, see\n Using roles to\n delegate permissions and federate identities.

", + "smithy.api#examples": [ + { + "title": "To update the trust policy for an IAM role", + "documentation": "The following command updates the role trust policy for the role named Test-Role:", + "input": { + "PolicyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"ec2.amazonaws.com\"]},\"Action\":[\"sts:AssumeRole\"]}]}", + "RoleName": "S3AccessForEC2Instances" + } + } + ] } }, "com.amazonaws.iam#UpdateAssumeRolePolicyRequest": { @@ -13664,7 +14632,17 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the name and/or the path of the specified IAM group.

\n \n

You should understand the implications of changing a group's path or name. For\n more information, see Renaming users and\n groups in the IAM User Guide.

\n
\n \n

The person making the request (the principal), must have permission to change the\n role group with the old name and the new name. For example, to change the group\n named Managers to MGRs, the principal must have a policy\n that allows them to update both groups. If the principal has permission to update\n the Managers group, but not the MGRs group, then the\n update fails. For more information about permissions, see Access management.\n

\n
" + "smithy.api#documentation": "

Updates the name and/or the path of the specified IAM group.

\n \n

You should understand the implications of changing a group's path or name. For\n more information, see Renaming users and\n groups in the IAM User Guide.

\n
\n \n

The person making the request (the principal), must have permission to change the\n role group with the old name and the new name. For example, to change the group\n named Managers to MGRs, the principal must have a policy\n that allows them to update both groups. If the principal has permission to update\n the Managers group, but not the MGRs group, then the\n update fails. For more information about permissions, see Access management.\n

\n
", + "smithy.api#examples": [ + { + "title": "To rename an IAM group", + "documentation": "The following command changes the name of the IAM group Test to Test-1.", + "input": { + "GroupName": "Test", + "NewGroupName": "Test-1" + } + } + ] } }, "com.amazonaws.iam#UpdateGroupRequest": { @@ -13720,7 +14698,17 @@ } ], "traits": { - "smithy.api#documentation": "

Changes the password for the specified IAM user. You can use the CLI, the Amazon Web Services\n API, or the Users page in the IAM console to change\n the password for any IAM user. Use ChangePassword to change your own\n password in the My Security Credentials page in the\n Amazon Web Services Management Console.

\n

For more information about modifying passwords, see Managing passwords in the\n IAM User Guide.

" + "smithy.api#documentation": "

Changes the password for the specified IAM user. You can use the CLI, the Amazon Web Services\n API, or the Users page in the IAM console to change\n the password for any IAM user. Use ChangePassword to change your own\n password in the My Security Credentials page in the\n Amazon Web Services Management Console.

\n

For more information about modifying passwords, see Managing passwords in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To change the password for an IAM user", + "documentation": "The following command creates or changes the password for the IAM user named Bob.", + "input": { + "UserName": "Bob", + "Password": "SomeKindOfPassword123!@#" + } + } + ] } }, "com.amazonaws.iam#UpdateLoginProfileRequest": { @@ -14138,7 +15126,18 @@ } ], "traits": { - "smithy.api#documentation": "

Changes the status of the specified user signing certificate from active to disabled,\n or vice versa. This operation can be used to disable an IAM user's signing\n certificate as part of a certificate rotation work flow.

\n

If the UserName field is not specified, the user name is determined\n implicitly based on the Amazon Web Services access key ID used to sign the request. This operation\n works for access keys under the Amazon Web Services account. Consequently, you can use this operation\n to manage Amazon Web Services account root user credentials even if the Amazon Web Services account has no associated\n users.

" + "smithy.api#documentation": "

Changes the status of the specified user signing certificate from active to disabled,\n or vice versa. This operation can be used to disable an IAM user's signing\n certificate as part of a certificate rotation work flow.

\n

If the UserName field is not specified, the user name is determined\n implicitly based on the Amazon Web Services access key ID used to sign the request. This operation\n works for access keys under the Amazon Web Services account. Consequently, you can use this operation\n to manage Amazon Web Services account root user credentials even if the Amazon Web Services account has no associated\n users.

", + "smithy.api#examples": [ + { + "title": "To change the active status of a signing certificate for an IAM user", + "documentation": "The following command changes the status of a signing certificate for a user named Bob to Inactive.", + "input": { + "UserName": "Bob", + "CertificateId": "TA7SMP42TDN5Z26OBPJE7EXAMPLE", + "Status": "Inactive" + } + } + ] } }, "com.amazonaws.iam#UpdateSigningCertificateRequest": { @@ -14198,7 +15197,17 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the name and/or the path of the specified IAM user.

\n \n

You should understand the implications of changing an IAM user's path or\n name. For more information, see Renaming an IAM\n user and Renaming an IAM\n group in the IAM User Guide.

\n
\n \n

To change a user name, the requester must have appropriate permissions on both\n the source object and the target object. For example, to change Bob to Robert, the\n entity making the request must have permission on Bob and Robert, or must have\n permission on all (*). For more information about permissions, see Permissions and policies.

\n
" + "smithy.api#documentation": "

Updates the name and/or the path of the specified IAM user.

\n \n

You should understand the implications of changing an IAM user's path or\n name. For more information, see Renaming an IAM\n user and Renaming an IAM\n group in the IAM User Guide.

\n
\n \n

To change a user name, the requester must have appropriate permissions on both\n the source object and the target object. For example, to change Bob to Robert, the\n entity making the request must have permission on Bob and Robert, or must have\n permission on all (*). For more information about permissions, see Permissions and policies.

\n
", + "smithy.api#examples": [ + { + "title": "To change an IAM user's name", + "documentation": "The following command changes the name of the IAM user Bob to Robert. It does not change the user's path.", + "input": { + "UserName": "Bob", + "NewUserName": "Robert" + } + } + ] } }, "com.amazonaws.iam#UpdateUserRequest": { @@ -14326,7 +15335,29 @@ } ], "traits": { - "smithy.api#documentation": "

Uploads a server certificate entity for the Amazon Web Services account. The server certificate\n entity includes a public key certificate, a private key, and an optional certificate\n chain, which should all be PEM-encoded.

\n

We recommend that you use Certificate Manager to\n provision, manage, and deploy your server certificates. With ACM you can request a\n certificate, deploy it to Amazon Web Services resources, and let ACM handle certificate renewals for\n you. Certificates provided by ACM are free. For more information about using ACM,\n see the Certificate Manager User\n Guide.

\n

For more information about working with server certificates, see Working\n with server certificates in the IAM User Guide. This\n topic includes a list of Amazon Web Services services that can use the server certificates that you\n manage with IAM.

\n

For information about the number of server certificates you can upload, see IAM and STS\n quotas in the IAM User Guide.

\n \n

Because the body of the public key certificate, private key, and the certificate\n chain can be large, you should use POST rather than GET when calling\n UploadServerCertificate. For information about setting up\n signatures and authorization through the API, see Signing Amazon Web Services API\n requests in the Amazon Web Services General Reference. For general\n information about using the Query API with IAM, see Calling the API by making HTTP query\n requests in the IAM User Guide.

\n
" + "smithy.api#documentation": "

Uploads a server certificate entity for the Amazon Web Services account. The server certificate\n entity includes a public key certificate, a private key, and an optional certificate\n chain, which should all be PEM-encoded.

\n

We recommend that you use Certificate Manager to\n provision, manage, and deploy your server certificates. With ACM you can request a\n certificate, deploy it to Amazon Web Services resources, and let ACM handle certificate renewals for\n you. Certificates provided by ACM are free. For more information about using ACM,\n see the Certificate Manager User\n Guide.

\n

For more information about working with server certificates, see Working\n with server certificates in the IAM User Guide. This\n topic includes a list of Amazon Web Services services that can use the server certificates that you\n manage with IAM.

\n

For information about the number of server certificates you can upload, see IAM and STS\n quotas in the IAM User Guide.

\n \n

Because the body of the public key certificate, private key, and the certificate\n chain can be large, you should use POST rather than GET when calling\n UploadServerCertificate. For information about setting up\n signatures and authorization through the API, see Signing Amazon Web Services API\n requests in the Amazon Web Services General Reference. For general\n information about using the Query API with IAM, see Calling the API by making HTTP query\n requests in the IAM User Guide.

\n
", + "smithy.api#examples": [ + { + "title": "To upload a server certificate to your AWS account", + "documentation": "The following upload-server-certificate command uploads a server certificate to your AWS account:", + "input": { + "ServerCertificateName": "ProdServerCert", + "Path": "/company/servercerts/", + "CertificateBody": "-----BEGIN CERTIFICATE----------END CERTIFICATE-----", + "PrivateKey": "-----BEGIN DSA PRIVATE KEY----------END DSA PRIVATE KEY-----" + }, + "output": { + "ServerCertificateMetadata": { + "ServerCertificateName": "ProdServerCert", + "Path": "/company/servercerts/", + "Arn": "arn:aws:iam::123456789012:server-certificate/company/servercerts/ProdServerCert", + "UploadDate": "2010-05-08T01:02:03.004Z", + "ServerCertificateId": "ASCA1111111111EXAMPLE", + "Expiration": "2012-05-08T01:02:03.004Z" + } + } + } + ] } }, "com.amazonaws.iam#UploadServerCertificateRequest": { @@ -14432,7 +15463,26 @@ } ], "traits": { - "smithy.api#documentation": "

Uploads an X.509 signing certificate and associates it with the specified IAM user.\n Some Amazon Web Services services require you to use certificates to validate requests that are signed\n with a corresponding private key. When you upload the certificate, its default status is\n Active.

\n

For information about when you would use an X.509 signing certificate, see Managing\n server certificates in IAM in the\n IAM User Guide.

\n

If the UserName is not specified, the IAM user name is determined\n implicitly based on the Amazon Web Services access key ID used to sign the request. This operation\n works for access keys under the Amazon Web Services account. Consequently, you can use this operation\n to manage Amazon Web Services account root user credentials even if the Amazon Web Services account has no associated\n users.

\n \n

Because the body of an X.509 certificate can be large, you should use POST rather\n than GET when calling UploadSigningCertificate. For information about\n setting up signatures and authorization through the API, see Signing\n Amazon Web Services API requests in the Amazon Web Services General Reference. For\n general information about using the Query API with IAM, see Making query\n requests in the IAM User Guide.

\n
" + "smithy.api#documentation": "

Uploads an X.509 signing certificate and associates it with the specified IAM user.\n Some Amazon Web Services services require you to use certificates to validate requests that are signed\n with a corresponding private key. When you upload the certificate, its default status is\n Active.

\n

For information about when you would use an X.509 signing certificate, see Managing\n server certificates in IAM in the\n IAM User Guide.

\n

If the UserName is not specified, the IAM user name is determined\n implicitly based on the Amazon Web Services access key ID used to sign the request. This operation\n works for access keys under the Amazon Web Services account. Consequently, you can use this operation\n to manage Amazon Web Services account root user credentials even if the Amazon Web Services account has no associated\n users.

\n \n

Because the body of an X.509 certificate can be large, you should use POST rather\n than GET when calling UploadSigningCertificate. For information about\n setting up signatures and authorization through the API, see Signing\n Amazon Web Services API requests in the Amazon Web Services General Reference. For\n general information about using the Query API with IAM, see Making query\n requests in the IAM User Guide.

\n
", + "smithy.api#examples": [ + { + "title": "To upload a signing certificate for an IAM user", + "documentation": "The following command uploads a signing certificate for the IAM user named Bob.", + "input": { + "UserName": "Bob", + "CertificateBody": "-----BEGIN CERTIFICATE----------END CERTIFICATE-----" + }, + "output": { + "Certificate": { + "CertificateId": "ID123456789012345EXAMPLE", + "UserName": "Bob", + "Status": "Active", + "CertificateBody": "-----BEGIN CERTIFICATE----------END CERTIFICATE-----", + "UploadDate": "2015-06-06T21:40:08.121Z" + } + } + } + ] } }, "com.amazonaws.iam#UploadSigningCertificateRequest": { diff --git a/codegen/sdk-codegen/aws-models/imagebuilder.json b/codegen/sdk-codegen/aws-models/imagebuilder.json index 98d05828ce0..40641fb4539 100644 --- a/codegen/sdk-codegen/aws-models/imagebuilder.json +++ b/codegen/sdk-codegen/aws-models/imagebuilder.json @@ -10478,52 +10478,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -10531,13 +10535,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -10547,92 +10560,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://imagebuilder-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://imagebuilder-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -10641,155 +10645,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://imagebuilder.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://imagebuilder-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://imagebuilder.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://imagebuilder-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://imagebuilder.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://imagebuilder.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://imagebuilder.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://imagebuilder.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/inspector.json b/codegen/sdk-codegen/aws-models/inspector.json index 9fc961e1146..d997c4b0a6e 100644 --- a/codegen/sdk-codegen/aws-models/inspector.json +++ b/codegen/sdk-codegen/aws-models/inspector.json @@ -30,42 +30,56 @@ }, "shapes": { "com.amazonaws.inspector#AccessDeniedErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACCESS_DENIED_TO_ASSESSMENT_TARGET", - "name": "ACCESS_DENIED_TO_ASSESSMENT_TARGET" - }, - { - "value": "ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE", - "name": "ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE" - }, - { - "value": "ACCESS_DENIED_TO_ASSESSMENT_RUN", - "name": "ACCESS_DENIED_TO_ASSESSMENT_RUN" - }, - { - "value": "ACCESS_DENIED_TO_FINDING", - "name": "ACCESS_DENIED_TO_FINDING" - }, - { - "value": "ACCESS_DENIED_TO_RESOURCE_GROUP", - "name": "ACCESS_DENIED_TO_RESOURCE_GROUP" - }, - { - "value": "ACCESS_DENIED_TO_RULES_PACKAGE", - "name": "ACCESS_DENIED_TO_RULES_PACKAGE" - }, - { - "value": "ACCESS_DENIED_TO_SNS_TOPIC", - "name": "ACCESS_DENIED_TO_SNS_TOPIC" - }, - { - "value": "ACCESS_DENIED_TO_IAM_ROLE", - "name": "ACCESS_DENIED_TO_IAM_ROLE" + "type": "enum", + "members": { + "ACCESS_DENIED_TO_ASSESSMENT_TARGET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED_TO_ASSESSMENT_TARGET" } - ] + }, + "ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE" + } + }, + "ACCESS_DENIED_TO_ASSESSMENT_RUN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED_TO_ASSESSMENT_RUN" + } + }, + "ACCESS_DENIED_TO_FINDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED_TO_FINDING" + } + }, + "ACCESS_DENIED_TO_RESOURCE_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED_TO_RESOURCE_GROUP" + } + }, + "ACCESS_DENIED_TO_RULES_PACKAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED_TO_RULES_PACKAGE" + } + }, + "ACCESS_DENIED_TO_SNS_TOPIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED_TO_SNS_TOPIC" + } + }, + "ACCESS_DENIED_TO_IAM_ROLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED_TO_IAM_ROLE" + } + } } }, "com.amazonaws.inspector#AccessDeniedException": { @@ -125,7 +139,27 @@ } ], "traits": { - "smithy.api#documentation": "

Assigns attributes (key and value pairs) to the findings that are specified by the\n ARNs of the findings.

" + "smithy.api#documentation": "

Assigns attributes (key and value pairs) to the findings that are specified by the\n ARNs of the findings.

", + "smithy.api#examples": [ + { + "title": "Add attributes to findings", + "documentation": "Assigns attributes (key and value pairs) to the findings that are specified by the ARNs of the findings.", + "input": { + "findingArns": [ + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-8l1VIE0D/run/0-Z02cjjug/finding/0-T8yM9mEU" + ], + "attributes": [ + { + "key": "Example", + "value": "example" + } + ] + }, + "output": { + "failedItems": {} + } + } + ] } }, "com.amazonaws.inspector#AddAttributesToFindingsRequest": { @@ -145,6 +179,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#AddAttributesToFindingsResponse": { @@ -157,6 +194,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#AddRemoveAttributesFindingArnList": { @@ -228,53 +268,67 @@ } }, "com.amazonaws.inspector#AgentHealth": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "HEALTHY", - "name": "HEALTHY" - }, - { - "value": "UNHEALTHY", - "name": "UNHEALTHY" - }, - { - "value": "UNKNOWN", - "name": "UNKNOWN" + "type": "enum", + "members": { + "HEALTHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HEALTHY" } - ] + }, + "UNHEALTHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNHEALTHY" + } + }, + "UNKNOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN" + } + } } }, "com.amazonaws.inspector#AgentHealthCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IDLE", - "name": "IDLE" - }, - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "SHUTDOWN", - "name": "SHUTDOWN" - }, - { - "value": "UNHEALTHY", - "name": "UNHEALTHY" - }, - { - "value": "THROTTLED", - "name": "THROTTLED" - }, - { - "value": "UNKNOWN", - "name": "UNKNOWN" + "type": "enum", + "members": { + "IDLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IDLE" } - ] + }, + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "SHUTDOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHUTDOWN" + } + }, + "UNHEALTHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNHEALTHY" + } + }, + "THROTTLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "THROTTLED" + } + }, + "UNKNOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN" + } + } } }, "com.amazonaws.inspector#AgentHealthCodeList": { @@ -848,85 +902,115 @@ } }, "com.amazonaws.inspector#AssessmentRunNotificationSnsStatusCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUCCESS", - "name": "SUCCESS" - }, - { - "value": "TOPIC_DOES_NOT_EXIST", - "name": "TOPIC_DOES_NOT_EXIST" - }, - { - "value": "ACCESS_DENIED", - "name": "ACCESS_DENIED" - }, - { - "value": "INTERNAL_ERROR", - "name": "INTERNAL_ERROR" + "type": "enum", + "members": { + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" } - ] + }, + "TOPIC_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TOPIC_DOES_NOT_EXIST" + } + }, + "ACCESS_DENIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED" + } + }, + "INTERNAL_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTERNAL_ERROR" + } + } } }, "com.amazonaws.inspector#AssessmentRunState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATED", - "name": "CREATED" - }, - { - "value": "START_DATA_COLLECTION_PENDING", - "name": "START_DATA_COLLECTION_PENDING" - }, - { - "value": "START_DATA_COLLECTION_IN_PROGRESS", - "name": "START_DATA_COLLECTION_IN_PROGRESS" - }, - { - "value": "COLLECTING_DATA", - "name": "COLLECTING_DATA" - }, - { - "value": "STOP_DATA_COLLECTION_PENDING", - "name": "STOP_DATA_COLLECTION_PENDING" - }, - { - "value": "DATA_COLLECTED", - "name": "DATA_COLLECTED" - }, - { - "value": "START_EVALUATING_RULES_PENDING", - "name": "START_EVALUATING_RULES_PENDING" - }, - { - "value": "EVALUATING_RULES", - "name": "EVALUATING_RULES" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "ERROR", - "name": "ERROR" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" - }, - { - "value": "COMPLETED_WITH_ERRORS", - "name": "COMPLETED_WITH_ERRORS" - }, - { - "value": "CANCELED", - "name": "CANCELED" + "type": "enum", + "members": { + "CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATED" } - ] + }, + "START_DATA_COLLECTION_PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "START_DATA_COLLECTION_PENDING" + } + }, + "START_DATA_COLLECTION_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "START_DATA_COLLECTION_IN_PROGRESS" + } + }, + "COLLECTING_DATA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COLLECTING_DATA" + } + }, + "STOP_DATA_COLLECTION_PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOP_DATA_COLLECTION_PENDING" + } + }, + "DATA_COLLECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATA_COLLECTED" + } + }, + "START_EVALUATING_RULES_PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "START_EVALUATING_RULES_PENDING" + } + }, + "EVALUATING_RULES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVALUATING_RULES" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ERROR" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + }, + "COMPLETED_WITH_ERRORS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED_WITH_ERRORS" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCELED" + } + } } }, "com.amazonaws.inspector#AssessmentRunStateChange": { @@ -1241,14 +1325,14 @@ } }, "com.amazonaws.inspector#AssetType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ec2-instance", - "name": "EC2_INSTANCE" + "type": "enum", + "members": { + "EC2_INSTANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ec2-instance" } - ] + } } }, "com.amazonaws.inspector#Attribute": { @@ -1382,7 +1466,20 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new assessment target using the ARN of the resource group that is generated\n by CreateResourceGroup. If resourceGroupArn is not specified, all EC2\n instances in the current AWS account and region are included in the assessment target. If\n the service-linked role isn’t already registered, this action also creates and\n registers a service-linked role to grant Amazon Inspector access to AWS Services needed to\n perform security assessments. You can create up to 50 assessment targets per AWS account.\n You can run up to 500 concurrent agents per AWS account. For more information, see \n Amazon Inspector Assessment Targets.

" + "smithy.api#documentation": "

Creates a new assessment target using the ARN of the resource group that is generated\n by CreateResourceGroup. If resourceGroupArn is not specified, all EC2\n instances in the current AWS account and region are included in the assessment target. If\n the service-linked role isn’t already registered, this action also creates and\n registers a service-linked role to grant Amazon Inspector access to AWS Services needed to\n perform security assessments. You can create up to 50 assessment targets per AWS account.\n You can run up to 500 concurrent agents per AWS account. For more information, see \n Amazon Inspector Assessment Targets.

", + "smithy.api#examples": [ + { + "title": "Create assessment target", + "documentation": "Creates a new assessment target using the ARN of the resource group that is generated by CreateResourceGroup. You can create up to 50 assessment targets per AWS account. You can run up to 500 concurrent agents per AWS account.", + "input": { + "assessmentTargetName": "ExampleAssessmentTarget", + "resourceGroupArn": "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-AB6DMKnv" + }, + "output": { + "assessmentTargetArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX" + } + } + ] } }, "com.amazonaws.inspector#CreateAssessmentTargetRequest": { @@ -1401,6 +1498,9 @@ "smithy.api#documentation": "

The ARN that specifies the resource group that is used to create the assessment\n target. If resourceGroupArn is not specified, all EC2 instances in the current AWS account\n and region are included in the assessment target.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#CreateAssessmentTargetResponse": { @@ -1413,6 +1513,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#CreateAssessmentTemplate": { @@ -1444,7 +1547,30 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an assessment template for the assessment target that is specified by the ARN\n of the assessment target. If the service-linked role isn’t already registered, this action also creates and\n registers a service-linked role to grant Amazon Inspector access to AWS Services needed to\n perform security assessments.

" + "smithy.api#documentation": "

Creates an assessment template for the assessment target that is specified by the ARN\n of the assessment target. If the service-linked role isn’t already registered, this action also creates and\n registers a service-linked role to grant Amazon Inspector access to AWS Services needed to\n perform security assessments.

", + "smithy.api#examples": [ + { + "title": "Create assessment template", + "documentation": "Creates an assessment template for the assessment target that is specified by the ARN of the assessment target.", + "input": { + "assessmentTargetArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX", + "assessmentTemplateName": "ExampleAssessmentTemplate", + "durationInSeconds": 180, + "rulesPackageArns": [ + "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-11B9DBXp" + ], + "userAttributesForFindings": [ + { + "key": "Example", + "value": "example" + } + ] + }, + "output": { + "assessmentTemplateArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T" + } + } + ] } }, "com.amazonaws.inspector#CreateAssessmentTemplateRequest": { @@ -1485,6 +1611,9 @@ "smithy.api#documentation": "

The user-defined attributes that are assigned to every finding that is generated by\n the assessment run that uses this assessment template. An attribute is a key and value pair\n (an Attribute object). Within an assessment template, each key must be\n unique.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#CreateAssessmentTemplateResponse": { @@ -1497,6 +1626,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#CreateExclusionsPreview": { @@ -1541,6 +1673,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#CreateExclusionsPreviewResponse": { @@ -1553,6 +1688,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#CreateResourceGroup": { @@ -1581,7 +1719,24 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a resource group using the specified set of tags (key and value pairs) that\n are used to select the EC2 instances to be included in an Amazon Inspector assessment\n target. The created resource group is then used to create an Amazon Inspector assessment\n target. For more information, see CreateAssessmentTarget.

" + "smithy.api#documentation": "

Creates a resource group using the specified set of tags (key and value pairs) that\n are used to select the EC2 instances to be included in an Amazon Inspector assessment\n target. The created resource group is then used to create an Amazon Inspector assessment\n target. For more information, see CreateAssessmentTarget.

", + "smithy.api#examples": [ + { + "title": "Create resource group", + "documentation": "Creates a resource group using the specified set of tags (key and value pairs) that are used to select the EC2 instances to be included in an Amazon Inspector assessment target. The created resource group is then used to create an Amazon Inspector assessment target. ", + "input": { + "resourceGroupTags": [ + { + "key": "Name", + "value": "example" + } + ] + }, + "output": { + "resourceGroupArn": "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-AB6DMKnv" + } + } + ] } }, "com.amazonaws.inspector#CreateResourceGroupRequest": { @@ -1594,6 +1749,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#CreateResourceGroupResponse": { @@ -1606,6 +1764,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#DeleteAssessmentRun": { @@ -1637,7 +1798,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the assessment run that is specified by the ARN of the assessment\n run.

" + "smithy.api#documentation": "

Deletes the assessment run that is specified by the ARN of the assessment\n run.

", + "smithy.api#examples": [ + { + "title": "Delete assessment run", + "documentation": "Deletes the assessment run that is specified by the ARN of the assessment run.", + "input": { + "assessmentRunArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T/run/0-11LMTAVe" + } + } + ] } }, "com.amazonaws.inspector#DeleteAssessmentRunRequest": { @@ -1650,6 +1820,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#DeleteAssessmentTarget": { @@ -1681,7 +1854,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the assessment target that is specified by the ARN of the assessment\n target.

" + "smithy.api#documentation": "

Deletes the assessment target that is specified by the ARN of the assessment\n target.

", + "smithy.api#examples": [ + { + "title": "Delete assessment target", + "documentation": "Deletes the assessment target that is specified by the ARN of the assessment target.", + "input": { + "assessmentTargetArn": "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq" + } + } + ] } }, "com.amazonaws.inspector#DeleteAssessmentTargetRequest": { @@ -1694,6 +1876,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#DeleteAssessmentTemplate": { @@ -1725,7 +1910,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the assessment template that is specified by the ARN of the assessment\n template.

" + "smithy.api#documentation": "

Deletes the assessment template that is specified by the ARN of the assessment\n template.

", + "smithy.api#examples": [ + { + "title": "Delete assessment template", + "documentation": "Deletes the assessment template that is specified by the ARN of the assessment template.", + "input": { + "assessmentTemplateArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T" + } + } + ] } }, "com.amazonaws.inspector#DeleteAssessmentTemplateRequest": { @@ -1738,6 +1932,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#DescribeAssessmentRuns": { @@ -1770,7 +1967,10 @@ "smithy.api#required": {} } } - } + }, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.inspector#DescribeAssessmentRunsResponse": { "type": "structure", @@ -1789,6 +1989,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#DescribeAssessmentTargets": { @@ -1821,6 +2024,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#DescribeAssessmentTargetsResponse": { @@ -1840,6 +2046,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#DescribeAssessmentTemplates": { @@ -1871,6 +2080,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#DescribeAssessmentTemplatesResponse": { @@ -1890,6 +2102,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#DescribeCrossAccountAccessRole": { @@ -1933,6 +2148,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#DescribeExclusions": { @@ -1971,6 +2189,9 @@ "smithy.api#documentation": "

The locale into which you want to translate the exclusion's title, description, and\n recommendation.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#DescribeExclusionsResponse": { @@ -1990,6 +2211,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#DescribeFindings": { @@ -2028,6 +2252,9 @@ "smithy.api#documentation": "

The locale into which you want to translate a finding description, recommendation,\n and the short description that identifies the finding.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#DescribeFindingsResponse": { @@ -2047,6 +2274,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#DescribeResourceGroups": { @@ -2079,6 +2309,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#DescribeResourceGroupsResponse": { @@ -2098,6 +2331,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#DescribeRulesPackages": { @@ -2117,7 +2353,30 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the rules packages that are specified by the ARNs of the rules\n packages.

" + "smithy.api#documentation": "

Describes the rules packages that are specified by the ARNs of the rules\n packages.

", + "smithy.api#examples": [ + { + "title": "Describe rules packages", + "documentation": "Describes the rules packages that are specified by the ARNs of the rules packages.", + "input": { + "rulesPackageArns": [ + "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ" + ] + }, + "output": { + "rulesPackages": [ + { + "arn": "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ", + "description": "The rules in this package help determine whether your systems are configured securely.", + "name": "Security Best Practices", + "provider": "Amazon Web Services, Inc.", + "version": "1.1" + } + ], + "failedItems": {} + } + } + ] } }, "com.amazonaws.inspector#DescribeRulesPackagesRequest": { @@ -2136,6 +2395,9 @@ "smithy.api#documentation": "

The locale that you want to translate a rules package description into.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#DescribeRulesPackagesResponse": { @@ -2155,6 +2417,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#DurationRange": { @@ -2363,34 +2628,44 @@ } }, "com.amazonaws.inspector#FailedItemErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INVALID_ARN", - "name": "INVALID_ARN" - }, - { - "value": "DUPLICATE_ARN", - "name": "DUPLICATE_ARN" - }, - { - "value": "ITEM_DOES_NOT_EXIST", - "name": "ITEM_DOES_NOT_EXIST" - }, - { - "value": "ACCESS_DENIED", - "name": "ACCESS_DENIED" - }, - { - "value": "LIMIT_EXCEEDED", - "name": "LIMIT_EXCEEDED" - }, - { - "value": "INTERNAL_ERROR", - "name": "INTERNAL_ERROR" + "type": "enum", + "members": { + "INVALID_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ARN" } - ] + }, + "DUPLICATE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DUPLICATE_ARN" + } + }, + "ITEM_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ITEM_DOES_NOT_EXIST" + } + }, + "ACCESS_DENIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED" + } + }, + "LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LIMIT_EXCEEDED" + } + }, + "INTERNAL_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTERNAL_ERROR" + } + } } }, "com.amazonaws.inspector#FailedItems": { @@ -2677,6 +2952,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#GetAssessmentReportResponse": { @@ -2695,6 +2973,9 @@ "smithy.api#documentation": "

Specifies the URL where you can find the generated assessment report. This parameter\n is only returned if the report is successfully generated.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#GetExclusionsPreview": { @@ -2763,6 +3044,9 @@ "smithy.api#documentation": "

The locale into which you want to translate the exclusion's title, description, and\n recommendation.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#GetExclusionsPreviewResponse": { @@ -2787,6 +3071,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameters is\n present in the response and contains the value to use for the nextToken parameter in a\n subsequent pagination request. If there is no more data to be listed, this parameter is set\n to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#GetTelemetryMetadata": { @@ -2812,7 +3099,165 @@ } ], "traits": { - "smithy.api#documentation": "

Information about the data that is collected for the specified assessment\n run.

" + "smithy.api#documentation": "

Information about the data that is collected for the specified assessment\n run.

", + "smithy.api#examples": [ + { + "title": "Get telemetry metadata", + "documentation": "Information about the data that is collected for the specified assessment run.", + "input": { + "assessmentRunArn": "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE" + }, + "output": { + "telemetryMetadata": [ + { + "count": 2, + "dataSize": 345, + "messageType": "InspectorDuplicateProcess" + }, + { + "count": 3, + "dataSize": 255, + "messageType": "InspectorTimeEventMsg" + }, + { + "count": 4, + "dataSize": 1082, + "messageType": "InspectorNetworkInterface" + }, + { + "count": 2, + "dataSize": 349, + "messageType": "InspectorDnsEntry" + }, + { + "count": 11, + "dataSize": 2514, + "messageType": "InspectorDirectoryInfoMsg" + }, + { + "count": 1, + "dataSize": 179, + "messageType": "InspectorTcpV6ListeningPort" + }, + { + "count": 101, + "dataSize": 10949, + "messageType": "InspectorTerminal" + }, + { + "count": 26, + "dataSize": 5916, + "messageType": "InspectorUser" + }, + { + "count": 282, + "dataSize": 32148, + "messageType": "InspectorDynamicallyLoadedCodeModule" + }, + { + "count": 18, + "dataSize": 10172, + "messageType": "InspectorCreateProcess" + }, + { + "count": 3, + "dataSize": 8001, + "messageType": "InspectorProcessPerformance" + }, + { + "count": 1, + "dataSize": 360, + "messageType": "InspectorOperatingSystem" + }, + { + "count": 6, + "dataSize": 546, + "messageType": "InspectorStopProcess" + }, + { + "count": 1, + "dataSize": 1553, + "messageType": "InspectorInstanceMetaData" + }, + { + "count": 2, + "dataSize": 434, + "messageType": "InspectorTcpV4Connection" + }, + { + "count": 474, + "dataSize": 2960322, + "messageType": "InspectorPackageInfo" + }, + { + "count": 3, + "dataSize": 2235, + "messageType": "InspectorSystemPerformance" + }, + { + "count": 105, + "dataSize": 46048, + "messageType": "InspectorCodeModule" + }, + { + "count": 1, + "dataSize": 182, + "messageType": "InspectorUdpV6ListeningPort" + }, + { + "count": 2, + "dataSize": 371, + "messageType": "InspectorUdpV4ListeningPort" + }, + { + "count": 18, + "dataSize": 8362, + "messageType": "InspectorKernelModule" + }, + { + "count": 29, + "dataSize": 48788, + "messageType": "InspectorConfigurationInfo" + }, + { + "count": 1, + "dataSize": 79, + "messageType": "InspectorMonitoringStart" + }, + { + "count": 5, + "dataSize": 0, + "messageType": "InspectorSplitMsgBegin" + }, + { + "count": 51, + "dataSize": 4593, + "messageType": "InspectorGroup" + }, + { + "count": 1, + "dataSize": 184, + "messageType": "InspectorTcpV4ListeningPort" + }, + { + "count": 1159, + "dataSize": 3146579, + "messageType": "Total" + }, + { + "count": 5, + "dataSize": 0, + "messageType": "InspectorSplitMsgEnd" + }, + { + "count": 1, + "dataSize": 612, + "messageType": "InspectorLoadImageInProcess" + } + ] + } + } + ] } }, "com.amazonaws.inspector#GetTelemetryMetadataRequest": { @@ -2825,6 +3270,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#GetTelemetryMetadataResponse": { @@ -2837,6 +3285,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#Hostname": { @@ -2849,30 +3300,38 @@ } }, "com.amazonaws.inspector#InspectorEvent": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ASSESSMENT_RUN_STARTED", - "name": "ASSESSMENT_RUN_STARTED" - }, - { - "value": "ASSESSMENT_RUN_COMPLETED", - "name": "ASSESSMENT_RUN_COMPLETED" - }, - { - "value": "ASSESSMENT_RUN_STATE_CHANGED", - "name": "ASSESSMENT_RUN_STATE_CHANGED" - }, - { - "value": "FINDING_REPORTED", - "name": "FINDING_REPORTED" - }, - { - "value": "OTHER", - "name": "OTHER" + "type": "enum", + "members": { + "ASSESSMENT_RUN_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_RUN_STARTED" } - ] + }, + "ASSESSMENT_RUN_COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_RUN_COMPLETED" + } + }, + "ASSESSMENT_RUN_STATE_CHANGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_RUN_STATE_CHANGED" + } + }, + "FINDING_REPORTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FINDING_REPORTED" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OTHER" + } + } } }, "com.amazonaws.inspector#InspectorService": { @@ -3065,52 +3524,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3118,13 +3581,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3134,224 +3606,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } ] } ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://inspector-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://inspector-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://inspector-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://inspector-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://inspector.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://inspector.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://inspector.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://inspector.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3366,8 +3789,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3379,8 +3802,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3392,8 +3815,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3405,8 +3828,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3418,8 +3841,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3431,8 +3854,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3444,8 +3867,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3457,8 +3880,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3470,8 +3893,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3483,8 +3906,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3496,8 +3919,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3509,8 +3932,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3522,8 +3945,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3535,8 +3958,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3548,8 +3971,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3561,8 +3984,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3574,8 +3997,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3587,8 +4010,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3600,8 +4023,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3613,8 +4036,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3626,8 +4049,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3639,8 +4062,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3652,8 +4075,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3665,8 +4088,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3678,8 +4101,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3691,8 +4114,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3704,8 +4127,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3717,8 +4140,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -3730,8 +4164,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3743,8 +4188,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3756,8 +4212,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3769,8 +4236,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3782,8 +4249,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3795,8 +4262,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3807,8 +4274,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3819,10 +4286,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3881,18 +4354,20 @@ } }, "com.amazonaws.inspector#InvalidCrossAccountRoleErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP", - "name": "ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP" - }, - { - "value": "ROLE_DOES_NOT_HAVE_CORRECT_POLICY", - "name": "ROLE_DOES_NOT_HAVE_CORRECT_POLICY" + "type": "enum", + "members": { + "ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP" } - ] + }, + "ROLE_DOES_NOT_HAVE_CORRECT_POLICY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLE_DOES_NOT_HAVE_CORRECT_POLICY" + } + } } }, "com.amazonaws.inspector#InvalidCrossAccountRoleException": { @@ -3908,244 +4383,350 @@ "errorCode": { "target": "com.amazonaws.inspector#InvalidCrossAccountRoleErrorCode", "traits": { - "smithy.api#documentation": "

Code that indicates the type of error that is generated.

", - "smithy.api#required": {} + "smithy.api#documentation": "

Code that indicates the type of error that is generated.

", + "smithy.api#required": {} + } + }, + "canRetry": { + "target": "com.amazonaws.inspector#Bool", + "traits": { + "smithy.api#documentation": "

You can immediately retry your request.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Amazon Inspector cannot assume the cross-account role that it needs to list your EC2\n instances during the assessment run.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.inspector#InvalidInputErrorCode": { + "type": "enum", + "members": { + "INVALID_ASSESSMENT_TARGET_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_TARGET_ARN" + } + }, + "INVALID_ASSESSMENT_TEMPLATE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_TEMPLATE_ARN" + } + }, + "INVALID_ASSESSMENT_RUN_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_RUN_ARN" + } + }, + "INVALID_FINDING_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_FINDING_ARN" + } + }, + "INVALID_RESOURCE_GROUP_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_RESOURCE_GROUP_ARN" + } + }, + "INVALID_RULES_PACKAGE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_RULES_PACKAGE_ARN" + } + }, + "INVALID_RESOURCE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_RESOURCE_ARN" + } + }, + "INVALID_SNS_TOPIC_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_SNS_TOPIC_ARN" + } + }, + "INVALID_IAM_ROLE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_IAM_ROLE_ARN" + } + }, + "INVALID_ASSESSMENT_TARGET_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_TARGET_NAME" + } + }, + "INVALID_ASSESSMENT_TARGET_NAME_PATTERN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_TARGET_NAME_PATTERN" + } + }, + "INVALID_ASSESSMENT_TEMPLATE_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_TEMPLATE_NAME" + } + }, + "INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN" + } + }, + "INVALID_ASSESSMENT_TEMPLATE_DURATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_TEMPLATE_DURATION" + } + }, + "INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE" + } + }, + "INVALID_ASSESSMENT_RUN_DURATION_RANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_RUN_DURATION_RANGE" + } + }, + "INVALID_ASSESSMENT_RUN_START_TIME_RANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_RUN_START_TIME_RANGE" + } + }, + "INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE" + } + }, + "INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE" + } + }, + "INVALID_ASSESSMENT_RUN_STATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ASSESSMENT_RUN_STATE" + } + }, + "INVALID_TAG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_TAG" + } + }, + "INVALID_TAG_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_TAG_KEY" + } + }, + "INVALID_TAG_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_TAG_VALUE" + } + }, + "INVALID_RESOURCE_GROUP_TAG_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_RESOURCE_GROUP_TAG_KEY" + } + }, + "INVALID_RESOURCE_GROUP_TAG_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_RESOURCE_GROUP_TAG_VALUE" + } + }, + "INVALID_ATTRIBUTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ATTRIBUTE" + } + }, + "INVALID_USER_ATTRIBUTE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_USER_ATTRIBUTE" + } + }, + "INVALID_USER_ATTRIBUTE_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_USER_ATTRIBUTE_KEY" + } + }, + "INVALID_USER_ATTRIBUTE_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_USER_ATTRIBUTE_VALUE" + } + }, + "INVALID_PAGINATION_TOKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_PAGINATION_TOKEN" + } + }, + "INVALID_MAX_RESULTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_MAX_RESULTS" + } + }, + "INVALID_AGENT_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_AGENT_ID" + } + }, + "INVALID_AUTO_SCALING_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_AUTO_SCALING_GROUP" + } + }, + "INVALID_RULE_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_RULE_NAME" + } + }, + "INVALID_SEVERITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_SEVERITY" + } + }, + "INVALID_LOCALE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_LOCALE" + } + }, + "INVALID_EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_EVENT" + } + }, + "ASSESSMENT_TARGET_NAME_ALREADY_TAKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_TARGET_NAME_ALREADY_TAKEN" + } + }, + "ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN" + } + }, + "INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS" + } + }, + "INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS" + } + }, + "INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS" + } + }, + "INVALID_NUMBER_OF_FINDING_ARNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_FINDING_ARNS" + } + }, + "INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS" + } + }, + "INVALID_NUMBER_OF_RULES_PACKAGE_ARNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_RULES_PACKAGE_ARNS" + } + }, + "INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES" + } + }, + "INVALID_NUMBER_OF_TAGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_TAGS" + } + }, + "INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS" + } + }, + "INVALID_NUMBER_OF_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_ATTRIBUTES" + } + }, + "INVALID_NUMBER_OF_USER_ATTRIBUTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_USER_ATTRIBUTES" + } + }, + "INVALID_NUMBER_OF_AGENT_IDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_AGENT_IDS" + } + }, + "INVALID_NUMBER_OF_AUTO_SCALING_GROUPS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_AUTO_SCALING_GROUPS" + } + }, + "INVALID_NUMBER_OF_RULE_NAMES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_NUMBER_OF_RULE_NAMES" } }, - "canRetry": { - "target": "com.amazonaws.inspector#Bool", + "INVALID_NUMBER_OF_SEVERITIES": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

You can immediately retry your request.

", - "smithy.api#required": {} + "smithy.api#enumValue": "INVALID_NUMBER_OF_SEVERITIES" } } - }, - "traits": { - "smithy.api#documentation": "

Amazon Inspector cannot assume the cross-account role that it needs to list your EC2\n instances during the assessment run.

", - "smithy.api#error": "client" - } - }, - "com.amazonaws.inspector#InvalidInputErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INVALID_ASSESSMENT_TARGET_ARN", - "name": "INVALID_ASSESSMENT_TARGET_ARN" - }, - { - "value": "INVALID_ASSESSMENT_TEMPLATE_ARN", - "name": "INVALID_ASSESSMENT_TEMPLATE_ARN" - }, - { - "value": "INVALID_ASSESSMENT_RUN_ARN", - "name": "INVALID_ASSESSMENT_RUN_ARN" - }, - { - "value": "INVALID_FINDING_ARN", - "name": "INVALID_FINDING_ARN" - }, - { - "value": "INVALID_RESOURCE_GROUP_ARN", - "name": "INVALID_RESOURCE_GROUP_ARN" - }, - { - "value": "INVALID_RULES_PACKAGE_ARN", - "name": "INVALID_RULES_PACKAGE_ARN" - }, - { - "value": "INVALID_RESOURCE_ARN", - "name": "INVALID_RESOURCE_ARN" - }, - { - "value": "INVALID_SNS_TOPIC_ARN", - "name": "INVALID_SNS_TOPIC_ARN" - }, - { - "value": "INVALID_IAM_ROLE_ARN", - "name": "INVALID_IAM_ROLE_ARN" - }, - { - "value": "INVALID_ASSESSMENT_TARGET_NAME", - "name": "INVALID_ASSESSMENT_TARGET_NAME" - }, - { - "value": "INVALID_ASSESSMENT_TARGET_NAME_PATTERN", - "name": "INVALID_ASSESSMENT_TARGET_NAME_PATTERN" - }, - { - "value": "INVALID_ASSESSMENT_TEMPLATE_NAME", - "name": "INVALID_ASSESSMENT_TEMPLATE_NAME" - }, - { - "value": "INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN", - "name": "INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN" - }, - { - "value": "INVALID_ASSESSMENT_TEMPLATE_DURATION", - "name": "INVALID_ASSESSMENT_TEMPLATE_DURATION" - }, - { - "value": "INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE", - "name": "INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE" - }, - { - "value": "INVALID_ASSESSMENT_RUN_DURATION_RANGE", - "name": "INVALID_ASSESSMENT_RUN_DURATION_RANGE" - }, - { - "value": "INVALID_ASSESSMENT_RUN_START_TIME_RANGE", - "name": "INVALID_ASSESSMENT_RUN_START_TIME_RANGE" - }, - { - "value": "INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE", - "name": "INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE" - }, - { - "value": "INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE", - "name": "INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE" - }, - { - "value": "INVALID_ASSESSMENT_RUN_STATE", - "name": "INVALID_ASSESSMENT_RUN_STATE" - }, - { - "value": "INVALID_TAG", - "name": "INVALID_TAG" - }, - { - "value": "INVALID_TAG_KEY", - "name": "INVALID_TAG_KEY" - }, - { - "value": "INVALID_TAG_VALUE", - "name": "INVALID_TAG_VALUE" - }, - { - "value": "INVALID_RESOURCE_GROUP_TAG_KEY", - "name": "INVALID_RESOURCE_GROUP_TAG_KEY" - }, - { - "value": "INVALID_RESOURCE_GROUP_TAG_VALUE", - "name": "INVALID_RESOURCE_GROUP_TAG_VALUE" - }, - { - "value": "INVALID_ATTRIBUTE", - "name": "INVALID_ATTRIBUTE" - }, - { - "value": "INVALID_USER_ATTRIBUTE", - "name": "INVALID_USER_ATTRIBUTE" - }, - { - "value": "INVALID_USER_ATTRIBUTE_KEY", - "name": "INVALID_USER_ATTRIBUTE_KEY" - }, - { - "value": "INVALID_USER_ATTRIBUTE_VALUE", - "name": "INVALID_USER_ATTRIBUTE_VALUE" - }, - { - "value": "INVALID_PAGINATION_TOKEN", - "name": "INVALID_PAGINATION_TOKEN" - }, - { - "value": "INVALID_MAX_RESULTS", - "name": "INVALID_MAX_RESULTS" - }, - { - "value": "INVALID_AGENT_ID", - "name": "INVALID_AGENT_ID" - }, - { - "value": "INVALID_AUTO_SCALING_GROUP", - "name": "INVALID_AUTO_SCALING_GROUP" - }, - { - "value": "INVALID_RULE_NAME", - "name": "INVALID_RULE_NAME" - }, - { - "value": "INVALID_SEVERITY", - "name": "INVALID_SEVERITY" - }, - { - "value": "INVALID_LOCALE", - "name": "INVALID_LOCALE" - }, - { - "value": "INVALID_EVENT", - "name": "INVALID_EVENT" - }, - { - "value": "ASSESSMENT_TARGET_NAME_ALREADY_TAKEN", - "name": "ASSESSMENT_TARGET_NAME_ALREADY_TAKEN" - }, - { - "value": "ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN", - "name": "ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN" - }, - { - "value": "INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS", - "name": "INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS" - }, - { - "value": "INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS", - "name": "INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS" - }, - { - "value": "INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS", - "name": "INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS" - }, - { - "value": "INVALID_NUMBER_OF_FINDING_ARNS", - "name": "INVALID_NUMBER_OF_FINDING_ARNS" - }, - { - "value": "INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS", - "name": "INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS" - }, - { - "value": "INVALID_NUMBER_OF_RULES_PACKAGE_ARNS", - "name": "INVALID_NUMBER_OF_RULES_PACKAGE_ARNS" - }, - { - "value": "INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES", - "name": "INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES" - }, - { - "value": "INVALID_NUMBER_OF_TAGS", - "name": "INVALID_NUMBER_OF_TAGS" - }, - { - "value": "INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS", - "name": "INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS" - }, - { - "value": "INVALID_NUMBER_OF_ATTRIBUTES", - "name": "INVALID_NUMBER_OF_ATTRIBUTES" - }, - { - "value": "INVALID_NUMBER_OF_USER_ATTRIBUTES", - "name": "INVALID_NUMBER_OF_USER_ATTRIBUTES" - }, - { - "value": "INVALID_NUMBER_OF_AGENT_IDS", - "name": "INVALID_NUMBER_OF_AGENT_IDS" - }, - { - "value": "INVALID_NUMBER_OF_AUTO_SCALING_GROUPS", - "name": "INVALID_NUMBER_OF_AUTO_SCALING_GROUPS" - }, - { - "value": "INVALID_NUMBER_OF_RULE_NAMES", - "name": "INVALID_NUMBER_OF_RULE_NAMES" - }, - { - "value": "INVALID_NUMBER_OF_SEVERITIES", - "name": "INVALID_NUMBER_OF_SEVERITIES" - } - ] } }, "com.amazonaws.inspector#InvalidInputException": { @@ -4225,30 +4806,38 @@ } }, "com.amazonaws.inspector#LimitExceededErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ASSESSMENT_TARGET_LIMIT_EXCEEDED", - "name": "ASSESSMENT_TARGET_LIMIT_EXCEEDED" - }, - { - "value": "ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED", - "name": "ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED" - }, - { - "value": "ASSESSMENT_RUN_LIMIT_EXCEEDED", - "name": "ASSESSMENT_RUN_LIMIT_EXCEEDED" - }, - { - "value": "RESOURCE_GROUP_LIMIT_EXCEEDED", - "name": "RESOURCE_GROUP_LIMIT_EXCEEDED" - }, - { - "value": "EVENT_SUBSCRIPTION_LIMIT_EXCEEDED", - "name": "EVENT_SUBSCRIPTION_LIMIT_EXCEEDED" + "type": "enum", + "members": { + "ASSESSMENT_TARGET_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_TARGET_LIMIT_EXCEEDED" } - ] + }, + "ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED" + } + }, + "ASSESSMENT_RUN_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_RUN_LIMIT_EXCEEDED" + } + }, + "RESOURCE_GROUP_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESOURCE_GROUP_LIMIT_EXCEEDED" + } + }, + "EVENT_SUBSCRIPTION_LIMIT_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT_SUBSCRIPTION_LIMIT_EXCEEDED" + } + } } }, "com.amazonaws.inspector#LimitExceededException": { @@ -4305,6 +4894,174 @@ ], "traits": { "smithy.api#documentation": "

Lists the agents of the assessment runs that are specified by the ARNs of the\n assessment runs.

", + "smithy.api#examples": [ + { + "title": "List assessment run agents", + "documentation": "Lists the agents of the assessment runs that are specified by the ARNs of the assessment runs.", + "input": { + "assessmentRunArn": "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", + "maxResults": 123 + }, + "output": { + "assessmentRunAgents": [ + { + "agentHealth": "HEALTHY", + "agentHealthCode": "RUNNING", + "agentId": "i-49113b93", + "assessmentRunArn": "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", + "telemetryMetadata": [ + { + "count": 2, + "dataSize": 345, + "messageType": "InspectorDuplicateProcess" + }, + { + "count": 3, + "dataSize": 255, + "messageType": "InspectorTimeEventMsg" + }, + { + "count": 4, + "dataSize": 1082, + "messageType": "InspectorNetworkInterface" + }, + { + "count": 2, + "dataSize": 349, + "messageType": "InspectorDnsEntry" + }, + { + "count": 11, + "dataSize": 2514, + "messageType": "InspectorDirectoryInfoMsg" + }, + { + "count": 1, + "dataSize": 179, + "messageType": "InspectorTcpV6ListeningPort" + }, + { + "count": 101, + "dataSize": 10949, + "messageType": "InspectorTerminal" + }, + { + "count": 26, + "dataSize": 5916, + "messageType": "InspectorUser" + }, + { + "count": 282, + "dataSize": 32148, + "messageType": "InspectorDynamicallyLoadedCodeModule" + }, + { + "count": 18, + "dataSize": 10172, + "messageType": "InspectorCreateProcess" + }, + { + "count": 3, + "dataSize": 8001, + "messageType": "InspectorProcessPerformance" + }, + { + "count": 1, + "dataSize": 360, + "messageType": "InspectorOperatingSystem" + }, + { + "count": 6, + "dataSize": 546, + "messageType": "InspectorStopProcess" + }, + { + "count": 1, + "dataSize": 1553, + "messageType": "InspectorInstanceMetaData" + }, + { + "count": 2, + "dataSize": 434, + "messageType": "InspectorTcpV4Connection" + }, + { + "count": 474, + "dataSize": 2960322, + "messageType": "InspectorPackageInfo" + }, + { + "count": 3, + "dataSize": 2235, + "messageType": "InspectorSystemPerformance" + }, + { + "count": 105, + "dataSize": 46048, + "messageType": "InspectorCodeModule" + }, + { + "count": 1, + "dataSize": 182, + "messageType": "InspectorUdpV6ListeningPort" + }, + { + "count": 2, + "dataSize": 371, + "messageType": "InspectorUdpV4ListeningPort" + }, + { + "count": 18, + "dataSize": 8362, + "messageType": "InspectorKernelModule" + }, + { + "count": 29, + "dataSize": 48788, + "messageType": "InspectorConfigurationInfo" + }, + { + "count": 1, + "dataSize": 79, + "messageType": "InspectorMonitoringStart" + }, + { + "count": 5, + "dataSize": 0, + "messageType": "InspectorSplitMsgBegin" + }, + { + "count": 51, + "dataSize": 4593, + "messageType": "InspectorGroup" + }, + { + "count": 1, + "dataSize": 184, + "messageType": "InspectorTcpV4ListeningPort" + }, + { + "count": 1159, + "dataSize": 3146579, + "messageType": "Total" + }, + { + "count": 5, + "dataSize": 0, + "messageType": "InspectorSplitMsgEnd" + }, + { + "count": 1, + "dataSize": 612, + "messageType": "InspectorLoadImageInProcess" + } + ] + } + ], + "nextToken": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4340,6 +5097,9 @@ "smithy.api#documentation": "

You can use this parameter to indicate the maximum number of items that you want in\n the response. The default value is 10. The maximum value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#ListAssessmentRunAgentsResponse": { @@ -4358,6 +5118,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameter is\n present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more\n data to be listed, this parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#ListAssessmentRuns": { @@ -4384,6 +5147,25 @@ ], "traits": { "smithy.api#documentation": "

Lists the assessment runs that correspond to the assessment templates that are\n specified by the ARNs of the assessment templates.

", + "smithy.api#examples": [ + { + "title": "List assessment runs", + "documentation": "Lists the assessment runs that correspond to the assessment templates that are specified by the ARNs of the assessment templates.", + "input": { + "assessmentTemplateArns": [ + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw" + ], + "maxResults": 123 + }, + "output": { + "assessmentRunArns": [ + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE", + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-v5D6fI3v" + ], + "nextToken": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4418,6 +5200,9 @@ "smithy.api#documentation": "

You can use this parameter to indicate the maximum number of items that you want in\n the response. The default value is 10. The maximum value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#ListAssessmentRunsResponse": { @@ -4436,6 +5221,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameter is\n present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more\n data to be listed, this parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#ListAssessmentTargets": { @@ -4459,6 +5247,21 @@ ], "traits": { "smithy.api#documentation": "

Lists the ARNs of the assessment targets within this AWS account. For more\n information about assessment targets, see Amazon Inspector Assessment\n Targets.

", + "smithy.api#examples": [ + { + "title": "List assessment targets", + "documentation": "Lists the ARNs of the assessment targets within this AWS account. ", + "input": { + "maxResults": 123 + }, + "output": { + "assessmentTargetArns": [ + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq" + ], + "nextToken": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4487,6 +5290,9 @@ "smithy.api#documentation": "

You can use this parameter to indicate the maximum number of items you want in the\n response. The default value is 10. The maximum value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#ListAssessmentTargetsResponse": { @@ -4505,6 +5311,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameter is\n present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more\n data to be listed, this parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#ListAssessmentTemplates": { @@ -4531,6 +5340,25 @@ ], "traits": { "smithy.api#documentation": "

Lists the assessment templates that correspond to the assessment targets that are\n specified by the ARNs of the assessment targets.

", + "smithy.api#examples": [ + { + "title": "List assessment templates", + "documentation": "Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.", + "input": { + "assessmentTargetArns": [ + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq" + ], + "maxResults": 123 + }, + "output": { + "assessmentTemplateArns": [ + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw", + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-Uza6ihLh" + ], + "nextToken": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4565,6 +5393,9 @@ "smithy.api#documentation": "

You can use this parameter to indicate the maximum number of items you want in the\n response. The default value is 10. The maximum value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#ListAssessmentTemplatesResponse": { @@ -4583,6 +5414,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameter is\n present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more\n data to be listed, this parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#ListEventSubscriptions": { @@ -4640,6 +5474,9 @@ "smithy.api#documentation": "

You can use this parameter to indicate the maximum number of items you want in the\n response. The default value is 10. The maximum value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#ListEventSubscriptionsResponse": { @@ -4658,6 +5495,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameter is\n present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more\n data to be listed, this parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#ListExclusions": { @@ -4713,6 +5553,9 @@ "smithy.api#documentation": "

You can use this parameter to indicate the maximum number of items you want in the\n response. The default value is 100. The maximum value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#ListExclusionsResponse": { @@ -4731,6 +5574,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameters is\n present in the response and contains the value to use for the nextToken parameter in a\n subsequent pagination request. If there is no more data to be listed, this parameter is set\n to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#ListFindings": { @@ -4757,6 +5603,25 @@ ], "traits": { "smithy.api#documentation": "

Lists findings that are generated by the assessment runs that are specified by the\n ARNs of the assessment runs.

", + "smithy.api#examples": [ + { + "title": "List findings", + "documentation": "Lists findings that are generated by the assessment runs that are specified by the ARNs of the assessment runs.", + "input": { + "assessmentRunArns": [ + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE" + ], + "maxResults": 123 + }, + "output": { + "findingArns": [ + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-MKkpXXPE/finding/0-HwPnsDm4", + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-4r1V2mAw/run/0-v5D6fI3v/finding/0-tyvmqBLy" + ], + "nextToken": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4791,6 +5656,9 @@ "smithy.api#documentation": "

You can use this parameter to indicate the maximum number of items you want in the\n response. The default value is 10. The maximum value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#ListFindingsResponse": { @@ -4809,6 +5677,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameter is\n present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more\n data to be listed, this parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#ListMaxResults": { @@ -4859,6 +5730,24 @@ ], "traits": { "smithy.api#documentation": "

Lists all available Amazon Inspector rules packages.

", + "smithy.api#examples": [ + { + "title": "List rules packages", + "documentation": "Lists all available Amazon Inspector rules packages.", + "input": { + "maxResults": 123 + }, + "output": { + "rulesPackageArns": [ + "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-9hgA516p", + "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-H5hpSawc", + "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-JJOtZiqQ", + "arn:aws:inspector:us-west-2:758058086616:rulespackage/0-vg5GGHSD" + ], + "nextToken": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -4881,6 +5770,9 @@ "smithy.api#documentation": "

You can use this parameter to indicate the maximum number of items you want in the\n response. The default value is 10. The maximum value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#ListRulesPackagesResponse": { @@ -4899,6 +5791,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameter is\n present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more\n data to be listed, this parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#ListTagsForResource": { @@ -4924,7 +5819,24 @@ } ], "traits": { - "smithy.api#documentation": "

Lists all tags associated with an assessment template.

" + "smithy.api#documentation": "

Lists all tags associated with an assessment template.

", + "smithy.api#examples": [ + { + "title": "List tags for resource", + "documentation": "Lists all tags associated with an assessment template.", + "input": { + "resourceArn": "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-gcwFliYu" + }, + "output": { + "tags": [ + { + "key": "Name", + "value": "Example" + } + ] + } + } + ] } }, "com.amazonaws.inspector#ListTagsForResourceRequest": { @@ -4937,6 +5849,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#ListTagsForResourceResponse": { @@ -4949,17 +5864,20 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#Locale": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EN_US", - "name": "EN_US" + "type": "enum", + "members": { + "EN_US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EN_US" } - ] + } } }, "com.amazonaws.inspector#Long": { @@ -5067,42 +5985,56 @@ } }, "com.amazonaws.inspector#NoSuchEntityErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ASSESSMENT_TARGET_DOES_NOT_EXIST", - "name": "ASSESSMENT_TARGET_DOES_NOT_EXIST" - }, - { - "value": "ASSESSMENT_TEMPLATE_DOES_NOT_EXIST", - "name": "ASSESSMENT_TEMPLATE_DOES_NOT_EXIST" - }, - { - "value": "ASSESSMENT_RUN_DOES_NOT_EXIST", - "name": "ASSESSMENT_RUN_DOES_NOT_EXIST" - }, - { - "value": "FINDING_DOES_NOT_EXIST", - "name": "FINDING_DOES_NOT_EXIST" - }, - { - "value": "RESOURCE_GROUP_DOES_NOT_EXIST", - "name": "RESOURCE_GROUP_DOES_NOT_EXIST" - }, - { - "value": "RULES_PACKAGE_DOES_NOT_EXIST", - "name": "RULES_PACKAGE_DOES_NOT_EXIST" - }, - { - "value": "SNS_TOPIC_DOES_NOT_EXIST", - "name": "SNS_TOPIC_DOES_NOT_EXIST" - }, - { - "value": "IAM_ROLE_DOES_NOT_EXIST", - "name": "IAM_ROLE_DOES_NOT_EXIST" + "type": "enum", + "members": { + "ASSESSMENT_TARGET_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_TARGET_DOES_NOT_EXIST" } - ] + }, + "ASSESSMENT_TEMPLATE_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_TEMPLATE_DOES_NOT_EXIST" + } + }, + "ASSESSMENT_RUN_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSESSMENT_RUN_DOES_NOT_EXIST" + } + }, + "FINDING_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FINDING_DOES_NOT_EXIST" + } + }, + "RESOURCE_GROUP_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESOURCE_GROUP_DOES_NOT_EXIST" + } + }, + "RULES_PACKAGE_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RULES_PACKAGE_DOES_NOT_EXIST" + } + }, + "SNS_TOPIC_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNS_TOPIC_DOES_NOT_EXIST" + } + }, + "IAM_ROLE_DOES_NOT_EXIST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IAM_ROLE_DOES_NOT_EXIST" + } + } } }, "com.amazonaws.inspector#NoSuchEntityException": { @@ -5199,6 +6131,24 @@ ], "traits": { "smithy.api#documentation": "

Previews the agents installed on the EC2 instances that are part of the specified\n assessment target.

", + "smithy.api#examples": [ + { + "title": "Preview agents", + "documentation": "Previews the agents installed on the EC2 instances that are part of the specified assessment target.", + "input": { + "previewAgentsArn": "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq", + "maxResults": 123 + }, + "output": { + "agentPreviews": [ + { + "agentId": "i-49113b93" + } + ], + "nextToken": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", @@ -5231,6 +6181,9 @@ "smithy.api#documentation": "

You can use this parameter to indicate the maximum number of items you want in the\n response. The default value is 10. The maximum value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#PreviewAgentsResponse": { @@ -5249,6 +6202,9 @@ "smithy.api#documentation": "

When a response is generated, if there is more data to be listed, this parameter is\n present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more\n data to be listed, this parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#PreviewGenerationInProgressException": { @@ -5267,18 +6223,20 @@ } }, "com.amazonaws.inspector#PreviewStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "WORK_IN_PROGRESS", - "name": "WORK_IN_PROGRESS" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" + "type": "enum", + "members": { + "WORK_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORK_IN_PROGRESS" } - ] + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + } } }, "com.amazonaws.inspector#PrivateIp": { @@ -5342,7 +6300,16 @@ } ], "traits": { - "smithy.api#documentation": "

Registers the IAM role that grants Amazon Inspector access to AWS Services needed to\n perform security assessments.

" + "smithy.api#documentation": "

Registers the IAM role that grants Amazon Inspector access to AWS Services needed to\n perform security assessments.

", + "smithy.api#examples": [ + { + "title": "Register cross account access role", + "documentation": "Registers the IAM role that Amazon Inspector uses to list your EC2 instances at the start of the assessment run or when you call the PreviewAgents action.", + "input": { + "roleArn": "arn:aws:iam::123456789012:role/inspector" + } + } + ] } }, "com.amazonaws.inspector#RegisterCrossAccountAccessRoleRequest": { @@ -5355,6 +6322,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#RemoveAttributesFromFindings": { @@ -5383,7 +6353,24 @@ } ], "traits": { - "smithy.api#documentation": "

Removes entire attributes (key and value pairs) from the findings that are specified\n by the ARNs of the findings where an attribute with the specified key exists.

" + "smithy.api#documentation": "

Removes entire attributes (key and value pairs) from the findings that are specified\n by the ARNs of the findings where an attribute with the specified key exists.

", + "smithy.api#examples": [ + { + "title": "Remove attributes from findings", + "documentation": "Removes entire attributes (key and value pairs) from the findings that are specified by the ARNs of the findings where an attribute with the specified key exists.", + "input": { + "findingArns": [ + "arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-8l1VIE0D/run/0-Z02cjjug/finding/0-T8yM9mEU" + ], + "attributeKeys": [ + "key=Example,value=example" + ] + }, + "output": { + "failedItems": {} + } + } + ] } }, "com.amazonaws.inspector#RemoveAttributesFromFindingsRequest": { @@ -5403,6 +6390,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#RemoveAttributesFromFindingsResponse": { @@ -5415,55 +6405,66 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#ReportFileFormat": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "HTML", - "name": "HTML" - }, - { - "value": "PDF", - "name": "PDF" + "type": "enum", + "members": { + "HTML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HTML" } - ] + }, + "PDF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PDF" + } + } } }, "com.amazonaws.inspector#ReportStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "WORK_IN_PROGRESS", - "name": "WORK_IN_PROGRESS" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" + "type": "enum", + "members": { + "WORK_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORK_IN_PROGRESS" } - ] + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + } } }, "com.amazonaws.inspector#ReportType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "FINDING", - "name": "FINDING" - }, - { - "value": "FULL", - "name": "FULL" + "type": "enum", + "members": { + "FINDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FINDING" } - ] + }, + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL" + } + } } }, "com.amazonaws.inspector#ResourceGroup": { @@ -5656,18 +6657,20 @@ } }, "com.amazonaws.inspector#ScopeType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INSTANCE_ID", - "name": "INSTANCE_ID" - }, - { - "value": "RULES_PACKAGE_ARN", - "name": "RULES_PACKAGE_ARN" + "type": "enum", + "members": { + "INSTANCE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INSTANCE_ID" } - ] + }, + "RULES_PACKAGE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RULES_PACKAGE_ARN" + } + } } }, "com.amazonaws.inspector#ScopeValue": { @@ -5758,7 +6761,22 @@ } ], "traits": { - "smithy.api#documentation": "

Sets tags (key and value pairs) to the assessment template that is specified by the\n ARN of the assessment template.

" + "smithy.api#documentation": "

Sets tags (key and value pairs) to the assessment template that is specified by the\n ARN of the assessment template.

", + "smithy.api#examples": [ + { + "title": "Set tags for resource", + "documentation": "Sets tags (key and value pairs) to the assessment template that is specified by the ARN of the assessment template.", + "input": { + "resourceArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0", + "tags": [ + { + "key": "Example", + "value": "example" + } + ] + } + } + ] } }, "com.amazonaws.inspector#SetTagsForResourceRequest": { @@ -5777,33 +6795,44 @@ "smithy.api#documentation": "

A collection of key and value pairs that you want to set to the assessment\n template.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#Severity": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Low", - "name": "LOW" - }, - { - "value": "Medium", - "name": "MEDIUM" - }, - { - "value": "High", - "name": "HIGH" - }, - { - "value": "Informational", - "name": "INFORMATIONAL" - }, - { - "value": "Undefined", - "name": "UNDEFINED" + "type": "enum", + "members": { + "LOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Low" } - ] + }, + "MEDIUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Medium" + } + }, + "HIGH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "High" + } + }, + "INFORMATIONAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Informational" + } + }, + "UNDEFINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Undefined" + } + } } }, "com.amazonaws.inspector#SeverityList": { @@ -5853,7 +6882,20 @@ } ], "traits": { - "smithy.api#documentation": "

Starts the assessment run specified by the ARN of the assessment template. For this\n API to function properly, you must not exceed the limit of running up to 500 concurrent\n agents per AWS account.

" + "smithy.api#documentation": "

Starts the assessment run specified by the ARN of the assessment template. For this\n API to function properly, you must not exceed the limit of running up to 500 concurrent\n agents per AWS account.

", + "smithy.api#examples": [ + { + "title": "Start assessment run", + "documentation": "Starts the assessment run specified by the ARN of the assessment template. For this API to function properly, you must not exceed the limit of running up to 500 concurrent agents per AWS account.", + "input": { + "assessmentTemplateArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T", + "assessmentRunName": "examplerun" + }, + "output": { + "assessmentRunArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T/run/0-jOoroxyY" + } + } + ] } }, "com.amazonaws.inspector#StartAssessmentRunRequest": { @@ -5872,6 +6914,9 @@ "smithy.api#documentation": "

You can specify the name for the assessment run. The name must be unique for the\n assessment template whose ARN is used to start the assessment run.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#StartAssessmentRunResponse": { @@ -5884,21 +6929,26 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.inspector#StopAction": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "START_EVALUATION", - "name": "START_EVALUATION" - }, - { - "value": "SKIP_EVALUATION", - "name": "SKIP_EVALUATION" + "type": "enum", + "members": { + "START_EVALUATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "START_EVALUATION" } - ] + }, + "SKIP_EVALUATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SKIP_EVALUATION" + } + } } }, "com.amazonaws.inspector#StopAssessmentRun": { @@ -5927,7 +6977,16 @@ } ], "traits": { - "smithy.api#documentation": "

Stops the assessment run that is specified by the ARN of the assessment\n run.

" + "smithy.api#documentation": "

Stops the assessment run that is specified by the ARN of the assessment\n run.

", + "smithy.api#examples": [ + { + "title": "Stop assessment run", + "documentation": "Stops the assessment run that is specified by the ARN of the assessment run.", + "input": { + "assessmentRunArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-it5r2S4T/run/0-11LMTAVe" + } + } + ] } }, "com.amazonaws.inspector#StopAssessmentRunRequest": { @@ -5946,6 +7005,9 @@ "smithy.api#documentation": "

An input option that can be set to either START_EVALUATION or SKIP_EVALUATION.\n START_EVALUATION (the default value), stops the AWS agent from collecting data and begins\n the results evaluation and the findings generation process. SKIP_EVALUATION cancels the\n assessment run immediately, after which no findings are generated.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#SubscribeToEvent": { @@ -5977,7 +7039,18 @@ } ], "traits": { - "smithy.api#documentation": "

Enables the process of sending Amazon Simple Notification Service (SNS) notifications\n about a specified event to a specified SNS topic.

" + "smithy.api#documentation": "

Enables the process of sending Amazon Simple Notification Service (SNS) notifications\n about a specified event to a specified SNS topic.

", + "smithy.api#examples": [ + { + "title": "Subscribe to event", + "documentation": "Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.", + "input": { + "resourceArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0", + "event": "ASSESSMENT_RUN_COMPLETED", + "topicArn": "arn:aws:sns:us-west-2:123456789012:exampletopic" + } + } + ] } }, "com.amazonaws.inspector#SubscribeToEventRequest": { @@ -6004,6 +7077,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#Subscription": { @@ -6179,7 +7255,7 @@ "com.amazonaws.inspector#UUID": { "type": "string", "traits": { - "smithy.api#pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}" + "smithy.api#pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" } }, "com.amazonaws.inspector#UnsubscribeFromEvent": { @@ -6208,7 +7284,18 @@ } ], "traits": { - "smithy.api#documentation": "

Disables the process of sending Amazon Simple Notification Service (SNS)\n notifications about a specified event to a specified SNS topic.

" + "smithy.api#documentation": "

Disables the process of sending Amazon Simple Notification Service (SNS)\n notifications about a specified event to a specified SNS topic.

", + "smithy.api#examples": [ + { + "title": "Unsubscribe from event", + "documentation": "Disables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.", + "input": { + "resourceArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0", + "event": "ASSESSMENT_RUN_COMPLETED", + "topicArn": "arn:aws:sns:us-west-2:123456789012:exampletopic" + } + } + ] } }, "com.amazonaws.inspector#UnsubscribeFromEventRequest": { @@ -6235,6 +7322,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#UnsupportedFeatureException": { @@ -6284,7 +7374,18 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the assessment target that is specified by the ARN of the assessment\n target.

\n

If resourceGroupArn is not specified, all EC2 instances in the current AWS account\n and region are included in the assessment target.

" + "smithy.api#documentation": "

Updates the assessment target that is specified by the ARN of the assessment\n target.

\n

If resourceGroupArn is not specified, all EC2 instances in the current AWS account\n and region are included in the assessment target.

", + "smithy.api#examples": [ + { + "title": "Update assessment target", + "documentation": "Updates the assessment target that is specified by the ARN of the assessment target.", + "input": { + "assessmentTargetArn": "arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX", + "assessmentTargetName": "Example", + "resourceGroupArn": "arn:aws:inspector:us-west-2:123456789012:resourcegroup/0-yNbgL5Pt" + } + } + ] } }, "com.amazonaws.inspector#UpdateAssessmentTargetRequest": { @@ -6310,6 +7411,9 @@ "smithy.api#documentation": "

The ARN of the resource group that is used to specify the new resource group to\n associate with the assessment target.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.inspector#Url": { diff --git a/codegen/sdk-codegen/aws-models/iot-1click-devices-service.json b/codegen/sdk-codegen/aws-models/iot-1click-devices-service.json index 4b35aed3dc6..598653219e8 100644 --- a/codegen/sdk-codegen/aws-models/iot-1click-devices-service.json +++ b/codegen/sdk-codegen/aws-models/iot-1click-devices-service.json @@ -72,6 +72,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#ClaimDevicesByClaimCodeResponse": { @@ -87,11 +90,13 @@ "Total": { "target": "com.amazonaws.iot1clickdevicesservice#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The total number of devices associated with the claim code that has been processed in\n the claim request.

", "smithy.api#jsonName": "total" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#DescribeDevice": { @@ -133,6 +138,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#DescribeDeviceResponse": { @@ -145,6 +153,9 @@ "smithy.api#jsonName": "deviceDescription" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#Device": { @@ -212,7 +223,6 @@ "Enabled": { "target": "com.amazonaws.iot1clickdevicesservice#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

A Boolean value indicating whether or not the device is enabled.

", "smithy.api#jsonName": "enabled" } @@ -220,7 +230,6 @@ "RemainingLife": { "target": "com.amazonaws.iot1clickdevicesservice#__doubleMin0Max100", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

A value between 0 and 1 inclusive, representing the fraction of life remaining for the\n device.

", "smithy.api#jsonName": "remainingLife" } @@ -331,6 +340,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#FinalizeDeviceClaimResponse": { @@ -343,6 +355,9 @@ "smithy.api#jsonName": "state" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#ForbiddenException": { @@ -407,6 +422,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#GetDeviceMethodsResponse": { @@ -419,6 +437,9 @@ "smithy.api#jsonName": "deviceMethods" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#InitiateDeviceClaim": { @@ -463,6 +484,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#InitiateDeviceClaimResponse": { @@ -475,6 +499,9 @@ "smithy.api#jsonName": "state" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#InternalFailureException": { @@ -585,6 +612,9 @@ "smithy.api#jsonName": "deviceMethodParameters" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#InvokeDeviceMethodResponse": { @@ -597,6 +627,9 @@ "smithy.api#jsonName": "deviceMethodResponse" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#IoT1ClickDevicesService": { @@ -649,6 +682,7 @@ "arnNamespace": "iot1click", "cloudFormationName": "IoT1ClickDevicesService", "cloudTrailEventSource": "iot1clickdevicesservice.amazonaws.com", + "docId": "devices-2018-05-14", "endpointPrefix": "devices.iot1click" }, "aws.auth#sigv4": { @@ -717,52 +751,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -770,13 +808,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -786,224 +833,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://devices.iot1click-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://devices.iot1click-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://devices.iot1click-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://devices.iot1click-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://devices.iot1click.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://devices.iot1click.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://devices.iot1click.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://devices.iot1click.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1018,8 +1016,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1031,8 +1029,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1044,8 +1042,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1057,8 +1055,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1070,8 +1068,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1083,8 +1081,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1096,8 +1094,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1109,8 +1107,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1122,8 +1120,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1135,8 +1133,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1148,8 +1146,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1161,8 +1159,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1174,8 +1183,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1187,8 +1207,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1200,8 +1231,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1213,8 +1255,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1226,8 +1268,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1239,8 +1281,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1251,8 +1293,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1263,10 +1305,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1326,7 +1374,6 @@ "MaxResults": { "target": "com.amazonaws.iot1clickdevicesservice#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The maximum number of results to return per request. If not set, a default value of\n 100 is used.

", "smithy.api#httpQuery": "maxResults" } @@ -1346,6 +1393,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#ListDeviceEventsResponse": { @@ -1365,6 +1415,9 @@ "smithy.api#jsonName": "nextToken" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#ListDevices": { @@ -1408,7 +1461,6 @@ "MaxResults": { "target": "com.amazonaws.iot1clickdevicesservice#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The maximum number of results to return per request. If not set, a default value of\n 100 is used.

", "smithy.api#httpQuery": "maxResults" } @@ -1420,6 +1472,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#ListDevicesResponse": { @@ -1439,6 +1494,9 @@ "smithy.api#jsonName": "nextToken" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#ListTagsForResource": { @@ -1477,6 +1535,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#ListTagsForResourceResponse": { @@ -1489,12 +1550,14 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#MaxResults": { "type": "integer", "traits": { - "smithy.api#default": 0, "smithy.api#range": { "min": 1, "max": 250 @@ -1640,6 +1703,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#UnclaimDevice": { @@ -1681,6 +1747,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#UnclaimDeviceResponse": { @@ -1693,6 +1762,9 @@ "smithy.api#jsonName": "state" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickdevicesservice#UntagResource": { @@ -1742,6 +1814,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#UpdateDeviceState": { @@ -1786,34 +1861,30 @@ "Enabled": { "target": "com.amazonaws.iot1clickdevicesservice#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

If true, the device is enabled. If false, the device is\n disabled.

", "smithy.api#jsonName": "enabled" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickdevicesservice#UpdateDeviceStateResponse": { "type": "structure", - "members": {} - }, - "com.amazonaws.iot1clickdevicesservice#__boolean": { - "type": "boolean", + "members": {}, "traits": { - "smithy.api#default": false + "smithy.api#output": {} } }, + "com.amazonaws.iot1clickdevicesservice#__boolean": { + "type": "boolean" + }, "com.amazonaws.iot1clickdevicesservice#__doubleMin0Max100": { - "type": "double", - "traits": { - "smithy.api#default": 0 - } + "type": "double" }, "com.amazonaws.iot1clickdevicesservice#__integer": { - "type": "integer", - "traits": { - "smithy.api#default": 0 - } + "type": "integer" }, "com.amazonaws.iot1clickdevicesservice#__listOfDeviceDescription": { "type": "list", diff --git a/codegen/sdk-codegen/aws-models/iot-1click-projects.json b/codegen/sdk-codegen/aws-models/iot-1click-projects.json index eb5532aebe6..941ea127e32 100644 --- a/codegen/sdk-codegen/aws-models/iot-1click-projects.json +++ b/codegen/sdk-codegen/aws-models/iot-1click-projects.json @@ -88,6 +88,7 @@ "arnNamespace": "iot1click", "cloudFormationName": "IoT1Click", "cloudTrailEventSource": "iot1clickprojects.amazonaws.com", + "docId": "iot1click-projects-2018-05-14", "endpointPrefix": "projects.iot1click" }, "aws.auth#sigv4": { @@ -156,52 +157,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -209,13 +214,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -225,224 +239,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://projects.iot1click-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://projects.iot1click-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://projects.iot1click-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://projects.iot1click-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://projects.iot1click.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://projects.iot1click.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://projects.iot1click.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://projects.iot1click.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -457,8 +422,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -470,8 +435,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -483,8 +448,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -496,8 +461,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -509,8 +474,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -522,8 +487,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -535,8 +500,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -548,8 +513,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -561,8 +526,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -574,8 +539,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -587,8 +552,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -600,8 +565,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -613,8 +578,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -626,8 +591,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -639,8 +604,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -652,8 +617,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -665,8 +630,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -678,8 +643,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -691,8 +667,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -704,8 +691,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -717,8 +715,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -730,8 +739,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -743,8 +752,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -756,8 +765,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -768,8 +777,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -780,10 +789,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -855,11 +870,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#AssociateDeviceWithPlacementResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iot1clickprojects#AttributeDefaultValue": { "type": "string", @@ -946,11 +967,17 @@ "smithy.api#documentation": "

Optional user-defined key/value pairs providing contextual data (such as location or\n function) for the placement.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#CreatePlacementResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iot1clickprojects#CreateProject": { "type": "operation", @@ -1008,11 +1035,17 @@ "smithy.api#documentation": "

Optional tags (metadata key/value pairs) to be associated with the project. For example,\n { {\"key1\": \"value1\", \"key2\": \"value2\"} }. For more information, see AWS Tagging\n Strategies.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#CreateProjectResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iot1clickprojects#DefaultPlacementAttributeMap": { "type": "map", @@ -1073,11 +1106,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#DeletePlacementResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iot1clickprojects#DeleteProject": { "type": "operation", @@ -1121,11 +1160,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#DeleteProjectResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iot1clickprojects#DescribePlacement": { "type": "operation", @@ -1174,6 +1219,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#DescribePlacementResponse": { @@ -1186,6 +1234,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickprojects#DescribeProject": { @@ -1227,6 +1278,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#DescribeProjectResponse": { @@ -1239,6 +1293,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickprojects#Description": { @@ -1401,11 +1458,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#DisassociateDeviceFromPlacementResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iot1clickprojects#GetDevicesInPlacement": { "type": "operation", @@ -1454,6 +1517,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#GetDevicesInPlacementResponse": { @@ -1466,6 +1532,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickprojects#InternalFailureException": { @@ -1571,6 +1640,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#ListPlacementsResponse": { @@ -1589,6 +1661,9 @@ "smithy.api#documentation": "

The token used to retrieve the next set of results - will be effectively empty if there\n are no further results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickprojects#ListProjects": { @@ -1639,6 +1714,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#ListProjectsResponse": { @@ -1657,6 +1735,9 @@ "smithy.api#documentation": "

The token used to retrieve the next set of results - will be effectively empty if there\n are no further results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickprojects#ListTagsForResource": { @@ -1698,6 +1779,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#ListTagsForResourceResponse": { @@ -1709,6 +1793,9 @@ "smithy.api#documentation": "

The tags (metadata key/value pairs) which you have assigned to the resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iot1clickprojects#MaxResults": { @@ -2099,11 +2186,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iot1clickprojects#TagValue": { "type": "string", @@ -2186,11 +2279,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iot1clickprojects#UpdatePlacement": { "type": "operation", @@ -2248,11 +2347,17 @@ "smithy.api#documentation": "

The user-defined object of attributes used to update the placement. The maximum number of\n key/value pairs is 50.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#UpdatePlacementResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iot1clickprojects#UpdateProject": { "type": "operation", @@ -2308,11 +2413,17 @@ "smithy.api#documentation": "

An object defining the project update. Once a project has been created, you cannot add\n device template names to the project. However, for a given placementTemplate, you\n can update the associated callbackOverrides for the device definition using this\n API.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iot1clickprojects#UpdateProjectResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } } } } diff --git a/codegen/sdk-codegen/aws-models/iot-data-plane.json b/codegen/sdk-codegen/aws-models/iot-data-plane.json index f6001924858..1a0d5601267 100644 --- a/codegen/sdk-codegen/aws-models/iot-data-plane.json +++ b/codegen/sdk-codegen/aws-models/iot-data-plane.json @@ -380,6 +380,7 @@ "arnNamespace": "iotdata", "cloudFormationName": "IoTDataPlane", "cloudTrailEventSource": "iotdataplane.amazonaws.com", + "docId": "iot-data-2015-05-28", "endpointPrefix": "data-ats.iot" }, "aws.auth#sigv4": { @@ -448,52 +449,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -501,13 +506,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -517,92 +531,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://data-ats.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://data-ats.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -611,242 +616,60 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "Region" + }, + "ca-central-1" ] } ], - "type": "tree", - "rules": [ + "endpoint": { + "url": "https://data.iot-fips.ca-central-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ca-central-1" - ] - } - ], - "endpoint": { - "url": "https://data.iot-fips.ca-central-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "https://data.iot-fips.us-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-2" - ] - } - ], - "endpoint": { - "url": "https://data.iot-fips.us-east-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-west-1" - ] - } - ], - "endpoint": { - "url": "https://data.iot-fips.us-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-west-2" - ] - } - ], - "endpoint": { - "url": "https://data.iot-fips.us-west-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://data.iot-fips.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + "fn": "stringEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://data.iot-fips.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "Region" }, - { - "conditions": [], - "endpoint": { - "url": "https://data-ats.iot-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "us-east-1" ] } - ] + ], + "endpoint": { + "url": "https://data.iot-fips.us-east-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } + "ref": "Region" + }, + "us-east-2" ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://data-ats.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://data.iot-fips.us-east-2.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] - }, - { - "conditions": [], - "type": "tree", - "rules": [ { "conditions": [ { @@ -855,12 +678,12 @@ { "ref": "Region" }, - "cn-north-1" + "us-west-1" ] } ], "endpoint": { - "url": "https://data.ats.iot.cn-north-1.amazonaws.com.cn", + "url": "https://data.iot-fips.us-west-1.amazonaws.com", "properties": {}, "headers": {} }, @@ -871,21 +694,15 @@ { "fn": "stringEquals", "argv": [ - "aws", { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } + "ref": "Region" + }, + "us-west-2" ] } ], "endpoint": { - "url": "https://data-ats.iot.{Region}.amazonaws.com", + "url": "https://data.iot-fips.us-west-2.amazonaws.com", "properties": {}, "headers": {} }, @@ -896,21 +713,15 @@ { "fn": "stringEquals", "argv": [ - "aws-cn", { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } + "ref": "Region" + }, + "us-gov-east-1" ] } ], "endpoint": { - "url": "https://data-ats.iot.{Region}.amazonaws.com.cn", + "url": "https://data.iot-fips.us-gov-east-1.amazonaws.com", "properties": {}, "headers": {} }, @@ -921,21 +732,15 @@ { "fn": "stringEquals", "argv": [ - "aws-us-gov", { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } + "ref": "Region" + }, + "us-gov-west-1" ] } ], "endpoint": { - "url": "https://data-ats.iot.{Region}.amazonaws.com", + "url": "https://data.iot-fips.us-gov-west-1.amazonaws.com", "properties": {}, "headers": {} }, @@ -944,24 +749,184 @@ { "conditions": [], "endpoint": { - "url": "https://data-ats.iot.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://data-ats.iot-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "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://data-ats.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "cn-north-1" + ] + } + ], + "endpoint": { + "url": "https://data.ats.iot.cn-north-1.amazonaws.com.cn", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://data-ats.iot.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-cn", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://data-ats.iot.{Region}.amazonaws.com.cn", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://data-ats.iot.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://data-ats.iot.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/iot-events-data.json b/codegen/sdk-codegen/aws-models/iot-events-data.json index 9f4b6f4105c..4506d51c59f 100644 --- a/codegen/sdk-codegen/aws-models/iot-events-data.json +++ b/codegen/sdk-codegen/aws-models/iot-events-data.json @@ -163,7 +163,7 @@ "stateName": { "target": "com.amazonaws.ioteventsdata#AlarmStateName", "traits": { - "smithy.api#documentation": "

The name of the alarm state. The state name can be one of the following values:

\n
    \n
  • \n\t\t

    \n DISABLED - When the alarm is in the DISABLED state, \n\t\tit isn't ready to evaluate data. To enable the alarm, \n\t\tyou must change the alarm to the NORMAL state.

    \n\t
  • \n
  • \n\t\t

    \n NORMAL - When the alarm is in the NORMAL state, \n\t\tit's ready to evaluate data.

    \n\t
  • \n
  • \n\t\t

    \n ACTIVE - If the alarm is in the ACTIVE state, \n\t\tthe alarm is invoked.

    \n\t
  • \n
  • \n\t\t

    \n ACKNOWLEDGED - When the alarm is in the ACKNOWLEDGED state, \n\t\tthe alarm was invoked and you acknowledged the alarm.

    \n\t
  • \n
  • \n\t\t

    \n SNOOZE_DISABLED - When the alarm is in the SNOOZE_DISABLED state, \n\t\tthe alarm is disabled for a specified period of time. After the snooze time, \n\t\tthe alarm automatically changes to the NORMAL state.

    \n\t
  • \n
  • \n\t\t

    \n LATCHED - When the alarm is in the LATCHED state, \n\t\tthe alarm was invoked. However, the data that the alarm is currently evaluating is within the specified range. \n\t\tTo change the alarm to the NORMAL state, you must acknowledge the alarm.

    \n\t
  • \n
" + "smithy.api#documentation": "

The name of the alarm state. The state name can be one of the following values:

\n
    \n
  • \n

    \n DISABLED - When the alarm is in the DISABLED state, \n\t\tit isn't ready to evaluate data. To enable the alarm, \n\t\tyou must change the alarm to the NORMAL state.

    \n
  • \n
  • \n

    \n NORMAL - When the alarm is in the NORMAL state, \n\t\tit's ready to evaluate data.

    \n
  • \n
  • \n

    \n ACTIVE - If the alarm is in the ACTIVE state, \n\t\tthe alarm is invoked.

    \n
  • \n
  • \n

    \n ACKNOWLEDGED - When the alarm is in the ACKNOWLEDGED state, \n\t\tthe alarm was invoked and you acknowledged the alarm.

    \n
  • \n
  • \n

    \n SNOOZE_DISABLED - When the alarm is in the SNOOZE_DISABLED state, \n\t\tthe alarm is disabled for a specified period of time. After the snooze time, \n\t\tthe alarm automatically changes to the NORMAL state.

    \n
  • \n
  • \n

    \n LATCHED - When the alarm is in the LATCHED state, \n\t\tthe alarm was invoked. However, the data that the alarm is currently evaluating is within the specified range. \n\t\tTo change the alarm to the NORMAL state, you must acknowledge the alarm.

    \n
  • \n
" } }, "ruleEvaluation": { @@ -190,34 +190,44 @@ } }, "com.amazonaws.ioteventsdata#AlarmStateName": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DISABLED", - "name": "DISABLED" - }, - { - "value": "NORMAL", - "name": "NORMAL" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "ACKNOWLEDGED", - "name": "ACKNOWLEDGED" - }, - { - "value": "SNOOZE_DISABLED", - "name": "SNOOZE_DISABLED" - }, - { - "value": "LATCHED", - "name": "LATCHED" + "type": "enum", + "members": { + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + }, + "NORMAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NORMAL" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" } - ] + }, + "ACKNOWLEDGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACKNOWLEDGED" + } + }, + "SNOOZE_DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNOOZE_DISABLED" + } + }, + "LATCHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LATCHED" + } + } } }, "com.amazonaws.ioteventsdata#AlarmSummaries": { @@ -250,7 +260,7 @@ "stateName": { "target": "com.amazonaws.ioteventsdata#AlarmStateName", "traits": { - "smithy.api#documentation": "

The name of the alarm state. The state name can be one of the following values:

\n
    \n
  • \n\t\t

    \n DISABLED - When the alarm is in the DISABLED state, \n\t\tit isn't ready to evaluate data. To enable the alarm, \n\t\tyou must change the alarm to the NORMAL state.

    \n\t
  • \n
  • \n\t\t

    \n NORMAL - When the alarm is in the NORMAL state, \n\t\tit's ready to evaluate data.

    \n\t
  • \n
  • \n\t\t

    \n ACTIVE - If the alarm is in the ACTIVE state, \n\t\tthe alarm is invoked.

    \n\t
  • \n
  • \n\t\t

    \n ACKNOWLEDGED - When the alarm is in the ACKNOWLEDGED state, \n\t\tthe alarm was invoked and you acknowledged the alarm.

    \n\t
  • \n
  • \n\t\t

    \n SNOOZE_DISABLED - When the alarm is in the SNOOZE_DISABLED state, \n\t\tthe alarm is disabled for a specified period of time. After the snooze time, \n\t\tthe alarm automatically changes to the NORMAL state.

    \n\t
  • \n
  • \n\t\t

    \n LATCHED - When the alarm is in the LATCHED state, \n\t\tthe alarm was invoked. However, the data that the alarm is currently evaluating is within the specified range. \n\t\tTo change the alarm to the NORMAL state, you must acknowledge the alarm.

    \n\t
  • \n
" + "smithy.api#documentation": "

The name of the alarm state. The state name can be one of the following values:

\n
    \n
  • \n

    \n DISABLED - When the alarm is in the DISABLED state, \n\t\tit isn't ready to evaluate data. To enable the alarm, \n\t\tyou must change the alarm to the NORMAL state.

    \n
  • \n
  • \n

    \n NORMAL - When the alarm is in the NORMAL state, \n\t\tit's ready to evaluate data.

    \n
  • \n
  • \n

    \n ACTIVE - If the alarm is in the ACTIVE state, \n\t\tthe alarm is invoked.

    \n
  • \n
  • \n

    \n ACKNOWLEDGED - When the alarm is in the ACKNOWLEDGED state, \n\t\tthe alarm was invoked and you acknowledged the alarm.

    \n
  • \n
  • \n

    \n SNOOZE_DISABLED - When the alarm is in the SNOOZE_DISABLED state, \n\t\tthe alarm is disabled for a specified period of time. After the snooze time, \n\t\tthe alarm automatically changes to the NORMAL state.

    \n
  • \n
  • \n

    \n LATCHED - When the alarm is in the LATCHED state, \n\t\tthe alarm was invoked. However, the data that the alarm is currently evaluating is within the specified range. \n\t\tTo change the alarm to the NORMAL state, you must acknowledge the alarm.

    \n
  • \n
" } }, "creationTime": { @@ -311,6 +321,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#BatchAcknowledgeAlarmResponse": { @@ -322,6 +335,9 @@ "smithy.api#documentation": "

A list of errors associated with the request, or null if there are no errors. \nEach error entry contains an entry ID that helps you identify the entry that failed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#BatchAlarmActionErrorEntries": { @@ -429,6 +445,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#BatchDeleteDetectorResponse": { @@ -440,6 +459,9 @@ "smithy.api#documentation": "

A list of errors associated with the request, or an empty array ([]) if there are no errors. Each error entry contains a messageId that helps you identify the entry that failed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#BatchDisableAlarm": { @@ -483,6 +505,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#BatchDisableAlarmResponse": { @@ -494,6 +519,9 @@ "smithy.api#documentation": "

A list of errors associated with the request, or null if there are no errors. \nEach error entry contains an entry ID that helps you identify the entry that failed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#BatchEnableAlarm": { @@ -537,6 +565,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#BatchEnableAlarmResponse": { @@ -548,6 +579,9 @@ "smithy.api#documentation": "

A list of errors associated with the request, or null if there are no errors. \nEach error entry contains an entry ID that helps you identify the entry that failed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#BatchPutMessage": { @@ -623,6 +657,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#BatchPutMessageResponse": { @@ -634,6 +671,9 @@ "smithy.api#documentation": "

A list of any errors encountered when sending the messages.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#BatchResetAlarm": { @@ -677,6 +717,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#BatchResetAlarmResponse": { @@ -688,6 +731,9 @@ "smithy.api#documentation": "

A list of errors associated with the request, or null if there are no errors. \nEach error entry contains an entry ID that helps you identify the entry that failed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#BatchSnoozeAlarm": { @@ -731,6 +777,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#BatchSnoozeAlarmResponse": { @@ -742,6 +791,9 @@ "smithy.api#documentation": "

A list of errors associated with the request, or null if there are no errors. \nEach error entry contains an entry ID that helps you identify the entry that failed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#BatchUpdateDetector": { @@ -817,6 +869,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#BatchUpdateDetectorResponse": { @@ -828,37 +883,50 @@ "smithy.api#documentation": "

A list of those detector updates that resulted in errors. (If an error is listed here, the\n specific update did not occur.)

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#ComparisonOperator": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "GREATER", - "name": "GREATER" - }, - { - "value": "GREATER_OR_EQUAL", - "name": "GREATER_OR_EQUAL" - }, - { - "value": "LESS", - "name": "LESS" - }, - { - "value": "LESS_OR_EQUAL", - "name": "LESS_OR_EQUAL" - }, - { - "value": "EQUAL", - "name": "EQUAL" - }, - { - "value": "NOT_EQUAL", - "name": "NOT_EQUAL" + "type": "enum", + "members": { + "GREATER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GREATER" + } + }, + "GREATER_OR_EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GREATER_OR_EQUAL" + } + }, + "LESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LESS" + } + }, + "LESS_OR_EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LESS_OR_EQUAL" + } + }, + "EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EQUAL" } - ] + }, + "NOT_EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_EQUAL" + } + } } }, "com.amazonaws.ioteventsdata#CustomerAction": { @@ -867,7 +935,7 @@ "actionName": { "target": "com.amazonaws.ioteventsdata#CustomerActionName", "traits": { - "smithy.api#documentation": "

The name of the action. The action name can be one of the following values:

\n
    \n
  • \n\t\t\t

    \n SNOOZE - When you snooze the alarm, the alarm state changes to SNOOZE_DISABLED.

    \n\t\t
  • \n
  • \n\t\t\t

    \n ENABLE - When you enable the alarm, the alarm state changes to NORMAL.

    \n\t\t
  • \n
  • \n\t\t\t

    \n DISABLE - When you disable the alarm, the alarm state changes to DISABLED.

    \n\t\t
  • \n
  • \n\t\t\t

    \n ACKNOWLEDGE - When you acknowledge the alarm, the alarm state changes to ACKNOWLEDGED.

    \n\t\t
  • \n
  • \n\t\t\t

    \n RESET - When you reset the alarm, the alarm state changes to NORMAL.

    \n\t\t
  • \n
\n

For more information, see the AlarmState API.

" + "smithy.api#documentation": "

The name of the action. The action name can be one of the following values:

\n
    \n
  • \n

    \n SNOOZE - When you snooze the alarm, the alarm state changes to SNOOZE_DISABLED.

    \n
  • \n
  • \n

    \n ENABLE - When you enable the alarm, the alarm state changes to NORMAL.

    \n
  • \n
  • \n

    \n DISABLE - When you disable the alarm, the alarm state changes to DISABLED.

    \n
  • \n
  • \n

    \n ACKNOWLEDGE - When you acknowledge the alarm, the alarm state changes to ACKNOWLEDGED.

    \n
  • \n
  • \n

    \n RESET - When you reset the alarm, the alarm state changes to NORMAL.

    \n
  • \n
\n

For more information, see the AlarmState API.

" } }, "snoozeActionConfiguration": { @@ -906,30 +974,38 @@ } }, "com.amazonaws.ioteventsdata#CustomerActionName": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SNOOZE", - "name": "SNOOZE" - }, - { - "value": "ENABLE", - "name": "ENABLE" - }, - { - "value": "DISABLE", - "name": "DISABLE" - }, - { - "value": "ACKNOWLEDGE", - "name": "ACKNOWLEDGE" - }, - { - "value": "RESET", - "name": "RESET" + "type": "enum", + "members": { + "SNOOZE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNOOZE" } - ] + }, + "ENABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLE" + } + }, + "DISABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLE" + } + }, + "ACKNOWLEDGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACKNOWLEDGE" + } + }, + "RESET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESET" + } + } } }, "com.amazonaws.ioteventsdata#DeleteDetectorRequest": { @@ -1023,6 +1099,9 @@ "smithy.api#httpQuery": "keyValue" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#DescribeAlarmResponse": { @@ -1034,6 +1113,9 @@ "smithy.api#documentation": "

Contains information about an alarm.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#DescribeDetector": { @@ -1088,6 +1170,9 @@ "smithy.api#httpQuery": "keyValue" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#DescribeDetectorResponse": { @@ -1099,6 +1184,9 @@ "smithy.api#documentation": "

Information about the detector (instance).

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#Detector": { @@ -1424,44 +1512,52 @@ } }, "com.amazonaws.ioteventsdata#ErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ResourceNotFoundException", - "name": "ResourceNotFoundException" - }, - { - "value": "InvalidRequestException", - "name": "InvalidRequestException" - }, - { - "value": "InternalFailureException", - "name": "InternalFailureException" - }, - { - "value": "ServiceUnavailableException", - "name": "ServiceUnavailableException" - }, - { - "value": "ThrottlingException", - "name": "ThrottlingException" + "type": "enum", + "members": { + "ResourceNotFoundException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ResourceNotFoundException" + } + }, + "InvalidRequestException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidRequestException" + } + }, + "InternalFailureException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalFailureException" + } + }, + "ServiceUnavailableException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ServiceUnavailableException" + } + }, + "ThrottlingException": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ThrottlingException" } - ] + } } }, "com.amazonaws.ioteventsdata#ErrorMessage": { "type": "string" }, "com.amazonaws.ioteventsdata#EventType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "STATE_CHANGE", - "name": "STATE_CHANGE" + "type": "enum", + "members": { + "STATE_CHANGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STATE_CHANGE" } - ] + } } }, "com.amazonaws.ioteventsdata#InputPropertyValue": { @@ -1546,6 +1642,7 @@ "arnNamespace": "ioteventsdata", "cloudFormationName": "IoTEventsData", "cloudTrailEventSource": "ioteventsdata.amazonaws.com", + "docId": "iotevents-data-2018-10-23", "endpointPrefix": "data.iotevents" }, "aws.auth#sigv4": { @@ -1614,52 +1711,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1667,13 +1768,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1683,224 +1793,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://data.iotevents-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://data.iotevents-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://data.iotevents-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://data.iotevents-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://data.iotevents.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://data.iotevents.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://data.iotevents.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://data.iotevents.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1915,8 +1976,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1928,8 +1989,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1941,8 +2002,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1954,8 +2015,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1967,8 +2028,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1980,8 +2041,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1993,8 +2054,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2006,8 +2067,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2019,8 +2080,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2032,8 +2093,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2045,8 +2106,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2058,8 +2119,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2071,8 +2143,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2084,8 +2167,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2097,8 +2191,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2110,8 +2215,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2123,8 +2228,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2136,8 +2241,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2148,8 +2253,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2160,10 +2265,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2239,6 +2350,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#ListAlarmsResponse": { @@ -2256,6 +2370,9 @@ "smithy.api#documentation": "

The token that you can use to return the next set of results, \nor null if there are no more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#ListDetectors": { @@ -2324,6 +2441,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ioteventsdata#ListDetectorsResponse": { @@ -2341,6 +2461,9 @@ "smithy.api#documentation": "

The token that you can use to return the next set of results, \nor null if there are no more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ioteventsdata#MaxResults": { @@ -2796,14 +2919,14 @@ } }, "com.amazonaws.ioteventsdata#TriggerType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SNOOZE_TIMEOUT", - "name": "SNOOZE_TIMEOUT" + "type": "enum", + "members": { + "SNOOZE_TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNOOZE_TIMEOUT" } - ] + } } }, "com.amazonaws.ioteventsdata#UpdateDetectorRequest": { diff --git a/codegen/sdk-codegen/aws-models/iot-events.json b/codegen/sdk-codegen/aws-models/iot-events.json index aa7a9025de3..062e345b480 100644 --- a/codegen/sdk-codegen/aws-models/iot-events.json +++ b/codegen/sdk-codegen/aws-models/iot-events.json @@ -278,26 +278,32 @@ } }, "com.amazonaws.iotevents#AlarmModelVersionStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "ACTIVATING", - "name": "ACTIVATING" - }, - { - "value": "INACTIVE", - "name": "INACTIVE" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "ACTIVATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVATING" } - ] + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INACTIVE" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } } }, "com.amazonaws.iotevents#AlarmModelVersionSummaries": { @@ -438,22 +444,26 @@ } }, "com.amazonaws.iotevents#AnalysisResultLevel": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INFO", - "name": "INFO" - }, - { - "value": "WARNING", - "name": "WARNING" - }, - { - "value": "ERROR", - "name": "ERROR" + "type": "enum", + "members": { + "INFO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INFO" } - ] + }, + "WARNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WARNING" + } + }, + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ERROR" + } + } } }, "com.amazonaws.iotevents#AnalysisResultLocation": { @@ -486,22 +496,26 @@ } }, "com.amazonaws.iotevents#AnalysisStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "COMPLETE", - "name": "COMPLETE" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" } - ] + }, + "COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETE" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } } }, "com.amazonaws.iotevents#AnalysisType": { @@ -675,34 +689,44 @@ } }, "com.amazonaws.iotevents#ComparisonOperator": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "GREATER", - "name": "GREATER" - }, - { - "value": "GREATER_OR_EQUAL", - "name": "GREATER_OR_EQUAL" - }, - { - "value": "LESS", - "name": "LESS" - }, - { - "value": "LESS_OR_EQUAL", - "name": "LESS_OR_EQUAL" - }, - { - "value": "EQUAL", - "name": "EQUAL" - }, - { - "value": "NOT_EQUAL", - "name": "NOT_EQUAL" + "type": "enum", + "members": { + "GREATER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GREATER" } - ] + }, + "GREATER_OR_EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GREATER_OR_EQUAL" + } + }, + "LESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LESS" + } + }, + "LESS_OR_EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LESS_OR_EQUAL" + } + }, + "EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EQUAL" + } + }, + "NOT_EQUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_EQUAL" + } + } } }, "com.amazonaws.iotevents#Condition": { @@ -828,6 +852,9 @@ "smithy.api#documentation": "

Contains the configuration information of alarm state changes.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#CreateAlarmModelResponse": { @@ -863,6 +890,9 @@ "smithy.api#documentation": "

The status of the alarm model. The status can be one of the following values:

\n
    \n
  • \n

    \n ACTIVE - The alarm model is active and it's ready to evaluate data.

    \n
  • \n
  • \n

    \n ACTIVATING - AWS IoT Events is activating your alarm model. \n Activating an alarm model can take up to a few minutes.

    \n
  • \n
  • \n

    \n INACTIVE - The alarm model is inactive, so it isn't ready to evaluate data. \n\t Check your alarm model information and update the alarm model.

    \n
  • \n
  • \n

    \n FAILED - You couldn't create or update the alarm model. Check your alarm model information \n and try again.

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#CreateDetectorModel": { @@ -953,6 +983,9 @@ "smithy.api#documentation": "

Information about the order in which events are evaluated and how actions are executed.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#CreateDetectorModelResponse": { @@ -964,6 +997,9 @@ "smithy.api#documentation": "

Information about how the detector model is configured.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#CreateInput": { @@ -1029,6 +1065,9 @@ "smithy.api#documentation": "

Metadata that can be used to manage the input.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#CreateInputResponse": { @@ -1040,6 +1079,9 @@ "smithy.api#documentation": "

Information about the configuration of the input.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#DeleteAlarmModel": { @@ -1090,11 +1132,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#DeleteAlarmModelResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotevents#DeleteDetectorModel": { "type": "operation", @@ -1144,11 +1192,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#DeleteDetectorModelResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotevents#DeleteInput": { "type": "operation", @@ -1198,11 +1252,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#DeleteInputResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotevents#DeliveryStreamName": { "type": "string" @@ -1259,6 +1319,9 @@ "smithy.api#httpQuery": "version" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#DescribeAlarmModelResponse": { @@ -1354,6 +1417,9 @@ "smithy.api#documentation": "

Contains the configuration information of alarm state changes.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#DescribeDetectorModel": { @@ -1435,6 +1501,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#DescribeDetectorModelAnalysisResponse": { @@ -1446,6 +1515,9 @@ "smithy.api#documentation": "

The status of the analysis activity. The status can be one of the following values:

\n
    \n
  • \n

    \n RUNNING - AWS IoT Events is analyzing your detector model. This process can take\n several minutes to complete.

    \n
  • \n
  • \n

    \n COMPLETE - AWS IoT Events finished analyzing your detector model.

    \n
  • \n
  • \n

    \n FAILED - AWS IoT Events couldn't analyze your detector model. Try again\n later.

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#DescribeDetectorModelRequest": { @@ -1466,6 +1538,9 @@ "smithy.api#httpQuery": "version" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#DescribeDetectorModelResponse": { @@ -1477,6 +1552,9 @@ "smithy.api#documentation": "

Information about the detector model.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#DescribeInput": { @@ -1524,6 +1602,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#DescribeInputResponse": { @@ -1535,6 +1616,9 @@ "smithy.api#documentation": "

Information about the input.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#DescribeLoggingOptions": { @@ -1576,7 +1660,10 @@ }, "com.amazonaws.iotevents#DescribeLoggingOptionsRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.iotevents#DescribeLoggingOptionsResponse": { "type": "structure", @@ -1587,6 +1674,9 @@ "smithy.api#documentation": "

The current settings of the AWS IoT Events logging options.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#DetectorDebugOption": { @@ -1795,38 +1885,50 @@ } }, "com.amazonaws.iotevents#DetectorModelVersionStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "ACTIVATING", - "name": "ACTIVATING" - }, - { - "value": "INACTIVE", - "name": "INACTIVE" - }, - { - "value": "DEPRECATED", - "name": "DEPRECATED" - }, - { - "value": "DRAFT", - "name": "DRAFT" - }, - { - "value": "PAUSED", - "name": "PAUSED" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "ACTIVATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVATING" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INACTIVE" + } + }, + "DEPRECATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEPRECATED" + } + }, + "DRAFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DRAFT" + } + }, + "PAUSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PAUSED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + } } }, "com.amazonaws.iotevents#DetectorModelVersionSummaries": { @@ -2072,18 +2174,20 @@ "type": "string" }, "com.amazonaws.iotevents#EvaluationMethod": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BATCH", - "name": "BATCH" - }, - { - "value": "SERIAL", - "name": "SERIAL" + "type": "enum", + "members": { + "BATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BATCH" + } + }, + "SERIAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SERIAL" } - ] + } } }, "com.amazonaws.iotevents#Event": { @@ -2223,6 +2327,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#GetDetectorModelAnalysisResultsResponse": { @@ -2240,6 +2347,9 @@ "smithy.api#documentation": "

The token that you can use to return the next set of results, \nor null if there are no more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#IdentityStoreId": { @@ -2396,26 +2506,32 @@ } }, "com.amazonaws.iotevents#InputStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "UPDATING", - "name": "UPDATING" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "DELETING", - "name": "DELETING" + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" } - ] + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + } } }, "com.amazonaws.iotevents#InputSummaries": { @@ -2589,6 +2705,7 @@ "arnNamespace": "iotevents", "cloudFormationName": "IoTEvents", "cloudTrailEventSource": "iotevents.amazonaws.com", + "docId": "iotevents-2018-07-27", "endpointPrefix": "iotevents" }, "aws.auth#sigv4": { @@ -2657,52 +2774,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2710,13 +2831,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2726,224 +2856,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iotevents-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://iotevents-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iotevents-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://iotevents-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iotevents.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://iotevents.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://iotevents.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://iotevents.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2958,8 +3039,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2971,8 +3052,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2984,8 +3065,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2997,8 +3078,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3010,8 +3091,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3023,8 +3104,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3036,8 +3117,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3049,8 +3130,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3062,8 +3143,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3075,8 +3156,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3088,8 +3169,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3101,8 +3182,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3114,8 +3195,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3127,8 +3208,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3140,8 +3221,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3153,8 +3234,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3166,8 +3247,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3179,8 +3260,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3192,8 +3273,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3205,8 +3286,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3218,8 +3299,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3231,8 +3312,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3244,8 +3325,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3257,8 +3338,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3270,8 +3362,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3283,8 +3386,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3296,8 +3410,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3309,8 +3434,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3322,8 +3447,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3335,8 +3460,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3347,8 +3472,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3359,10 +3484,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3606,6 +3737,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#ListAlarmModelVersionsResponse": { @@ -3623,6 +3757,9 @@ "smithy.api#documentation": "

The token that you can use to return the next set of results, \nor null if there are no more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#ListAlarmModels": { @@ -3673,6 +3810,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#ListAlarmModelsResponse": { @@ -3690,6 +3830,9 @@ "smithy.api#documentation": "

The token that you can use to return the next set of results, \nor null if there are no more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#ListDetectorModelVersions": { @@ -3751,6 +3894,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#ListDetectorModelVersionsResponse": { @@ -3768,6 +3914,9 @@ "smithy.api#documentation": "

The token that you can use to return the next set of results, \nor null if there are no more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#ListDetectorModels": { @@ -3818,6 +3967,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#ListDetectorModelsResponse": { @@ -3835,6 +3987,9 @@ "smithy.api#documentation": "

The token that you can use to return the next set of results, \nor null if there are no more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#ListInputRoutings": { @@ -3893,6 +4048,9 @@ "smithy.api#documentation": "

\n The token that you can use to return the next set of results.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#ListInputRoutingsResponse": { @@ -3910,6 +4068,9 @@ "smithy.api#documentation": "

\n The token that you can use to return the next set of results, \nor null if there are no more results.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#ListInputs": { @@ -3960,6 +4121,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#ListInputsResponse": { @@ -3977,6 +4141,9 @@ "smithy.api#documentation": "

The token that you can use to return the next set of results, \nor null if there are no more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#ListTagsForResource": { @@ -4024,6 +4191,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#ListTagsForResourceResponse": { @@ -4035,6 +4205,9 @@ "smithy.api#documentation": "

The list of tags assigned to the resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#LoggingEnabled": { @@ -4044,22 +4217,26 @@ } }, "com.amazonaws.iotevents#LoggingLevel": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ERROR", - "name": "ERROR" - }, - { - "value": "INFO", - "name": "INFO" - }, - { - "value": "DEBUG", - "name": "DEBUG" + "type": "enum", + "members": { + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ERROR" + } + }, + "INFO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INFO" + } + }, + "DEBUG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEBUG" } - ] + } } }, "com.amazonaws.iotevents#LoggingOptions": { @@ -4245,18 +4422,20 @@ } }, "com.amazonaws.iotevents#PayloadType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "STRING", - "name": "STRING" - }, - { - "value": "JSON", - "name": "JSON" + "type": "enum", + "members": { + "STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STRING" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JSON" } - ] + } } }, "com.amazonaws.iotevents#PutLoggingOptions": { @@ -4306,6 +4485,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#QueueUrl": { @@ -4711,6 +4893,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#StartDetectorModelAnalysisResponse": { @@ -4722,6 +4907,9 @@ "smithy.api#documentation": "

The ID that you can use to retrieve the analysis result.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#State": { @@ -4872,11 +5060,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotevents#TagValue": { "type": "string", @@ -5040,11 +5234,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotevents#UpdateAlarmModel": { "type": "operation", @@ -5138,6 +5338,9 @@ "smithy.api#documentation": "

Contains the configuration information of alarm state changes.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#UpdateAlarmModelResponse": { @@ -5173,6 +5376,9 @@ "smithy.api#documentation": "

The status of the alarm model. The status can be one of the following values:

\n
    \n
  • \n

    \n ACTIVE - The alarm model is active and it's ready to evaluate data.

    \n
  • \n
  • \n

    \n ACTIVATING - AWS IoT Events is activating your alarm model. \n Activating an alarm model can take up to a few minutes.

    \n
  • \n
  • \n

    \n INACTIVE - The alarm model is inactive, so it isn't ready to evaluate data. \n\t Check your alarm model information and update the alarm model.

    \n
  • \n
  • \n

    \n FAILED - You couldn't create or update the alarm model. Check your alarm model information \n and try again.

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#UpdateDetectorModel": { @@ -5249,6 +5455,9 @@ "smithy.api#documentation": "

Information about the order in which events are evaluated and how actions are executed.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#UpdateDetectorModelResponse": { @@ -5260,6 +5469,9 @@ "smithy.api#documentation": "

Information about how the detector model is configured.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#UpdateInput": { @@ -5323,6 +5535,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotevents#UpdateInputResponse": { @@ -5334,6 +5549,9 @@ "smithy.api#documentation": "

Information about the configuration of the input.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotevents#UseBase64": { diff --git a/codegen/sdk-codegen/aws-models/iot-jobs-data-plane.json b/codegen/sdk-codegen/aws-models/iot-jobs-data-plane.json index 138351c6b79..497a337f008 100644 --- a/codegen/sdk-codegen/aws-models/iot-jobs-data-plane.json +++ b/codegen/sdk-codegen/aws-models/iot-jobs-data-plane.json @@ -91,7 +91,7 @@ "com.amazonaws.iotjobsdataplane#DescribeJobExecutionJobId": { "type": "string", "traits": { - "smithy.api#pattern": "[a-zA-Z0-9_-]+|^\\$next" + "smithy.api#pattern": "^[a-zA-Z0-9_-]+|^\\$next$" } }, "com.amazonaws.iotjobsdataplane#DescribeJobExecutionRequest": { @@ -127,6 +127,9 @@ "smithy.api#httpQuery": "executionNumber" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotjobsdataplane#DescribeJobExecutionResponse": { @@ -138,6 +141,9 @@ "smithy.api#documentation": "

Contains data about a job execution.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotjobsdataplane#DetailsKey": { @@ -147,7 +153,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[a-zA-Z0-9:_-]+" + "smithy.api#pattern": "^[a-zA-Z0-9:_-]+$" } }, "com.amazonaws.iotjobsdataplane#DetailsMap": { @@ -166,7 +172,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "[^\\p{C}]*+" + "smithy.api#pattern": "^[^\\p{C}]*+$" } }, "com.amazonaws.iotjobsdataplane#ExecutionNumber": { @@ -220,6 +226,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotjobsdataplane#GetPendingJobExecutionsResponse": { @@ -237,6 +246,9 @@ "smithy.api#documentation": "

A list of JobExecutionSummary objects with status QUEUED.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotjobsdataplane#IncludeExecutionState": { @@ -297,6 +309,7 @@ "arnNamespace": "iot-jobs-data", "cloudFormationName": "IoTJobsDataPlane", "cloudTrailEventSource": "iotjobsdataplane.amazonaws.com", + "docId": "iot-jobs-data-2017-09-29", "endpointPrefix": "data.jobs.iot" }, "aws.auth#sigv4": { @@ -365,52 +378,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -418,13 +435,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -434,224 +460,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://data.jobs.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://data.jobs.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://data.jobs.iot-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://data.jobs.iot-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://data.jobs.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://data.jobs.iot.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://data.jobs.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://data.jobs.iot.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -666,8 +643,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -679,8 +656,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -692,8 +669,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -705,8 +682,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -718,8 +695,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -731,8 +708,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -744,8 +721,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -757,8 +734,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -770,8 +747,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -783,8 +760,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -796,8 +773,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -809,8 +786,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -822,8 +799,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -835,8 +812,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -848,8 +825,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -861,8 +838,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -874,8 +851,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -887,8 +864,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -900,8 +877,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -913,8 +890,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -926,8 +903,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -939,8 +916,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -952,8 +929,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -965,8 +942,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -978,8 +955,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -991,8 +968,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1004,8 +981,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1017,8 +994,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1030,8 +1007,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1043,8 +1020,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1056,8 +1033,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1069,8 +1046,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1082,8 +1059,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1095,8 +1072,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1108,8 +1085,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1121,8 +1098,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1134,8 +1122,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1147,8 +1146,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1160,8 +1170,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1173,8 +1194,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1186,8 +1207,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1199,8 +1220,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1211,8 +1232,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1223,10 +1244,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1347,42 +1374,56 @@ } }, "com.amazonaws.iotjobsdataplane#JobExecutionStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "QUEUED", - "name": "QUEUED" - }, - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "TIMED_OUT", - "name": "TIMED_OUT" - }, - { - "value": "REJECTED", - "name": "REJECTED" - }, - { - "value": "REMOVED", - "name": "REMOVED" - }, - { - "value": "CANCELED", - "name": "CANCELED" + "type": "enum", + "members": { + "QUEUED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUEUED" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "TIMED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMED_OUT" + } + }, + "REJECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REJECTED" + } + }, + "REMOVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REMOVED" + } + }, + "CANCELED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCELED" } - ] + } } }, "com.amazonaws.iotjobsdataplane#JobExecutionSummary": { @@ -1445,7 +1486,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[a-zA-Z0-9_-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" } }, "com.amazonaws.iotjobsdataplane#LastUpdatedAt": { @@ -1549,6 +1590,9 @@ "smithy.api#documentation": "

Specifies the amount of time this device has to finish execution of this job. If the job \n execution status is not set to a terminal state before this timer expires, or before the \n timer is reset (by calling UpdateJobExecution, setting the status to\n IN_PROGRESS and specifying a new timeout value in field stepTimeoutInMinutes) \n the job execution status will be automatically set to TIMED_OUT. Note that setting \n this timeout has no effect on that job execution timeout which may have been specified when \n the job was created (CreateJob using field timeoutConfig).

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotjobsdataplane#StartNextPendingJobExecutionResponse": { @@ -1560,6 +1604,9 @@ "smithy.api#documentation": "

A JobExecution object.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotjobsdataplane#StartedAt": { @@ -1588,7 +1635,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[a-zA-Z0-9:_-]+" + "smithy.api#pattern": "^[a-zA-Z0-9:_-]+$" } }, "com.amazonaws.iotjobsdataplane#ThrottlingException": { @@ -1712,6 +1759,9 @@ "smithy.api#documentation": "

Optional. A number that identifies a particular job execution on a particular device.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotjobsdataplane#UpdateJobExecutionResponse": { @@ -1729,6 +1779,9 @@ "smithy.api#documentation": "

The contents of the Job Documents.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotjobsdataplane#VersionNumber": { diff --git a/codegen/sdk-codegen/aws-models/iot-roborunner.json b/codegen/sdk-codegen/aws-models/iot-roborunner.json index 5c185ec3ff5..b6dee2cc9a5 100644 --- a/codegen/sdk-codegen/aws-models/iot-roborunner.json +++ b/codegen/sdk-codegen/aws-models/iot-roborunner.json @@ -1687,55 +1687,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://iotroborunner-fips.us-gov-east-1.api.aws" + "url": "https://iotroborunner-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://iotroborunner-fips.us-gov-east-1.amazonaws.com" + "url": "https://iotroborunner-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://iotroborunner.us-gov-east-1.api.aws" + "url": "https://iotroborunner.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://iotroborunner.us-gov-east-1.amazonaws.com" + "url": "https://iotroborunner.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -1746,9 +1746,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1759,9 +1759,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -1772,9 +1772,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1785,109 +1785,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://iotroborunner-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://iotroborunner-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://iotroborunner-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://iotroborunner.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://iotroborunner.us-iso-east-1.c2s.ic.gov" + "url": "https://iotroborunner.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://iotroborunner-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://iotroborunner-fips.us-east-1.amazonaws.com" + "url": "https://iotroborunner-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://iotroborunner.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://iotroborunner.us-east-1.amazonaws.com" + "url": "https://iotroborunner.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -1896,9 +1896,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1909,9 +1909,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1920,9 +1920,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1933,22 +1933,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1958,9 +1971,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1970,11 +1983,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3304,4 +3323,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/iot-wireless.json b/codegen/sdk-codegen/aws-models/iot-wireless.json index 8e1f4f13ef6..26831b943ae 100644 --- a/codegen/sdk-codegen/aws-models/iot-wireless.json +++ b/codegen/sdk-codegen/aws-models/iot-wireless.json @@ -15408,6 +15408,7 @@ "arnNamespace": "iotwireless", "cloudFormationName": "IoTWireless", "cloudTrailEventSource": "iotwireless.amazonaws.com", + "docId": "iotwireless-2020-11-22", "endpointPrefix": "api.iotwireless" }, "aws.auth#sigv4": { @@ -15476,52 +15477,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -15529,13 +15534,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -15545,224 +15559,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.iotwireless-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://api.iotwireless-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://api.iotwireless-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://api.iotwireless-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.iotwireless.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://api.iotwireless.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://api.iotwireless.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://api.iotwireless.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/iot.json b/codegen/sdk-codegen/aws-models/iot.json index 23016447971..68544049c90 100644 --- a/codegen/sdk-codegen/aws-models/iot.json +++ b/codegen/sdk-codegen/aws-models/iot.json @@ -858,52 +858,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -911,13 +915,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -927,299 +940,250 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iot-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://iot-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iot.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://iot.{Region}.amazonaws.com", + "url": "https://iot.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" - }, + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", { - "conditions": [ + "fn": "getAttr", + "argv": [ { - "fn": "stringEquals", - "argv": [ - "aws-cn", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://iot.{Region}.amazonaws.com.cn", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://iot.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-cn", { - "conditions": [ + "fn": "getAttr", + "argv": [ { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://iot.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://iot.{Region}.amazonaws.com.cn", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", { - "conditions": [], - "endpoint": { - "url": "https://iot.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] } ] } - ] + ], + "endpoint": { + "url": "https://iot.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://iot.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/iotanalytics.json b/codegen/sdk-codegen/aws-models/iotanalytics.json index 7f49a6716e9..20a762f4f33 100644 --- a/codegen/sdk-codegen/aws-models/iotanalytics.json +++ b/codegen/sdk-codegen/aws-models/iotanalytics.json @@ -148,7 +148,7 @@ "name": "iotanalytics" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

IoT Analytics allows you to collect large amounts of device data, process messages, and store them. \n You can then query the data and run sophisticated analytics on it. IoT Analytics enables advanced \n data exploration through integration with Jupyter Notebooks and data visualization through integration \n with Amazon QuickSight.

\n\n

Traditional analytics and business intelligence tools are designed to process structured data. IoT data \n often comes from devices that record noisy processes (such as temperature, motion, or sound). As a result \n the data from these devices can have significant gaps, corrupted messages, and false readings that must be \n cleaned up before analysis can occur. Also, IoT data is often only meaningful in the context of other data \n from external sources.

\n\n

IoT Analytics automates the steps required to analyze data from IoT devices. IoT Analytics \n filters, transforms, and enriches IoT data before storing it in a time-series data store for analysis. You \n can set up the service to collect only the data you need from your devices, apply mathematical transforms \n to process the data, and enrich the data with device-specific metadata such as device type and location \n before storing it. Then, you can analyze your data by running queries using the built-in SQL query engine, \n or perform more complex analytics and machine learning inference. IoT Analytics includes pre-built models \n for common IoT use cases so you can answer questions like which devices are about to fail or which customers \n are at risk of abandoning their wearable devices.

", + "smithy.api#documentation": "

IoT Analytics allows you to collect large amounts of device data, process messages, and store them. \n You can then query the data and run sophisticated analytics on it. IoT Analytics enables advanced \n data exploration through integration with Jupyter Notebooks and data visualization through integration \n with Amazon QuickSight.

\n

Traditional analytics and business intelligence tools are designed to process structured data. IoT data \n often comes from devices that record noisy processes (such as temperature, motion, or sound). As a result \n the data from these devices can have significant gaps, corrupted messages, and false readings that must be \n cleaned up before analysis can occur. Also, IoT data is often only meaningful in the context of other data \n from external sources.

\n

IoT Analytics automates the steps required to analyze data from IoT devices. IoT Analytics \n filters, transforms, and enriches IoT data before storing it in a time-series data store for analysis. You \n can set up the service to collect only the data you need from your devices, apply mathematical transforms \n to process the data, and enrich the data with device-specific metadata such as device type and location \n before storing it. Then, you can analyze your data by running queries using the built-in SQL query engine, \n or perform more complex analytics and machine learning inference. IoT Analytics includes pre-built models \n for common IoT use cases so you can answer questions like which devices are about to fail or which customers \n are at risk of abandoning their wearable devices.

", "smithy.api#title": "AWS IoT Analytics", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -210,52 +210,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -263,13 +267,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -279,224 +292,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotanalytics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://iotanalytics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotanalytics-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://iotanalytics-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotanalytics.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://iotanalytics.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://iotanalytics.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://iotanalytics.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -511,8 +475,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -524,8 +488,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -537,8 +501,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -550,8 +514,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -563,8 +527,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -576,8 +540,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -589,8 +553,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -602,8 +566,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -615,8 +579,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -628,8 +592,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -641,8 +605,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -654,8 +618,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -667,8 +631,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -680,8 +644,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -693,8 +657,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -706,8 +670,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -719,8 +683,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -732,8 +696,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -745,8 +709,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -758,8 +733,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -771,8 +757,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -784,8 +781,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -797,8 +805,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -810,8 +818,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -823,8 +831,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -835,8 +843,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -847,10 +855,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1018,10 +1032,13 @@ "messages": { "target": "com.amazonaws.iotanalytics#Messages", "traits": { - "smithy.api#documentation": "

The list of messages to be sent. Each message has the format: { \"messageId\": \"string\",\n \"payload\": \"string\"}.

\n

The field names of message payloads (data) that you send to IoT Analytics:

\n
    \n
  • \n

    Must contain only alphanumeric characters and undescores (_). No other special characters are\n allowed.

    \n
  • \n
  • \n

    Must begin with an alphabetic character or single underscore (_).

    \n
  • \n
  • \n

    Cannot contain hyphens (-).

    \n
  • \n
  • \n

    In regular expression terms: \"^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$\".\n

    \n
  • \n
  • \n

    Cannot be more than 255 characters.

    \n
  • \n
  • \n

    Are case insensitive. (Fields named foo and FOO in the same payload are considered\n duplicates.)

    \n
  • \n
\n

For example, {\"temp_01\": 29} or {\"_temp_01\": 29} are valid, but {\"temp-01\": 29},\n {\"01_temp\": 29} or {\"__temp_01\": 29} are invalid in message payloads.

", + "smithy.api#documentation": "

The list of messages to be sent. Each message has the format: { \"messageId\": \"string\",\n \"payload\": \"string\"}.

\n

The field names of message payloads (data) that you send to IoT Analytics:

\n
    \n
  • \n

    Must contain only alphanumeric characters and undescores (_). No other special characters are\n allowed.

    \n
  • \n
  • \n

    Must begin with an alphabetic character or single underscore (_).

    \n
  • \n
  • \n

    Cannot contain hyphens (-).

    \n
  • \n
  • \n

    In regular expression terms: \"^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$\".\n

    \n
  • \n
  • \n

    Cannot be more than 255 characters.

    \n
  • \n
  • \n

    Are case insensitive. (Fields named foo and FOO in the same payload are considered\n duplicates.)

    \n
  • \n
\n

For example, {\"temp_01\": 29} or {\"_temp_01\": 29} are valid, but {\"temp-01\": 29},\n {\"01_temp\": 29} or {\"__temp_01\": 29} are invalid in message payloads.

", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#BatchPutMessageResponse": { @@ -1033,6 +1050,9 @@ "smithy.api#documentation": "

A list of any errors encountered when sending the messages to the channel.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#BucketKeyExpression": { @@ -1108,11 +1128,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#CancelPipelineReprocessingResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotanalytics#Channel": { "type": "structure", @@ -1162,7 +1188,7 @@ "lastMessageArrivalTime": { "target": "com.amazonaws.iotanalytics#Timestamp", "traits": { - "smithy.api#documentation": "

The last time when a new message arrived in the channel.

\n

IoT Analytics updates this value at most once per minute for one channel. Hence, the lastMessageArrivalTime value is an approximation.

\n

This feature only applies to messages that arrived in the data store after October 23, 2020.

" + "smithy.api#documentation": "

The last time when a new message arrived in the channel.

\n

IoT Analytics updates this value at most once per minute for one channel. Hence, the lastMessageArrivalTime value is an approximation.

\n

This feature only applies to messages that arrived in the data store after October 23, 2020.

" } } }, @@ -1240,22 +1266,26 @@ } }, "com.amazonaws.iotanalytics#ChannelStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "DELETING", - "name": "DELETING" + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" } - ] + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + } } }, "com.amazonaws.iotanalytics#ChannelStorage": { @@ -1340,7 +1370,7 @@ "lastMessageArrivalTime": { "target": "com.amazonaws.iotanalytics#Timestamp", "traits": { - "smithy.api#documentation": "

The last time when a new message arrived in the channel.

\n

IoT Analytics updates this value at most once per minute for one channel. Hence, the lastMessageArrivalTime value is an approximation.

\n

This feature only applies to messages that arrived in the data store after October 23, 2020.

" + "smithy.api#documentation": "

The last time when a new message arrived in the channel.

\n

IoT Analytics updates this value at most once per minute for one channel. Hence, the lastMessageArrivalTime value is an approximation.

\n

This feature only applies to messages that arrived in the data store after October 23, 2020.

" } } }, @@ -1397,18 +1427,20 @@ } }, "com.amazonaws.iotanalytics#ComputeType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACU_1", - "name": "ACU_1" - }, - { - "value": "ACU_2", - "name": "ACU_2" + "type": "enum", + "members": { + "ACU_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACU_1" } - ] + }, + "ACU_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACU_2" + } + } } }, "com.amazonaws.iotanalytics#ContainerDatasetAction": { @@ -1511,6 +1543,9 @@ "smithy.api#documentation": "

Metadata which can be used to manage the channel.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#CreateChannelResponse": { @@ -1534,6 +1569,9 @@ "smithy.api#documentation": "

How long, in days, message data is kept for the channel.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#CreateDataset": { @@ -1624,6 +1662,9 @@ "smithy.api#documentation": "

The version ID of the dataset content. To specify versionId for a dataset\n content, the dataset must use a DeltaTimer filter.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#CreateDatasetContentResponse": { @@ -1635,6 +1676,9 @@ "smithy.api#documentation": "

The version ID of the dataset contents that are being created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#CreateDatasetRequest": { @@ -1690,6 +1734,9 @@ "smithy.api#documentation": "

A list of data rules that send notifications to CloudWatch, when data arrives late. To specify lateDataRules, the dataset must use a DeltaTimer filter.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#CreateDatasetResponse": { @@ -1713,6 +1760,9 @@ "smithy.api#documentation": "

How long, in days, dataset contents are kept for the dataset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#CreateDatastore": { @@ -1783,7 +1833,7 @@ "fileFormatConfiguration": { "target": "com.amazonaws.iotanalytics#FileFormatConfiguration", "traits": { - "smithy.api#documentation": "

Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

\n

The default file format is JSON. You can specify only one format.

\n

You can't change the file format after you create the data store.

" + "smithy.api#documentation": "

Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

\n

The default file format is JSON. You can specify only one format.

\n

You can't change the file format after you create the data store.

" } }, "datastorePartitions": { @@ -1792,6 +1842,9 @@ "smithy.api#documentation": "

Contains information about the partition dimensions in a data store.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#CreateDatastoreResponse": { @@ -1815,6 +1868,9 @@ "smithy.api#documentation": "

How long, in days, message data is kept for the data store.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#CreatePipeline": { @@ -1877,6 +1933,9 @@ "smithy.api#documentation": "

Metadata which can be used to manage the pipeline.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#CreatePipelineResponse": { @@ -1894,6 +1953,9 @@ "smithy.api#documentation": "

The ARN of the pipeline.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#CustomerManagedChannelS3Storage": { @@ -2147,18 +2209,20 @@ } }, "com.amazonaws.iotanalytics#DatasetActionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "QUERY", - "name": "QUERY" - }, - { - "value": "CONTAINER", - "name": "CONTAINER" + "type": "enum", + "members": { + "QUERY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY" + } + }, + "CONTAINER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTAINER" } - ] + } } }, "com.amazonaws.iotanalytics#DatasetActions": { @@ -2230,22 +2294,26 @@ } }, "com.amazonaws.iotanalytics#DatasetContentState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" } - ] + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } } }, "com.amazonaws.iotanalytics#DatasetContentStatus": { @@ -2373,22 +2441,26 @@ } }, "com.amazonaws.iotanalytics#DatasetStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "DELETING", - "name": "DELETING" + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" } - ] + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + } } }, "com.amazonaws.iotanalytics#DatasetSummaries": { @@ -2521,13 +2593,13 @@ "lastMessageArrivalTime": { "target": "com.amazonaws.iotanalytics#Timestamp", "traits": { - "smithy.api#documentation": "

The last time when a new message arrived in the data store.

\n

IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence, the lastMessageArrivalTime value is an approximation.

\n

This feature only applies to messages that arrived in the data store after October 23, 2020.

" + "smithy.api#documentation": "

The last time when a new message arrived in the data store.

\n

IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence, the lastMessageArrivalTime value is an approximation.

\n

This feature only applies to messages that arrived in the data store after October 23, 2020.

" } }, "fileFormatConfiguration": { "target": "com.amazonaws.iotanalytics#FileFormatConfiguration", "traits": { - "smithy.api#documentation": "

Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

\n

The default file format is JSON. You can specify only one format.

\n

You can't change the file format after you create the data store.

" + "smithy.api#documentation": "

Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

\n

The default file format is JSON. You can specify only one format.

\n

You can't change the file format after you create the data store.

" } }, "datastorePartitions": { @@ -2654,22 +2726,26 @@ } }, "com.amazonaws.iotanalytics#DatastoreStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "DELETING", - "name": "DELETING" + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" } - ] + } } }, "com.amazonaws.iotanalytics#DatastoreStorage": { @@ -2766,7 +2842,7 @@ "lastMessageArrivalTime": { "target": "com.amazonaws.iotanalytics#Timestamp", "traits": { - "smithy.api#documentation": "

The last time when a new message arrived in the data store.

\n

IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence, the lastMessageArrivalTime value is an approximation.

\n

This feature only applies to messages that arrived in the data store after October 23, 2020.

" + "smithy.api#documentation": "

The last time when a new message arrived in the data store.

\n

IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence, the lastMessageArrivalTime value is an approximation.

\n

This feature only applies to messages that arrived in the data store after October 23, 2020.

" } }, "fileFormatType": { @@ -2831,6 +2907,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#DeleteDataset": { @@ -2919,6 +2998,9 @@ "smithy.api#httpQuery": "versionId" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#DeleteDatasetRequest": { @@ -2932,6 +3014,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#DeleteDatastore": { @@ -2979,6 +3064,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#DeletePipeline": { @@ -3026,6 +3114,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#DeltaTime": { @@ -3118,6 +3209,9 @@ "smithy.api#httpQuery": "includeStatistics" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#DescribeChannelResponse": { @@ -3135,6 +3229,9 @@ "smithy.api#documentation": "

Statistics about the channel. Included if the includeStatistics parameter is\n set to true in the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#DescribeDataset": { @@ -3182,6 +3279,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#DescribeDatasetResponse": { @@ -3193,6 +3293,9 @@ "smithy.api#documentation": "

An object that contains information about the dataset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#DescribeDatastore": { @@ -3248,6 +3351,9 @@ "smithy.api#httpQuery": "includeStatistics" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#DescribeDatastoreResponse": { @@ -3265,6 +3371,9 @@ "smithy.api#documentation": "

Additional statistical information about the data store. Included if the\n includeStatistics parameter is set to true in the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#DescribeLoggingOptions": { @@ -3303,7 +3412,10 @@ }, "com.amazonaws.iotanalytics#DescribeLoggingOptionsRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.iotanalytics#DescribeLoggingOptionsResponse": { "type": "structure", @@ -3314,6 +3426,9 @@ "smithy.api#documentation": "

The current settings of the IoT Analytics logging options.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#DescribePipeline": { @@ -3361,6 +3476,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#DescribePipelineResponse": { @@ -3372,6 +3490,9 @@ "smithy.api#documentation": "

A Pipeline object that contains information about the pipeline.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#DeviceRegistryEnrichActivity": { @@ -3513,22 +3634,24 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

\n

The default file format is JSON. You can specify only one format.

\n

You can't change the file format after you create the data store.

" + "smithy.api#documentation": "

Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

\n

The default file format is JSON. You can specify only one format.

\n

You can't change the file format after you create the data store.

" } }, "com.amazonaws.iotanalytics#FileFormatType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "JSON", - "name": "JSON" - }, - { - "value": "PARQUET", - "name": "PARQUET" + "type": "enum", + "members": { + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JSON" + } + }, + "PARQUET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PARQUET" } - ] + } } }, "com.amazonaws.iotanalytics#FilterActivity": { @@ -3620,6 +3743,9 @@ "smithy.api#httpQuery": "versionId" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#GetDatasetContentResponse": { @@ -3643,6 +3769,9 @@ "smithy.api#documentation": "

The status of the dataset content.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#GlueConfiguration": { @@ -3976,6 +4105,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#ListChannelsResponse": { @@ -3993,6 +4125,9 @@ "smithy.api#documentation": "

The token to retrieve the next set of results, or null if there are no more\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#ListDatasetContents": { @@ -4073,6 +4208,9 @@ "smithy.api#httpQuery": "scheduledBefore" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#ListDatasetContentsResponse": { @@ -4090,6 +4228,9 @@ "smithy.api#documentation": "

The token to retrieve the next set of results, or null if there are no more\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#ListDatasets": { @@ -4145,6 +4286,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#ListDatasetsResponse": { @@ -4162,6 +4306,9 @@ "smithy.api#documentation": "

The token to retrieve the next set of results, or null if there are no more\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#ListDatastores": { @@ -4217,6 +4364,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#ListDatastoresResponse": { @@ -4234,6 +4384,9 @@ "smithy.api#documentation": "

The token to retrieve the next set of results, or null if there are no more\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#ListPipelines": { @@ -4289,6 +4442,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#ListPipelinesResponse": { @@ -4306,6 +4462,9 @@ "smithy.api#documentation": "

The token to retrieve the next set of results, or null if there are no more\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#ListTagsForResource": { @@ -4356,6 +4515,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#ListTagsForResourceResponse": { @@ -4367,6 +4529,9 @@ "smithy.api#documentation": "

The tags (metadata) that you have assigned to the resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#LogResult": { @@ -4379,14 +4544,14 @@ } }, "com.amazonaws.iotanalytics#LoggingLevel": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ERROR", - "name": "ERROR" + "type": "enum", + "members": { + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ERROR" } - ] + } } }, "com.amazonaws.iotanalytics#LoggingOptions": { @@ -4840,6 +5005,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#QueryFilter": { @@ -4903,26 +5071,32 @@ "type": "string" }, "com.amazonaws.iotanalytics#ReprocessingStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" - }, - { - "value": "CANCELLED", - "name": "CANCELLED" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCELLED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + } } }, "com.amazonaws.iotanalytics#ReprocessingSummaries": { @@ -5116,6 +5290,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#RunPipelineActivityResponse": { @@ -5133,6 +5310,9 @@ "smithy.api#documentation": "

In case the pipeline activity fails, the log message that is generated.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#S3DestinationConfiguration": { @@ -5268,6 +5448,9 @@ "smithy.api#httpQuery": "endTime" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#SampleChannelDataResponse": { @@ -5279,6 +5462,9 @@ "smithy.api#documentation": "

The list of message samples. Each sample message is returned as a base64-encoded\n string.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#Schedule": { @@ -5483,6 +5669,9 @@ "smithy.api#documentation": "

Specifies one or more sets of channel messages that you want to reprocess.

\n

If you use the channelMessages object, you must not specify a value for\n startTime and endTime.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#StartPipelineReprocessingResponse": { @@ -5494,6 +5683,9 @@ "smithy.api#documentation": "

The ID of the pipeline reprocessing activity that was started.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotanalytics#StartTime": { @@ -5618,11 +5810,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotanalytics#TagValue": { "type": "string", @@ -5766,11 +5964,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotanalytics#UpdateChannel": { "type": "operation", @@ -5829,6 +6033,9 @@ "smithy.api#documentation": "

How long, in days, message data is kept for the channel. The retention period can't be\n updated if the channel's Amazon S3 storage is customer-managed.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#UpdateDataset": { @@ -5913,6 +6120,9 @@ "smithy.api#documentation": "

A list of data rules that send notifications to CloudWatch, when data arrives late. To specify lateDataRules, the dataset must use a DeltaTimer filter.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#UpdateDatastore": { @@ -5975,9 +6185,12 @@ "fileFormatConfiguration": { "target": "com.amazonaws.iotanalytics#FileFormatConfiguration", "traits": { - "smithy.api#documentation": "

Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

\n

The default file format is JSON. You can specify only one format.

\n

You can't change the file format after you create the data store.

" + "smithy.api#documentation": "

Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.

\n

The default file format is JSON. You can specify only one format.

\n

You can't change the file format after you create the data store.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#UpdatePipeline": { @@ -6035,6 +6248,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotanalytics#Variable": { diff --git a/codegen/sdk-codegen/aws-models/iotdeviceadvisor.json b/codegen/sdk-codegen/aws-models/iotdeviceadvisor.json index fdde42439a7..14af55eda5f 100644 --- a/codegen/sdk-codegen/aws-models/iotdeviceadvisor.json +++ b/codegen/sdk-codegen/aws-models/iotdeviceadvisor.json @@ -808,52 +808,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -861,13 +865,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -877,224 +890,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.iotdeviceadvisor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://api.iotdeviceadvisor-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://api.iotdeviceadvisor-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://api.iotdeviceadvisor-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.iotdeviceadvisor.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://api.iotdeviceadvisor.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://api.iotdeviceadvisor.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://api.iotdeviceadvisor.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/iotfleethub.json b/codegen/sdk-codegen/aws-models/iotfleethub.json index 568960b97ef..0fc1ba33e85 100644 --- a/codegen/sdk-codegen/aws-models/iotfleethub.json +++ b/codegen/sdk-codegen/aws-models/iotfleethub.json @@ -132,52 +132,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -185,13 +189,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -201,224 +214,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.fleethub.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://api.fleethub.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://api.fleethub.iot-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://api.fleethub.iot-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.fleethub.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://api.fleethub.iot.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://api.fleethub.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://api.fleethub.iot.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -433,8 +397,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -446,8 +410,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -459,8 +423,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -472,8 +436,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -485,8 +449,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -498,8 +462,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -511,8 +475,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -524,8 +488,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -537,8 +501,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -550,8 +514,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -563,8 +527,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -576,8 +540,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -589,8 +553,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -602,8 +566,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -615,8 +579,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -628,8 +592,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -641,8 +605,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -654,8 +618,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -667,8 +631,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -680,8 +644,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -693,8 +657,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -706,8 +670,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -719,8 +683,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -732,8 +696,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -745,8 +709,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -758,8 +722,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -771,8 +735,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -784,8 +759,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -797,8 +783,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -810,8 +807,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -823,8 +831,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -836,8 +844,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -849,8 +857,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -861,8 +869,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -873,10 +881,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -884,30 +898,38 @@ } }, "com.amazonaws.iotfleethub#ApplicationState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "DELETING", - "name": "DELETING" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "CREATE_FAILED", - "name": "CREATE_FAILED" - }, - { - "value": "DELETE_FAILED", - "name": "DELETE_FAILED" + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" } - ] + }, + "CREATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_FAILED" + } + }, + "DELETE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_FAILED" + } + } } }, "com.amazonaws.iotfleethub#ApplicationSummaries": { @@ -1071,6 +1093,9 @@ "smithy.api#documentation": "

A set of key/value pairs that you can use to manage the web application resource.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotfleethub#CreateApplicationResponse": { @@ -1090,6 +1115,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotfleethub#DeleteApplication": { @@ -1142,11 +1170,17 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotfleethub#DeleteApplicationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotfleethub#DescribeApplication": { "type": "operation", @@ -1190,6 +1224,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotfleethub#DescribeApplicationResponse": { @@ -1277,6 +1314,9 @@ "smithy.api#documentation": "

A set of key/value pairs that you can use to manage the web application resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotfleethub#Description": { @@ -1369,7 +1409,8 @@ }, "smithy.api#paginated": { "inputToken": "nextToken", - "outputToken": "nextToken" + "outputToken": "nextToken", + "items": "applicationSummaries" } } }, @@ -1383,6 +1424,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotfleethub#ListApplicationsResponse": { @@ -1400,6 +1444,9 @@ "smithy.api#documentation": "

A token used to get the next set of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotfleethub#ListTagsForResource": { @@ -1441,6 +1488,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotfleethub#ListTagsForResourceResponse": { @@ -1452,6 +1502,9 @@ "smithy.api#documentation": "

The list of tags assigned to the resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotfleethub#Name": { @@ -1570,11 +1623,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotfleethub#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotfleethub#TagValue": { "type": "string", @@ -1651,11 +1710,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotfleethub#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotfleethub#UpdateApplication": { "type": "operation", @@ -1721,11 +1786,17 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotfleethub#UpdateApplicationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotfleethub#Url": { "type": "string", diff --git a/codegen/sdk-codegen/aws-models/iotfleetwise.json b/codegen/sdk-codegen/aws-models/iotfleetwise.json index a5220247b79..5690793377c 100644 --- a/codegen/sdk-codegen/aws-models/iotfleetwise.json +++ b/codegen/sdk-codegen/aws-models/iotfleetwise.json @@ -3668,52 +3668,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3721,13 +3725,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3737,224 +3750,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotfleetwise-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://iotfleetwise-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iotfleetwise-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://iotfleetwise-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotfleetwise.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://iotfleetwise.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://iotfleetwise.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://iotfleetwise.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/iotsecuretunneling.json b/codegen/sdk-codegen/aws-models/iotsecuretunneling.json index 0a8aef9d30d..a09d5e8ec65 100644 --- a/codegen/sdk-codegen/aws-models/iotsecuretunneling.json +++ b/codegen/sdk-codegen/aws-models/iotsecuretunneling.json @@ -45,22 +45,26 @@ } }, "com.amazonaws.iotsecuretunneling#ClientMode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SOURCE", - "name": "SOURCE" - }, - { - "value": "DESTINATION", - "name": "DESTINATION" - }, - { - "value": "ALL", - "name": "ALL" + "type": "enum", + "members": { + "SOURCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SOURCE" + } + }, + "DESTINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESTINATION" + } + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL" } - ] + } } }, "com.amazonaws.iotsecuretunneling#CloseTunnel": { @@ -77,7 +81,7 @@ } ], "traits": { - "smithy.api#documentation": "

Closes a tunnel identified by the unique tunnel id. When a CloseTunnel\n\t\t\trequest is received, we close the WebSocket connections between the client and proxy\n\t\t\tserver so no data can be transmitted.

\n\t\t

Requires permission to access the CloseTunnel action.

", + "smithy.api#documentation": "

Closes a tunnel identified by the unique tunnel id. When a CloseTunnel\n\t\t\trequest is received, we close the WebSocket connections between the client and proxy\n\t\t\tserver so no data can be transmitted.

\n

Requires permission to access the CloseTunnel action.

", "smithy.api#http": { "method": "DELETE", "uri": "/tunnels/{tunnelId}", @@ -104,11 +108,17 @@ "smithy.api#httpQuery": "delete" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotsecuretunneling#CloseTunnelResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotsecuretunneling#ConnectionState": { "type": "structure", @@ -131,18 +141,20 @@ } }, "com.amazonaws.iotsecuretunneling#ConnectionStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CONNECTED", - "name": "CONNECTED" - }, - { - "value": "DISCONNECTED", - "name": "DISCONNECTED" + "type": "enum", + "members": { + "CONNECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONNECTED" } - ] + }, + "DISCONNECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISCONNECTED" + } + } } }, "com.amazonaws.iotsecuretunneling#DateType": { @@ -168,7 +180,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a tunnel identified by the unique tunnel id.

\n\t\t

Requires permission to access the DescribeTunnel action.

", + "smithy.api#documentation": "

Gets information about a tunnel identified by the unique tunnel id.

\n

Requires permission to access the DescribeTunnel action.

", "smithy.api#http": { "method": "GET", "uri": "/tunnels/{tunnelId}", @@ -187,6 +199,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotsecuretunneling#DescribeTunnelResponse": { @@ -198,6 +213,9 @@ "smithy.api#documentation": "

The tunnel being described.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotsecuretunneling#Description": { @@ -271,7 +289,7 @@ "name": "IoTSecuredTunneling" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "IoT Secure Tunneling\n\t\t

IoT Secure Tunneling creates remote connections to devices deployed in the\n\t\t\tfield.

\n\t\t

For more information about how IoT Secure Tunneling works, see IoT\n\t\t\t\tSecure Tunneling.

", + "smithy.api#documentation": "IoT Secure Tunneling\n

IoT Secure Tunneling creates remote connections to devices deployed in the\n\t\t\tfield.

\n

For more information about how IoT Secure Tunneling works, see IoT\n\t\t\t\tSecure Tunneling.

", "smithy.api#title": "AWS IoT Secure Tunneling", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -333,52 +351,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -386,13 +408,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -402,224 +433,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://api.tunneling.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://api.tunneling.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://api.tunneling.iot-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://api.tunneling.iot-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://api.tunneling.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://api.tunneling.iot.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://api.tunneling.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://api.tunneling.iot.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -634,8 +616,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -647,8 +629,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -660,8 +642,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -673,8 +655,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -686,8 +668,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -699,8 +681,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -712,8 +694,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -725,8 +707,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -738,8 +720,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -751,8 +733,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -764,8 +746,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -777,8 +759,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -790,8 +772,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -803,8 +785,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -816,8 +798,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -829,8 +811,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -842,8 +824,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -855,8 +837,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -868,8 +850,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -881,8 +863,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -894,8 +876,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -907,8 +889,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -920,8 +902,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -933,8 +915,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -946,8 +928,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -959,8 +941,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -972,8 +954,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -985,8 +967,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -998,8 +980,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1011,8 +993,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1024,8 +1006,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1037,8 +1019,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1050,8 +1032,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1063,8 +1045,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1076,8 +1058,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1089,8 +1071,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1102,8 +1095,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1115,8 +1119,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1128,8 +1143,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1141,8 +1167,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1154,8 +1180,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1167,8 +1193,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1179,8 +1205,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1191,10 +1217,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1251,6 +1283,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotsecuretunneling#ListTagsForResourceResponse": { @@ -1262,6 +1297,9 @@ "smithy.api#documentation": "

The tags for the specified resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotsecuretunneling#ListTunnels": { @@ -1273,7 +1311,7 @@ "target": "com.amazonaws.iotsecuretunneling#ListTunnelsResponse" }, "traits": { - "smithy.api#documentation": "

List all tunnels for an Amazon Web Services account. Tunnels are listed by creation time in\n\t\t\tdescending order, newer tunnels will be listed before older tunnels.

\n\t\t

Requires permission to access the ListTunnels action.

", + "smithy.api#documentation": "

List all tunnels for an Amazon Web Services account. Tunnels are listed by creation time in\n\t\t\tdescending order, newer tunnels will be listed before older tunnels.

\n

Requires permission to access the ListTunnels action.

", "smithy.api#http": { "method": "GET", "uri": "/tunnels", @@ -1311,6 +1349,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotsecuretunneling#ListTunnelsResponse": { @@ -1328,6 +1369,9 @@ "smithy.api#documentation": "

The token to use to get the next set of results, or null if there are no additional\n\t\t\tresults.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotsecuretunneling#MaxResults": { @@ -1360,7 +1404,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new tunnel, and returns two client access tokens for clients to use to\n\t\t\tconnect to the IoT Secure Tunneling proxy server.

\n\t\t

Requires permission to access the OpenTunnel action.

", + "smithy.api#documentation": "

Creates a new tunnel, and returns two client access tokens for clients to use to\n\t\t\tconnect to the IoT Secure Tunneling proxy server.

\n

Requires permission to access the OpenTunnel action.

", "smithy.api#http": { "method": "POST", "uri": "/tunnels", @@ -1395,6 +1439,9 @@ "smithy.api#documentation": "

Timeout configuration for a tunnel.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotsecuretunneling#OpenTunnelResponse": { @@ -1424,6 +1471,9 @@ "smithy.api#documentation": "

The access token the destination local proxy uses to connect to IoT Secure\n\t\t\tTunneling.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotsecuretunneling#ResourceNotFoundException": { @@ -1457,7 +1507,7 @@ } ], "traits": { - "smithy.api#documentation": "

Revokes the current client access token (CAT) and returns new CAT for clients to\n\t\t\tuse when reconnecting to secure tunneling to access the same tunnel.

\n\t\t

Requires permission to access the RotateTunnelAccessToken action.

\n\t\t \n\t\t\t

Rotating the CAT doesn't extend the tunnel duration. For example, say the tunnel\n\t\t\t\tduration is 12 hours and the tunnel has already been open for 4 hours. When you\n\t\t\t\trotate the access tokens, the new tokens that are generated can only be used for the\n\t\t\t\tremaining 8 hours.

\n\t\t
", + "smithy.api#documentation": "

Revokes the current client access token (CAT) and returns new CAT for clients to\n\t\t\tuse when reconnecting to secure tunneling to access the same tunnel.

\n

Requires permission to access the RotateTunnelAccessToken action.

\n \n

Rotating the CAT doesn't extend the tunnel duration. For example, say the tunnel\n\t\t\t\tduration is 12 hours and the tunnel has already been open for 4 hours. When you\n\t\t\t\trotate the access tokens, the new tokens that are generated can only be used for the\n\t\t\t\tremaining 8 hours.

\n
", "smithy.api#http": { "method": "POST", "uri": "/tunnel/{tunnelId}/rotate", @@ -1486,6 +1536,9 @@ "destinationConfig": { "target": "com.amazonaws.iotsecuretunneling#DestinationConfig" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotsecuretunneling#RotateTunnelAccessTokenResponse": { @@ -1509,6 +1562,9 @@ "smithy.api#documentation": "

The client access token that the destination local proxy uses to connect to IoT\n\t\t\tSecure Tunneling.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotsecuretunneling#Service": { @@ -1627,11 +1683,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotsecuretunneling#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotsecuretunneling#TagValue": { "type": "string", @@ -1768,18 +1830,20 @@ } }, "com.amazonaws.iotsecuretunneling#TunnelStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "OPEN", - "name": "OPEN" - }, - { - "value": "CLOSED", - "name": "CLOSED" + "type": "enum", + "members": { + "OPEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OPEN" + } + }, + "CLOSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLOSED" } - ] + } } }, "com.amazonaws.iotsecuretunneling#TunnelSummary": { @@ -1871,11 +1935,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotsecuretunneling#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } } } } diff --git a/codegen/sdk-codegen/aws-models/iotsitewise.json b/codegen/sdk-codegen/aws-models/iotsitewise.json index 9e37e637385..d428e143870 100644 --- a/codegen/sdk-codegen/aws-models/iotsitewise.json +++ b/codegen/sdk-codegen/aws-models/iotsitewise.json @@ -337,52 +337,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -390,13 +394,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -406,224 +419,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotsitewise-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://iotsitewise-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iotsitewise-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://iotsitewise-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotsitewise.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://iotsitewise.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://iotsitewise.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://iotsitewise.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/iotthingsgraph.json b/codegen/sdk-codegen/aws-models/iotthingsgraph.json index 8b6ef748fca..be81f856d75 100644 --- a/codegen/sdk-codegen/aws-models/iotthingsgraph.json +++ b/codegen/sdk-codegen/aws-models/iotthingsgraph.json @@ -84,11 +84,17 @@ "smithy.api#documentation": "

The version of the user's namespace. Defaults to the latest version of the user's namespace.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#AssociateEntityToThingResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotthingsgraph#CreateFlowTemplate": { "type": "operation", @@ -138,6 +144,9 @@ "smithy.api#documentation": "

The namespace version in which the workflow is to be created.

\n

If no value is specified, the latest version is used by default.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#CreateFlowTemplateResponse": { @@ -149,6 +158,9 @@ "smithy.api#documentation": "

The summary object that describes the created workflow.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#CreateSystemInstance": { @@ -226,6 +238,9 @@ "smithy.api#documentation": "

The ARN of the IAM role that AWS IoT Things Graph will assume when it executes the flow. This role must have \n read and write access to AWS Lambda and AWS IoT and any other AWS services that the flow uses when it executes. This \n value is required if the value of the target parameter is CLOUD.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#CreateSystemInstanceResponse": { @@ -237,6 +252,9 @@ "smithy.api#documentation": "

The summary object that describes the new system instance.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#CreateSystemTemplate": { @@ -284,6 +302,9 @@ "smithy.api#documentation": "

The namespace version in which the system is to be created.

\n

If no value is specified, the latest version is used by default.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#CreateSystemTemplateResponse": { @@ -295,6 +316,9 @@ "smithy.api#documentation": "

The summary object that describes the created system.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#DefinitionDocument": { @@ -320,14 +344,14 @@ } }, "com.amazonaws.iotthingsgraph#DefinitionLanguage": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "GRAPHQL", - "name": "GRAPHQL" + "type": "enum", + "members": { + "GRAPHQL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GRAPHQL" } - ] + } } }, "com.amazonaws.iotthingsgraph#DefinitionText": { @@ -378,11 +402,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#DeleteFlowTemplateResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotthingsgraph#DeleteNamespace": { "type": "operation", @@ -409,7 +439,10 @@ }, "com.amazonaws.iotthingsgraph#DeleteNamespaceRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.iotthingsgraph#DeleteNamespaceResponse": { "type": "structure", @@ -426,6 +459,9 @@ "smithy.api#documentation": "

The name of the namespace to be deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#DeleteSystemInstance": { @@ -466,11 +502,17 @@ "smithy.api#documentation": "

The ID of the system instance to be deleted.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#DeleteSystemInstanceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotthingsgraph#DeleteSystemTemplate": { "type": "operation", @@ -511,11 +553,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#DeleteSystemTemplateResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotthingsgraph#DependencyRevision": { "type": "structure", @@ -584,6 +632,9 @@ "smithy.api#documentation": "

The ID of the system instance. This value is returned by the CreateSystemInstance action.

\n

The ID should be in the following format.

\n

\n urn:tdm:REGION/ACCOUNT ID/default:deployment:DEPLOYMENTNAME\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#DeploySystemInstanceResponse": { @@ -602,21 +653,26 @@ "smithy.api#documentation": "

The ID of the Greengrass deployment used to deploy the system instance.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#DeploymentTarget": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "GREENGRASS", - "name": "GREENGRASS" - }, - { - "value": "CLOUD", - "name": "CLOUD" + "type": "enum", + "members": { + "GREENGRASS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GREENGRASS" + } + }, + "CLOUD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLOUD" } - ] + } } }, "com.amazonaws.iotthingsgraph#DeprecateExistingEntities": { @@ -664,11 +720,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#DeprecateFlowTemplateResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotthingsgraph#DeprecateSystemTemplate": { "type": "operation", @@ -709,11 +771,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#DeprecateSystemTemplateResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotthingsgraph#DescribeNamespace": { "type": "operation", @@ -753,6 +821,9 @@ "smithy.api#documentation": "

The name of the user's namespace. Set this to aws to get the public namespace.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#DescribeNamespaceResponse": { @@ -788,6 +859,9 @@ "smithy.api#documentation": "

The version of the user's namespace to describe.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#DissociateEntityFromThing": { @@ -836,11 +910,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#DissociateEntityFromThingResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotthingsgraph#Enabled": { "type": "boolean", @@ -913,26 +993,32 @@ } }, "com.amazonaws.iotthingsgraph#EntityFilterName": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NAME", - "name": "NAME" - }, - { - "value": "NAMESPACE", - "name": "NAMESPACE" - }, - { - "value": "SEMANTIC_TYPE_PATH", - "name": "SEMANTIC_TYPE_PATH" - }, - { - "value": "REFERENCED_ENTITY_ID", - "name": "REFERENCED_ENTITY_ID" + "type": "enum", + "members": { + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAME" + } + }, + "NAMESPACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NAMESPACE" + } + }, + "SEMANTIC_TYPE_PATH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SEMANTIC_TYPE_PATH" + } + }, + "REFERENCED_ENTITY_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REFERENCED_ENTITY_ID" } - ] + } } }, "com.amazonaws.iotthingsgraph#EntityFilterValue": { @@ -951,50 +1037,68 @@ } }, "com.amazonaws.iotthingsgraph#EntityType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DEVICE", - "name": "DEVICE" - }, - { - "value": "SERVICE", - "name": "SERVICE" - }, - { - "value": "DEVICE_MODEL", - "name": "DEVICE_MODEL" - }, - { - "value": "CAPABILITY", - "name": "CAPABILITY" - }, - { - "value": "STATE", - "name": "STATE" - }, - { - "value": "ACTION", - "name": "ACTION" - }, - { - "value": "EVENT", - "name": "EVENT" - }, - { - "value": "PROPERTY", - "name": "PROPERTY" - }, - { - "value": "MAPPING", - "name": "MAPPING" - }, - { - "value": "ENUM", - "name": "ENUM" + "type": "enum", + "members": { + "DEVICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEVICE" } - ] + }, + "SERVICE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SERVICE" + } + }, + "DEVICE_MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEVICE_MODEL" + } + }, + "CAPABILITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CAPABILITY" + } + }, + "STATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STATE" + } + }, + "ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTION" + } + }, + "EVENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EVENT" + } + }, + "PROPERTY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROPERTY" + } + }, + "MAPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MAPPING" + } + }, + "ENUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENUM" + } + } } }, "com.amazonaws.iotthingsgraph#EntityTypes": { @@ -1013,78 +1117,110 @@ } }, "com.amazonaws.iotthingsgraph#FlowExecutionEventType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EXECUTION_STARTED", - "name": "EXECUTION_STARTED" - }, - { - "value": "EXECUTION_FAILED", - "name": "EXECUTION_FAILED" - }, - { - "value": "EXECUTION_ABORTED", - "name": "EXECUTION_ABORTED" - }, - { - "value": "EXECUTION_SUCCEEDED", - "name": "EXECUTION_SUCCEEDED" - }, - { - "value": "STEP_STARTED", - "name": "STEP_STARTED" - }, - { - "value": "STEP_FAILED", - "name": "STEP_FAILED" - }, - { - "value": "STEP_SUCCEEDED", - "name": "STEP_SUCCEEDED" - }, - { - "value": "ACTIVITY_SCHEDULED", - "name": "ACTIVITY_SCHEDULED" - }, - { - "value": "ACTIVITY_STARTED", - "name": "ACTIVITY_STARTED" - }, - { - "value": "ACTIVITY_FAILED", - "name": "ACTIVITY_FAILED" - }, - { - "value": "ACTIVITY_SUCCEEDED", - "name": "ACTIVITY_SUCCEEDED" - }, - { - "value": "START_FLOW_EXECUTION_TASK", - "name": "START_FLOW_EXECUTION_TASK" - }, - { - "value": "SCHEDULE_NEXT_READY_STEPS_TASK", - "name": "SCHEDULE_NEXT_READY_STEPS_TASK" - }, - { - "value": "THING_ACTION_TASK", - "name": "THING_ACTION_TASK" - }, - { - "value": "THING_ACTION_TASK_FAILED", - "name": "THING_ACTION_TASK_FAILED" - }, - { - "value": "THING_ACTION_TASK_SUCCEEDED", - "name": "THING_ACTION_TASK_SUCCEEDED" - }, - { - "value": "ACKNOWLEDGE_TASK_MESSAGE", - "name": "ACKNOWLEDGE_TASK_MESSAGE" + "type": "enum", + "members": { + "EXECUTION_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXECUTION_STARTED" + } + }, + "EXECUTION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXECUTION_FAILED" + } + }, + "EXECUTION_ABORTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXECUTION_ABORTED" + } + }, + "EXECUTION_SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXECUTION_SUCCEEDED" + } + }, + "STEP_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STEP_STARTED" + } + }, + "STEP_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STEP_FAILED" + } + }, + "STEP_SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STEP_SUCCEEDED" + } + }, + "ACTIVITY_SCHEDULED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_SCHEDULED" + } + }, + "ACTIVITY_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_STARTED" + } + }, + "ACTIVITY_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_FAILED" + } + }, + "ACTIVITY_SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVITY_SUCCEEDED" + } + }, + "START_FLOW_EXECUTION_TASK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "START_FLOW_EXECUTION_TASK" + } + }, + "SCHEDULE_NEXT_READY_STEPS_TASK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SCHEDULE_NEXT_READY_STEPS_TASK" + } + }, + "THING_ACTION_TASK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "THING_ACTION_TASK" + } + }, + "THING_ACTION_TASK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "THING_ACTION_TASK_FAILED" + } + }, + "THING_ACTION_TASK_SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "THING_ACTION_TASK_SUCCEEDED" + } + }, + "ACKNOWLEDGE_TASK_MESSAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACKNOWLEDGE_TASK_MESSAGE" } - ] + } } }, "com.amazonaws.iotthingsgraph#FlowExecutionId": { @@ -1135,26 +1271,32 @@ } }, "com.amazonaws.iotthingsgraph#FlowExecutionStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "ABORTED", - "name": "ABORTED" - }, - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "ABORTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ABORTED" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + } } }, "com.amazonaws.iotthingsgraph#FlowExecutionSummaries": { @@ -1256,14 +1398,14 @@ } }, "com.amazonaws.iotthingsgraph#FlowTemplateFilterName": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DEVICE_MODEL_ID", - "name": "DEVICE_MODEL_ID" + "type": "enum", + "members": { + "DEVICE_MODEL_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEVICE_MODEL_ID" } - ] + } } }, "com.amazonaws.iotthingsgraph#FlowTemplateFilterValue": { @@ -1367,6 +1509,9 @@ "smithy.api#documentation": "

The version of the user's namespace. Defaults to the latest version of the user's namespace.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#GetEntitiesResponse": { @@ -1378,6 +1523,9 @@ "smithy.api#documentation": "

An array of descriptions for the specified entities.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#GetFlowTemplate": { @@ -1425,6 +1573,9 @@ "smithy.api#documentation": "

The number of the workflow revision to retrieve.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#GetFlowTemplateResponse": { @@ -1436,6 +1587,9 @@ "smithy.api#documentation": "

The object that describes the specified workflow.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#GetFlowTemplateRevisions": { @@ -1495,6 +1649,9 @@ "smithy.api#documentation": "

The maximum number of results to return in the response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#GetFlowTemplateRevisionsResponse": { @@ -1512,6 +1669,9 @@ "smithy.api#documentation": "

The string to specify as nextToken when you request the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#GetNamespaceDeletionStatus": { @@ -1542,7 +1702,10 @@ }, "com.amazonaws.iotthingsgraph#GetNamespaceDeletionStatusRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.iotthingsgraph#GetNamespaceDeletionStatusResponse": { "type": "structure", @@ -1577,6 +1740,9 @@ "smithy.api#documentation": "

An error code returned by the namespace deletion task.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#GetSystemInstance": { @@ -1618,6 +1784,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#GetSystemInstanceResponse": { @@ -1629,6 +1798,9 @@ "smithy.api#documentation": "

An object that describes the system instance.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#GetSystemTemplate": { @@ -1676,6 +1848,9 @@ "smithy.api#documentation": "

The number that specifies the revision of the system to get.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#GetSystemTemplateResponse": { @@ -1687,6 +1862,9 @@ "smithy.api#documentation": "

An object that contains summary data about the system.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#GetSystemTemplateRevisions": { @@ -1746,6 +1924,9 @@ "smithy.api#documentation": "

The maximum number of results to return in the response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#GetSystemTemplateRevisionsResponse": { @@ -1763,6 +1944,9 @@ "smithy.api#documentation": "

The string to specify as nextToken when you request the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#GetUploadStatus": { @@ -1804,6 +1988,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#GetUploadStatusResponse": { @@ -1854,6 +2041,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#GreengrassDeploymentId": { @@ -2016,7 +2206,7 @@ "name": "iotthingsgraph" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "AWS IoT Things Graph\n

AWS IoT Things Graph provides an integrated set of tools that enable developers to connect devices and services that use different standards, \n such as units of measure and communication protocols. AWS IoT Things Graph makes it possible to build IoT applications with little to no code by connecting devices and services \n and defining how they interact at an abstract level.

\n

For more information about how AWS IoT Things Graph works, see the User Guide.

\n \n

The AWS IoT Things Graph service is discontinued.

", + "smithy.api#documentation": "AWS IoT Things Graph\n

AWS IoT Things Graph provides an integrated set of tools that enable developers to connect devices and services that use different standards, \n such as units of measure and communication protocols. AWS IoT Things Graph makes it possible to build IoT applications with little to no code by connecting devices and services \n and defining how they interact at an abstract level.

\n

For more information about how AWS IoT Things Graph works, see the User Guide.

\n

The AWS IoT Things Graph service is discontinued.

", "smithy.api#title": "AWS IoT Things Graph", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -2078,52 +2268,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2131,13 +2325,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2147,249 +2350,200 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotthingsgraph-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://iotthingsgraph-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotthingsgraph-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://iotthingsgraph-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotthingsgraph.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://iotthingsgraph.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, { "conditions": [], "endpoint": { - "url": "https://iotthingsgraph.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://iotthingsgraph.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://iotthingsgraph.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://iotthingsgraph.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2404,8 +2558,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2417,8 +2571,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2430,8 +2584,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2443,8 +2597,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2456,8 +2610,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2469,8 +2623,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2482,8 +2636,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2495,8 +2649,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2508,8 +2662,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2521,8 +2675,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2534,8 +2688,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2547,8 +2701,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2560,8 +2714,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2573,8 +2727,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2586,8 +2740,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2599,8 +2753,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2612,8 +2766,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2625,8 +2790,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2638,8 +2814,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2651,8 +2838,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2664,8 +2862,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2677,8 +2875,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2690,8 +2888,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2702,8 +2900,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2714,10 +2912,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2794,6 +2998,9 @@ "smithy.api#documentation": "

The maximum number of results to return in the response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#ListFlowExecutionMessagesResponse": { @@ -2811,6 +3018,9 @@ "smithy.api#documentation": "

The string to specify as nextToken when you request the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#ListTagsForResource": { @@ -2870,6 +3080,9 @@ "smithy.api#documentation": "

The token that specifies the next page of results to return.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#ListTagsForResourceResponse": { @@ -2887,6 +3100,9 @@ "smithy.api#documentation": "

The token that specifies the next page of results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#MaxResults": { @@ -2920,33 +3136,37 @@ } }, "com.amazonaws.iotthingsgraph#NamespaceDeletionStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" } - ] + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } } }, "com.amazonaws.iotthingsgraph#NamespaceDeletionStatusErrorCodes": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "VALIDATION_FAILED", - "name": "VALIDATION_FAILED" + "type": "enum", + "members": { + "VALIDATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VALIDATION_FAILED" } - ] + } } }, "com.amazonaws.iotthingsgraph#NamespaceName": { @@ -3066,7 +3286,7 @@ "filters": { "target": "com.amazonaws.iotthingsgraph#EntityFilters", "traits": { - "smithy.api#documentation": "

Optional filter to apply to the search. Valid filters are NAME \n NAMESPACE, SEMANTIC_TYPE_PATH and REFERENCED_ENTITY_ID. \n REFERENCED_ENTITY_ID filters on entities that are used by the entity in the result set. For example, \n you can filter on the ID of a property that is used in a state.

\n

Multiple filters function as OR criteria in the query. Multiple values passed inside the filter function as AND criteria.

" + "smithy.api#documentation": "

Optional filter to apply to the search. Valid filters are NAME\n NAMESPACE, SEMANTIC_TYPE_PATH and REFERENCED_ENTITY_ID. \n REFERENCED_ENTITY_ID filters on entities that are used by the entity in the result set. For example, \n you can filter on the ID of a property that is used in a state.

\n

Multiple filters function as OR criteria in the query. Multiple values passed inside the filter function as AND criteria.

" } }, "nextToken": { @@ -3087,6 +3307,9 @@ "smithy.api#documentation": "

The version of the user's namespace. Defaults to the latest version of the user's namespace.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#SearchEntitiesResponse": { @@ -3104,6 +3327,9 @@ "smithy.api#documentation": "

The string to specify as nextToken when you request the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#SearchFlowExecutions": { @@ -3181,6 +3407,9 @@ "smithy.api#documentation": "

The maximum number of results to return in the response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#SearchFlowExecutionsResponse": { @@ -3198,6 +3427,9 @@ "smithy.api#documentation": "

The string to specify as nextToken when you request the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#SearchFlowTemplates": { @@ -3253,6 +3485,9 @@ "smithy.api#documentation": "

The maximum number of results to return in the response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#SearchFlowTemplatesResponse": { @@ -3270,6 +3505,9 @@ "smithy.api#documentation": "

The string to specify as nextToken when you request the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#SearchSystemInstances": { @@ -3325,6 +3563,9 @@ "smithy.api#documentation": "

The maximum number of results to return in the response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#SearchSystemInstancesResponse": { @@ -3342,6 +3583,9 @@ "smithy.api#documentation": "

The string to specify as nextToken when you request the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#SearchSystemTemplates": { @@ -3397,6 +3641,9 @@ "smithy.api#documentation": "

The maximum number of results to return in the response.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#SearchSystemTemplatesResponse": { @@ -3414,6 +3661,9 @@ "smithy.api#documentation": "

The string to specify as nextToken when you request the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#SearchThings": { @@ -3479,6 +3729,9 @@ "smithy.api#documentation": "

The version of the user's namespace. Defaults to the latest version of the user's namespace.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#SearchThingsResponse": { @@ -3496,6 +3749,9 @@ "smithy.api#documentation": "

The string to specify as nextToken when you request the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#String": { @@ -3514,42 +3770,56 @@ } }, "com.amazonaws.iotthingsgraph#SystemInstanceDeploymentStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NOT_DEPLOYED", - "name": "NOT_DEPLOYED" - }, - { - "value": "BOOTSTRAP", - "name": "BOOTSTRAP" - }, - { - "value": "DEPLOY_IN_PROGRESS", - "name": "DEPLOY_IN_PROGRESS" - }, - { - "value": "DEPLOYED_IN_TARGET", - "name": "DEPLOYED_IN_TARGET" - }, - { - "value": "UNDEPLOY_IN_PROGRESS", - "name": "UNDEPLOY_IN_PROGRESS" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "PENDING_DELETE", - "name": "PENDING_DELETE" - }, - { - "value": "DELETED_IN_TARGET", - "name": "DELETED_IN_TARGET" + "type": "enum", + "members": { + "NOT_DEPLOYED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_DEPLOYED" + } + }, + "BOOTSTRAP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOOTSTRAP" } - ] + }, + "DEPLOY_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEPLOY_IN_PROGRESS" + } + }, + "DEPLOYED_IN_TARGET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEPLOYED_IN_TARGET" + } + }, + "UNDEPLOY_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNDEPLOY_IN_PROGRESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "PENDING_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_DELETE" + } + }, + "DELETED_IN_TARGET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED_IN_TARGET" + } + } } }, "com.amazonaws.iotthingsgraph#SystemInstanceDescription": { @@ -3617,22 +3887,26 @@ } }, "com.amazonaws.iotthingsgraph#SystemInstanceFilterName": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SYSTEM_TEMPLATE_ID", - "name": "SYSTEM_TEMPLATE_ID" - }, - { - "value": "STATUS", - "name": "STATUS" - }, - { - "value": "GREENGRASS_GROUP_NAME", - "name": "GREENGRASS_GROUP_NAME" + "type": "enum", + "members": { + "SYSTEM_TEMPLATE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SYSTEM_TEMPLATE_ID" + } + }, + "STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STATUS" + } + }, + "GREENGRASS_GROUP_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GREENGRASS_GROUP_NAME" } - ] + } } }, "com.amazonaws.iotthingsgraph#SystemInstanceFilterValue": { @@ -3767,14 +4041,14 @@ } }, "com.amazonaws.iotthingsgraph#SystemTemplateFilterName": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "FLOW_TEMPLATE_ID", - "name": "FLOW_TEMPLATE_ID" + "type": "enum", + "members": { + "FLOW_TEMPLATE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FLOW_TEMPLATE_ID" } - ] + } } }, "com.amazonaws.iotthingsgraph#SystemTemplateFilterValue": { @@ -3935,11 +4209,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotthingsgraph#TagValue": { "type": "string", @@ -4046,6 +4326,9 @@ "smithy.api#documentation": "

The ID of the system instance to remove from its target.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#UndeploySystemInstanceResponse": { @@ -4057,6 +4340,9 @@ "smithy.api#documentation": "

An object that contains summary information about the system instance that was removed from its target.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#UntagResource": { @@ -4105,11 +4391,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.iotthingsgraph#UpdateFlowTemplate": { "type": "operation", @@ -4163,6 +4455,9 @@ "smithy.api#documentation": "

The version of the user's namespace.

\n

If no value is specified, the latest version is used by default. Use the GetFlowTemplateRevisions if you want to find earlier revisions of the flow \n to update.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#UpdateFlowTemplateResponse": { @@ -4174,6 +4469,9 @@ "smithy.api#documentation": "

An object containing summary information about the updated workflow.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#UpdateSystemTemplate": { @@ -4228,6 +4526,9 @@ "smithy.api#documentation": "

The version of the user's namespace. Defaults to the latest version of the user's namespace.

\n

If no value is specified, the latest version is used by default.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#UpdateSystemTemplateResponse": { @@ -4239,6 +4540,9 @@ "smithy.api#documentation": "

An object containing summary information about the updated system.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#UploadEntityDefinitions": { @@ -4290,6 +4594,9 @@ "smithy.api#documentation": "

A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new DefinitionDocument. \n If set to true, the upload will create a new namespace version.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.iotthingsgraph#UploadEntityDefinitionsResponse": { @@ -4302,6 +4609,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.iotthingsgraph#UploadId": { @@ -4314,22 +4624,26 @@ } }, "com.amazonaws.iotthingsgraph#UploadStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "SUCCEEDED", - "name": "SUCCEEDED" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" } - ] + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } } }, "com.amazonaws.iotthingsgraph#Urn": { diff --git a/codegen/sdk-codegen/aws-models/iottwinmaker.json b/codegen/sdk-codegen/aws-models/iottwinmaker.json index 48111b39a16..a5e71defce0 100644 --- a/codegen/sdk-codegen/aws-models/iottwinmaker.json +++ b/codegen/sdk-codegen/aws-models/iottwinmaker.json @@ -179,52 +179,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -232,13 +236,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -248,224 +261,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iottwinmaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://iottwinmaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iottwinmaker-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://iottwinmaker-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iottwinmaker.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://iottwinmaker.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://iottwinmaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://iottwinmaker.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/ivschat.json b/codegen/sdk-codegen/aws-models/ivschat.json index 639d5e8d886..448bf7db7b5 100644 --- a/codegen/sdk-codegen/aws-models/ivschat.json +++ b/codegen/sdk-codegen/aws-models/ivschat.json @@ -165,52 +165,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -218,13 +222,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -234,224 +247,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ivschat-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://ivschat-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ivschat-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://ivschat-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://ivschat.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://ivschat.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://ivschat.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://ivschat.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -465,9 +429,9 @@ } }, "params": { - "UseDualStack": false, "Region": "eu-west-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -478,9 +442,9 @@ } }, "params": { - "UseDualStack": false, "Region": "us-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -491,9 +455,9 @@ } }, "params": { - "UseDualStack": false, "Region": "us-west-2", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -504,9 +468,9 @@ } }, "params": { - "UseDualStack": true, "Region": "us-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -517,9 +481,9 @@ } }, "params": { - "UseDualStack": false, "Region": "us-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -530,9 +494,9 @@ } }, "params": { - "UseDualStack": true, "Region": "us-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -543,9 +507,9 @@ } }, "params": { - "UseDualStack": true, "Region": "cn-north-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -556,9 +520,9 @@ } }, "params": { - "UseDualStack": false, "Region": "cn-north-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -569,9 +533,9 @@ } }, "params": { - "UseDualStack": true, "Region": "cn-north-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -582,9 +546,9 @@ } }, "params": { - "UseDualStack": false, "Region": "cn-north-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -595,9 +559,9 @@ } }, "params": { - "UseDualStack": true, "Region": "us-gov-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -608,9 +572,9 @@ } }, "params": { - "UseDualStack": false, "Region": "us-gov-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -621,9 +585,9 @@ } }, "params": { - "UseDualStack": true, "Region": "us-gov-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -634,9 +598,20 @@ } }, "params": { - "UseDualStack": false, "Region": "us-gov-east-1", - "UseFIPS": false + "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 } }, { @@ -647,9 +622,20 @@ } }, "params": { - "UseDualStack": false, "Region": "us-iso-east-1", - "UseFIPS": true + "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 } }, { @@ -660,9 +646,20 @@ } }, "params": { - "UseDualStack": false, "Region": "us-iso-east-1", - "UseFIPS": false + "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 } }, { @@ -673,9 +670,20 @@ } }, "params": { - "UseDualStack": false, "Region": "us-isob-east-1", - "UseFIPS": true + "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 } }, { @@ -686,9 +694,9 @@ } }, "params": { - "UseDualStack": false, "Region": "us-isob-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -699,9 +707,9 @@ } }, "params": { - "UseDualStack": false, "Region": "us-east-1", "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -713,8 +721,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -724,9 +732,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, "Region": "us-east-1", "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -736,11 +744,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, "Region": "us-east-1", "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/kafka.json b/codegen/sdk-codegen/aws-models/kafka.json index 866e4a8e186..240cc8b6dd7 100644 --- a/codegen/sdk-codegen/aws-models/kafka.json +++ b/codegen/sdk-codegen/aws-models/kafka.json @@ -3539,52 +3539,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3592,13 +3596,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3608,92 +3621,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kafka-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://kafka-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -3702,155 +3706,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://kafka.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://kafka-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://kafka.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://kafka-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kafka.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://kafka.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://kafka.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kafka.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/kendra-ranking.json b/codegen/sdk-codegen/aws-models/kendra-ranking.json index bde40b03771..982a5ee8cc7 100644 --- a/codegen/sdk-codegen/aws-models/kendra-ranking.json +++ b/codegen/sdk-codegen/aws-models/kendra-ranking.json @@ -141,18 +141,28 @@ ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -160,19 +170,35 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ + true, { - "ref": "Region" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] } - ], - "assign": "PartitionResult" + ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], "type": "tree", "rules": [ { @@ -187,7 +213,7 @@ { "ref": "PartitionResult" }, - "supportsDualStack" + "supportsFIPS" ] } ] @@ -195,62 +221,10 @@ ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kendra-ranking-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, { "conditions": [], "endpoint": { - "url": "https://kendra-ranking.{Region}.{PartitionResult#dualStackDnsSuffix}", + "url": "https://kendra-ranking-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, @@ -260,95 +234,91 @@ }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kendra-ranking.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ + "fn": "getAttr", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kendra-ranking-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "ref": "PartitionResult" }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kendra-ranking.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsFIPS" ] } ] } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://kendra-ranking-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kendra-ranking.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -461,6 +431,12 @@ "UseFIPS": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -610,6 +586,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kendraranking#CreateRescoreExecutionPlanResponse": { @@ -629,6 +608,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.kendraranking#DeleteRescoreExecutionPlan": { @@ -679,6 +661,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kendraranking#DescribeRescoreExecutionPlan": { @@ -726,6 +711,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kendraranking#DescribeRescoreExecutionPlanResponse": { @@ -785,6 +773,9 @@ "smithy.api#documentation": "

When the Status field value is \n FAILED, the ErrorMessage field \n contains a message that explains why.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.kendraranking#Description": { @@ -982,6 +973,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kendraranking#ListRescoreExecutionPlansResponse": { @@ -999,6 +993,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Kendra Intelligent \n Ranking returns a pagination token in the response.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.kendraranking#ListTagsForResource": { @@ -1042,7 +1039,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request information for listing tags associated with \n a rescore execution plan. A rescore execution plan is an \n Amazon Kendra Intelligent Ranking resource used for \n provisioning the Rescore API.

" + "smithy.api#documentation": "

The request information for listing tags associated with \n a rescore execution plan. A rescore execution plan is an \n Amazon Kendra Intelligent Ranking resource used for \n provisioning the Rescore API.

", + "smithy.api#input": {} } }, "com.amazonaws.kendraranking#ListTagsForResourceResponse": { @@ -1056,7 +1054,8 @@ } }, "traits": { - "smithy.api#documentation": "

If the action is successful, the service sends back an \n HTTP 200 response.

" + "smithy.api#documentation": "

If the action is successful, the service sends back an \n HTTP 200 response.

", + "smithy.api#output": {} } }, "com.amazonaws.kendraranking#MaxResultsIntegerForListRescoreExecutionPlansRequest": { @@ -1267,6 +1266,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kendraranking#RescoreResult": { @@ -1284,6 +1286,9 @@ "smithy.api#documentation": "

A list of result items for documents with new relevancy \n scores. The results are in descending order.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.kendraranking#RescoreResultItem": { @@ -1468,14 +1473,16 @@ } }, "traits": { - "smithy.api#documentation": "

The request information for tagging a rescore execution \n plan. A rescore execution plan is an Amazon Kendra \n Intelligent Ranking resource used for provisioning the \n Rescore API.

" + "smithy.api#documentation": "

The request information for tagging a rescore execution \n plan. A rescore execution plan is an Amazon Kendra \n Intelligent Ranking resource used for provisioning the \n Rescore API.

", + "smithy.api#input": {} } }, "com.amazonaws.kendraranking#TagResourceResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

If the action is successful, the service sends back an \n HTTP 200 response with an empty HTTP body.

" + "smithy.api#documentation": "

If the action is successful, the service sends back an \n HTTP 200 response with an empty HTTP body.

", + "smithy.api#output": {} } }, "com.amazonaws.kendraranking#TagValue": { @@ -1571,14 +1578,16 @@ } }, "traits": { - "smithy.api#documentation": "

The request information to remove a tag from a rescore \n execution plan. A rescore execution plan is an \n Amazon Kendra Intelligent Ranking resource used for\n provisioning the Rescore API.

" + "smithy.api#documentation": "

The request information to remove a tag from a rescore \n execution plan. A rescore execution plan is an \n Amazon Kendra Intelligent Ranking resource used for\n provisioning the Rescore API.

", + "smithy.api#input": {} } }, "com.amazonaws.kendraranking#UntagResourceResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

If the action is successful, the service sends back an \n HTTP 200 response with an empty HTTP body.

" + "smithy.api#documentation": "

If the action is successful, the service sends back an \n HTTP 200 response with an empty HTTP body.

", + "smithy.api#output": {} } }, "com.amazonaws.kendraranking#UpdateRescoreExecutionPlan": { @@ -1650,6 +1659,9 @@ "smithy.api#documentation": "

You can set additional capacity units to meet the needs \n of your rescore execution plan. You are given a single capacity \n unit by default. If you want to use the default capacity, you \n don't set additional capacity units. For more information on the\n default capacity and additional capacity units, see \n Adjusting capacity.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kendraranking#ValidationException": { diff --git a/codegen/sdk-codegen/aws-models/keyspaces.json b/codegen/sdk-codegen/aws-models/keyspaces.json index 6af4cb8c43f..0b6f584a571 100644 --- a/codegen/sdk-codegen/aws-models/keyspaces.json +++ b/codegen/sdk-codegen/aws-models/keyspaces.json @@ -942,52 +942,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -995,13 +999,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1011,92 +1024,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cassandra-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://cassandra-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -1105,155 +1109,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://cassandra.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://cassandra-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://cassandra.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://cassandra-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://cassandra.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://cassandra.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://cassandra.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://cassandra.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/kinesis-analytics-v2.json b/codegen/sdk-codegen/aws-models/kinesis-analytics-v2.json index 8af138d065b..e8c3a11dcd0 100644 --- a/codegen/sdk-codegen/aws-models/kinesis-analytics-v2.json +++ b/codegen/sdk-codegen/aws-models/kinesis-analytics-v2.json @@ -3685,6 +3685,7 @@ "arnNamespace": "kinesisanalytics", "cloudFormationName": "KinesisAnalyticsV2", "cloudTrailEventSource": "kinesisanalyticsv2.amazonaws.com", + "docId": "kinesisanalyticsv2-2018-05-23", "endpointPrefix": "kinesisanalytics" }, "aws.auth#sigv4": { @@ -3756,52 +3757,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3809,13 +3814,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3825,224 +3839,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kinesisanalytics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://kinesisanalytics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kinesisanalytics-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://kinesisanalytics-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kinesisanalytics.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://kinesisanalytics.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://kinesisanalytics.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kinesisanalytics.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/kinesis-analytics.json b/codegen/sdk-codegen/aws-models/kinesis-analytics.json index 1efc6dedb64..f72ca07d2de 100644 --- a/codegen/sdk-codegen/aws-models/kinesis-analytics.json +++ b/codegen/sdk-codegen/aws-models/kinesis-analytics.json @@ -82,11 +82,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#AddApplicationCloudWatchLoggingOptionResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.kinesisanalytics#AddApplicationInput": { "type": "operation", @@ -180,11 +186,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#AddApplicationInputProcessingConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.kinesisanalytics#AddApplicationInputRequest": { "type": "structure", @@ -212,14 +224,16 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#AddApplicationInputResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#AddApplicationOutput": { @@ -277,14 +291,16 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#AddApplicationOutputResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#AddApplicationReferenceDataSource": { @@ -342,14 +358,16 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#AddApplicationReferenceDataSourceResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#ApplicationCode": { @@ -461,38 +479,48 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[a-zA-Z0-9_.-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" } }, "com.amazonaws.kinesisanalytics#ApplicationStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DELETING", - "name": "DELETING" - }, - { - "value": "STARTING", - "name": "STARTING" - }, - { - "value": "STOPPING", - "name": "STOPPING" - }, - { - "value": "READY", - "name": "READY" - }, - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "UPDATING", - "name": "UPDATING" + "type": "enum", + "members": { + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "STARTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STARTING" + } + }, + "STOPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPING" } - ] + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY" + } + }, + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + } } }, "com.amazonaws.kinesisanalytics#ApplicationSummaries": { @@ -587,7 +615,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "arn:.*" + "smithy.api#pattern": "^arn:" } }, "com.amazonaws.kinesisanalytics#CSVMappingParameters": { @@ -818,7 +846,8 @@ } }, "traits": { - "smithy.api#documentation": "

TBD

" + "smithy.api#documentation": "

TBD

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#CreateApplicationResponse": { @@ -833,7 +862,8 @@ } }, "traits": { - "smithy.api#documentation": "

TBD

" + "smithy.api#documentation": "

TBD

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#DeleteApplication": { @@ -915,11 +945,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#DeleteApplicationCloudWatchLoggingOptionResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.kinesisanalytics#DeleteApplicationInputProcessingConfiguration": { "type": "operation", @@ -974,11 +1010,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#DeleteApplicationInputProcessingConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.kinesisanalytics#DeleteApplicationOutput": { "type": "operation", @@ -1035,14 +1077,16 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#DeleteApplicationOutputResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#DeleteApplicationReferenceDataSource": { @@ -1098,11 +1142,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#DeleteApplicationReferenceDataSourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.kinesisanalytics#DeleteApplicationRequest": { "type": "structure", @@ -1123,14 +1173,16 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#DeleteApplicationResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#DescribeApplication": { @@ -1165,7 +1217,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#DescribeApplicationResponse": { @@ -1180,7 +1233,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#DestinationSchema": { @@ -1257,6 +1311,9 @@ "smithy.api#documentation": "

The InputProcessingConfiguration to use to preprocess the records before discovering the schema of the records.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#DiscoverInputSchemaResponse": { @@ -1288,7 +1345,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#ErrorMessage": { @@ -1310,7 +1368,7 @@ "min": 1, "max": 50 }, - "smithy.api#pattern": "[a-zA-Z0-9_.-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" } }, "com.amazonaws.kinesisanalytics#InAppStreamName": { @@ -1649,22 +1707,26 @@ } }, "com.amazonaws.kinesisanalytics#InputStartingPosition": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NOW", - "name": "NOW" - }, - { - "value": "TRIM_HORIZON", - "name": "TRIM_HORIZON" - }, - { - "value": "LAST_STOPPED_POINT", - "name": "LAST_STOPPED_POINT" + "type": "enum", + "members": { + "NOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOW" + } + }, + "TRIM_HORIZON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TRIM_HORIZON" } - ] + }, + "LAST_STOPPED_POINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LAST_STOPPED_POINT" + } + } } }, "com.amazonaws.kinesisanalytics#InputStartingPositionConfiguration": { @@ -1796,7 +1858,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "arn:aws:kinesisanalytics:[a-z]{2}-[a-z]+-\\d{1}+:\\d{12}+:application/[a-zA-Z0-9_.-]{1,128}" + "smithy.api#pattern": "^arn:aws:kinesisanalytics:[a-z]{2}-[a-z]+-\\d{1}+:\\d{12}+:application/[a-zA-Z0-9_.-]{1,128}$" } }, "com.amazonaws.kinesisanalytics#KinesisAnalytics_20150814": { @@ -1870,6 +1932,7 @@ "arnNamespace": "kinesisanalytics", "cloudFormationName": "KinesisAnalytics", "cloudTrailEventSource": "kinesisanalytics.amazonaws.com", + "docId": "kinesisanalytics-2015-08-14", "endpointPrefix": "kinesisanalytics" }, "aws.auth#sigv4": { @@ -1941,52 +2004,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1994,13 +2061,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2010,224 +2086,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kinesisanalytics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://kinesisanalytics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kinesisanalytics-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://kinesisanalytics-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kinesisanalytics.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://kinesisanalytics.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://kinesisanalytics.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kinesisanalytics.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2242,8 +2269,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2255,8 +2282,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2268,8 +2295,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2281,8 +2308,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2294,8 +2321,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2307,8 +2334,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2320,8 +2347,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2333,8 +2360,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2346,8 +2373,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2359,8 +2386,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2372,8 +2399,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2385,8 +2412,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2398,8 +2425,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2411,8 +2438,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2424,8 +2451,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2437,8 +2464,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2450,8 +2477,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2463,8 +2490,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2476,8 +2503,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2489,8 +2516,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2502,8 +2529,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2515,8 +2542,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2528,8 +2555,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2541,8 +2568,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2554,8 +2581,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2567,8 +2594,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2580,8 +2607,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2593,8 +2620,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2606,8 +2633,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2619,8 +2646,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2632,8 +2659,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2645,8 +2672,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2658,8 +2685,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2671,8 +2698,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -2684,8 +2722,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2697,8 +2746,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2710,8 +2770,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2723,8 +2794,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2736,8 +2807,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2749,8 +2820,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2761,8 +2832,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2773,10 +2844,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3146,7 +3223,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#ListApplicationsResponse": { @@ -3168,7 +3246,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#ListTagsForResource": { @@ -3204,6 +3283,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#ListTagsForResourceResponse": { @@ -3215,6 +3297,9 @@ "smithy.api#documentation": "

The key-value tags assigned to the application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#LogStreamARN": { @@ -3224,7 +3309,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "arn:.*" + "smithy.api#pattern": "^arn:" } }, "com.amazonaws.kinesisanalytics#MappingParameters": { @@ -3492,7 +3577,7 @@ "com.amazonaws.kinesisanalytics#RecordEncoding": { "type": "string", "traits": { - "smithy.api#pattern": "UTF-8" + "smithy.api#pattern": "^UTF-8$" } }, "com.amazonaws.kinesisanalytics#RecordFormat": { @@ -3517,18 +3602,20 @@ } }, "com.amazonaws.kinesisanalytics#RecordFormatType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "JSON", - "name": "JSON" - }, - { - "value": "CSV", - "name": "CSV" + "type": "enum", + "members": { + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JSON" + } + }, + "CSV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CSV" } - ] + } } }, "com.amazonaws.kinesisanalytics#RecordRowDelimiter": { @@ -3662,7 +3749,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "arn:.*" + "smithy.api#pattern": "^arn:" } }, "com.amazonaws.kinesisanalytics#ResourceInUseException": { @@ -3714,7 +3801,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+" + "smithy.api#pattern": "^arn:aws:iam::\\d{12}:role/?[a-zA-Z_0-9+=,.@\\-_/]+$" } }, "com.amazonaws.kinesisanalytics#S3Configuration": { @@ -3919,14 +4006,16 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#StartApplicationResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#StopApplication": { @@ -3964,14 +4053,16 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#StopApplicationResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.kinesisanalytics#Tag": { @@ -4062,11 +4153,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.kinesisanalytics#TagValue": { "type": "string", @@ -4180,11 +4277,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.kinesisanalytics#UpdateApplication": { "type": "operation", @@ -4242,11 +4345,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisanalytics#UpdateApplicationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } } } } diff --git a/codegen/sdk-codegen/aws-models/kinesis-video-archived-media.json b/codegen/sdk-codegen/aws-models/kinesis-video-archived-media.json index 58f4391edec..b09c67c6e3c 100644 --- a/codegen/sdk-codegen/aws-models/kinesis-video-archived-media.json +++ b/codegen/sdk-codegen/aws-models/kinesis-video-archived-media.json @@ -126,52 +126,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -179,13 +183,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -195,224 +208,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1682,6 +1646,12 @@ "method": "POST", "uri": "/getImages", "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Images", + "pageSize": "MaxResults" } } }, @@ -2162,6 +2132,12 @@ "method": "POST", "uri": "/listFragments", "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Fragments", + "pageSize": "MaxResults" } } }, diff --git a/codegen/sdk-codegen/aws-models/kinesis-video-media.json b/codegen/sdk-codegen/aws-models/kinesis-video-media.json index cce54df63d6..40b0ebde538 100644 --- a/codegen/sdk-codegen/aws-models/kinesis-video-media.json +++ b/codegen/sdk-codegen/aws-models/kinesis-video-media.json @@ -111,52 +111,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -164,13 +168,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -180,224 +193,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -412,8 +376,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -425,8 +389,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -438,8 +402,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -451,8 +415,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -464,8 +428,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -477,8 +441,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -490,8 +454,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -503,8 +467,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -516,8 +480,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -529,8 +493,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -542,8 +506,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -555,8 +519,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -568,8 +532,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -581,8 +545,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -594,8 +558,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -607,8 +571,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -620,8 +584,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -633,8 +597,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -646,8 +610,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -659,8 +623,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -672,8 +636,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -685,8 +649,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -698,8 +662,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -711,8 +675,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -724,8 +688,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -737,8 +701,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -750,8 +714,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -763,8 +738,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -776,8 +762,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -789,8 +786,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -802,8 +810,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -815,8 +823,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -828,8 +836,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -840,8 +848,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -852,10 +860,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -980,6 +994,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisvideomedia#GetMediaOutput": { @@ -1000,6 +1017,9 @@ "smithy.api#httpPayload": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.kinesisvideomedia#InvalidArgumentException": { @@ -1054,7 +1074,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "arn:aws:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA-Z0-9_.-]+/[0-9]+" + "smithy.api#pattern": "^arn:aws:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA-Z0-9_.-]+/[0-9]+$" } }, "com.amazonaws.kinesisvideomedia#ResourceNotFoundException": { @@ -1104,34 +1124,44 @@ } }, "com.amazonaws.kinesisvideomedia#StartSelectorType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "FRAGMENT_NUMBER", - "name": "FRAGMENT_NUMBER" - }, - { - "value": "SERVER_TIMESTAMP", - "name": "SERVER_TIMESTAMP" - }, - { - "value": "PRODUCER_TIMESTAMP", - "name": "PRODUCER_TIMESTAMP" - }, - { - "value": "NOW", - "name": "NOW" - }, - { - "value": "EARLIEST", - "name": "EARLIEST" - }, - { - "value": "CONTINUATION_TOKEN", - "name": "CONTINUATION_TOKEN" + "type": "enum", + "members": { + "FRAGMENT_NUMBER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FRAGMENT_NUMBER" + } + }, + "SERVER_TIMESTAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SERVER_TIMESTAMP" + } + }, + "PRODUCER_TIMESTAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PRODUCER_TIMESTAMP" } - ] + }, + "NOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOW" + } + }, + "EARLIEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EARLIEST" + } + }, + "CONTINUATION_TOKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTINUATION_TOKEN" + } + } } }, "com.amazonaws.kinesisvideomedia#StreamName": { @@ -1141,7 +1171,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[a-zA-Z0-9_.-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" } }, "com.amazonaws.kinesisvideomedia#Timestamp": { diff --git a/codegen/sdk-codegen/aws-models/kinesis-video-signaling.json b/codegen/sdk-codegen/aws-models/kinesis-video-signaling.json index 1492f9a9cc3..1e619ed2168 100644 --- a/codegen/sdk-codegen/aws-models/kinesis-video-signaling.json +++ b/codegen/sdk-codegen/aws-models/kinesis-video-signaling.json @@ -114,52 +114,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -167,13 +171,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -183,224 +196,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://kinesisvideo-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://kinesisvideo.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kinesisvideo.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -415,8 +379,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -428,8 +392,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -441,8 +405,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -454,8 +418,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -467,8 +431,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -480,8 +444,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -493,8 +457,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -506,8 +470,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -519,8 +483,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -532,8 +496,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -545,8 +509,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -558,8 +522,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -571,8 +535,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -584,8 +548,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -597,8 +561,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -610,8 +574,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -623,8 +587,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -636,8 +600,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -649,8 +613,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -662,8 +626,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -675,8 +639,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -688,8 +652,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -701,8 +665,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -714,8 +678,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -727,8 +691,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -740,8 +704,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -753,8 +717,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -766,8 +741,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -779,8 +765,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -792,8 +789,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -805,8 +813,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -818,8 +826,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -831,8 +839,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -843,8 +851,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -855,10 +863,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -881,7 +895,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[a-zA-Z0-9_.-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" } }, "com.amazonaws.kinesisvideosignaling#ClientLimitExceededException": { @@ -965,6 +979,9 @@ "smithy.api#documentation": "

An optional user ID to be associated with the credentials.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisvideosignaling#GetIceServerConfigResponse": { @@ -976,6 +993,9 @@ "smithy.api#documentation": "

The list of ICE server information objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.kinesisvideosignaling#IceServer": { @@ -1050,7 +1070,7 @@ "min": 1, "max": 10000 }, - "smithy.api#pattern": "[a-zA-Z0-9+/=]+" + "smithy.api#pattern": "^[a-zA-Z0-9+/=]+$" } }, "com.amazonaws.kinesisvideosignaling#NotAuthorizedException": { @@ -1073,7 +1093,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[a-zA-Z0-9_.-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" } }, "com.amazonaws.kinesisvideosignaling#ResourceARN": { @@ -1083,7 +1103,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "arn:aws:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA-Z0-9_.-]+/[0-9]+" + "smithy.api#pattern": "^arn:aws:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA-Z0-9_.-]+/[0-9]+$" } }, "com.amazonaws.kinesisvideosignaling#ResourceNotFoundException": { @@ -1154,6 +1174,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.kinesisvideosignaling#SendAlexaOfferToMasterResponse": { @@ -1165,17 +1188,20 @@ "smithy.api#documentation": "

The base64-encoded SDP answer content.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.kinesisvideosignaling#Service": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "TURN", - "name": "TURN" + "type": "enum", + "members": { + "TURN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TURN" } - ] + } } }, "com.amazonaws.kinesisvideosignaling#SessionExpiredException": { @@ -1223,7 +1249,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[a-zA-Z0-9_.-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" } } } diff --git a/codegen/sdk-codegen/aws-models/kinesis-video-webrtc-storage.json b/codegen/sdk-codegen/aws-models/kinesis-video-webrtc-storage.json index 48b0174327a..f1080dd13ce 100644 --- a/codegen/sdk-codegen/aws-models/kinesis-video-webrtc-storage.json +++ b/codegen/sdk-codegen/aws-models/kinesis-video-webrtc-storage.json @@ -386,55 +386,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://kinesisvideo-fips.us-gov-east-1.api.aws" + "url": "https://kinesisvideo-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://kinesisvideo-fips.us-gov-east-1.amazonaws.com" + "url": "https://kinesisvideo-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://kinesisvideo.us-gov-east-1.api.aws" + "url": "https://kinesisvideo.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://kinesisvideo.us-gov-east-1.amazonaws.com" + "url": "https://kinesisvideo.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -445,9 +445,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -458,9 +458,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -471,9 +471,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -484,109 +484,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://kinesisvideo-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://kinesisvideo-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://kinesisvideo-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://kinesisvideo.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://kinesisvideo.us-iso-east-1.c2s.ic.gov" + "url": "https://kinesisvideo.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://kinesisvideo-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://kinesisvideo-fips.us-east-1.amazonaws.com" + "url": "https://kinesisvideo-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://kinesisvideo.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://kinesisvideo.us-east-1.amazonaws.com" + "url": "https://kinesisvideo.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -595,9 +595,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -608,9 +608,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -619,9 +619,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -632,22 +632,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -657,9 +670,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -669,11 +682,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -785,4 +804,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/kinesis-video.json b/codegen/sdk-codegen/aws-models/kinesis-video.json index 164994cb4b4..1edd9ca070c 100644 --- a/codegen/sdk-codegen/aws-models/kinesis-video.json +++ b/codegen/sdk-codegen/aws-models/kinesis-video.json @@ -1828,6 +1828,7 @@ "arnNamespace": "kinesisvideo", "cloudFormationName": "KinesisVideo", "cloudTrailEventSource": "kinesisvideo.amazonaws.com", + "docId": "kinesisvideo-2017-09-30", "endpointPrefix": "kinesisvideo" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/kinesis.json b/codegen/sdk-codegen/aws-models/kinesis.json index be019ded5c4..162fd4dde40 100644 --- a/codegen/sdk-codegen/aws-models/kinesis.json +++ b/codegen/sdk-codegen/aws-models/kinesis.json @@ -1644,7 +1644,7 @@ "uri": "http://kinesis.amazonaws.com/doc/2013-12-02" }, "smithy.rules#endpointRuleSet": { - "version": "1.3", + "version": "1.0", "parameters": { "Region": { "builtIn": "AWS::Region", @@ -1787,7 +1787,23 @@ "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "arn" + }, + "accountId" + ] + }, + false + ] + } + ], "type": "tree", "rules": [ { @@ -1801,7 +1817,7 @@ { "ref": "arn" }, - "accountId" + "region" ] }, false @@ -1811,31 +1827,66 @@ "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "arn" + }, + "service" + ] + }, + "kinesis" + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isValidHostLabel", + "fn": "getAttr", + "argv": [ + { + "ref": "arn" + }, + "resourceId[0]" + ], + "assign": "arnType" + }, + { + "fn": "not", "argv": [ { - "fn": "getAttr", + "fn": "stringEquals", "argv": [ { - "ref": "arn" + "ref": "arnType" }, - "region" + "" ] - }, - false + } ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "arnType" + }, + "stream" + ] + } + ], "type": "tree", "rules": [ { @@ -1847,63 +1898,88 @@ "fn": "getAttr", "argv": [ { - "ref": "arn" + "ref": "PartitionResult" }, - "service" + "name" ] }, - "kinesis" + "{arn#partition}" ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "OperationType" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "arn" + "ref": "UseFIPS" }, - "resourceId[0]" - ], - "assign": "arnType" + true + ] }, { - "fn": "not", + "fn": "booleanEquals", "argv": [ { - "fn": "stringEquals", - "argv": [ - { - "ref": "arnType" - }, - "" - ] - } + "ref": "UseDualStack" + }, + true ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "stringEquals", + "fn": "booleanEquals", "argv": [ { - "ref": "arnType" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] }, - "stream" + true ] } ], @@ -1911,320 +1987,190 @@ "rules": [ { "conditions": [], - "type": "tree", - "rules": [ + "endpoint": { + "url": "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled, but this partition does not support DualStack.", + "type": "error" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled, but this partition does not support FIPS.", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - }, - "{arn#partition}" - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "OperationType" - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "DualStack is enabled, but this partition does not support DualStack.", - "type": "error" - } - ] - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled, but this partition does not support FIPS.", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] - }, - { - "conditions": [], - "endpoint": { - "url": "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, - { - "conditions": [], - "error": "Operation Type is not set. Please contact service team for resolution.", - "type": "error" - } - ] - } - ] + "ref": "PartitionResult" }, - { - "conditions": [], - "error": "Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.", - "type": "error" - } + "supportsFIPS" ] - } + }, + true ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.", - "type": "error" + "endpoint": { + "url": "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] }, { "conditions": [], - "error": "Invalid ARN: No ARN type specified", - "type": "error" + "endpoint": { + "url": "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "Operation Type is not set. Please contact service team for resolution.", + "type": "error" } ] }, { "conditions": [], - "error": "Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.", + "error": "Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.", "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.", + "type": "error" } ] }, { "conditions": [], - "error": "Invalid ARN: Invalid region.", + "error": "Invalid ARN: No ARN type specified", "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.", + "type": "error" } ] }, { "conditions": [], - "error": "Invalid ARN: Invalid account id.", + "error": "Invalid ARN: Invalid region.", "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid ARN: Invalid account id.", + "type": "error" } ] }, @@ -2333,7 +2279,23 @@ "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "isValidHostLabel", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "arn" + }, + "accountId" + ] + }, + false + ] + } + ], "type": "tree", "rules": [ { @@ -2347,7 +2309,7 @@ { "ref": "arn" }, - "accountId" + "region" ] }, false @@ -2357,31 +2319,66 @@ "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "arn" + }, + "service" + ] + }, + "kinesis" + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isValidHostLabel", + "fn": "getAttr", + "argv": [ + { + "ref": "arn" + }, + "resourceId[0]" + ], + "assign": "arnType" + }, + { + "fn": "not", "argv": [ { - "fn": "getAttr", + "fn": "stringEquals", "argv": [ { - "ref": "arn" + "ref": "arnType" }, - "region" + "" ] - }, - false + } ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "arnType" + }, + "stream" + ] + } + ], "type": "tree", "rules": [ { @@ -2393,63 +2390,88 @@ "fn": "getAttr", "argv": [ { - "ref": "arn" + "ref": "PartitionResult" }, - "service" + "name" ] }, - "kinesis" + "{arn#partition}" ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "OperationType" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "getAttr", + "fn": "booleanEquals", "argv": [ { - "ref": "arn" + "ref": "UseFIPS" }, - "resourceId[0]" - ], - "assign": "arnType" + true + ] }, { - "fn": "not", + "fn": "booleanEquals", "argv": [ { - "fn": "stringEquals", - "argv": [ - { - "ref": "arnType" - }, - "" - ] - } + "ref": "UseDualStack" + }, + true ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "stringEquals", + "fn": "booleanEquals", "argv": [ { - "ref": "arnType" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] }, - "stream" + true ] } ], @@ -2457,320 +2479,190 @@ "rules": [ { "conditions": [], - "type": "tree", - "rules": [ + "endpoint": { + "url": "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled, but this partition does not support DualStack.", + "type": "error" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled, but this partition does not support FIPS.", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - }, - "{arn#partition}" - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "OperationType" - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "DualStack is enabled, but this partition does not support DualStack.", - "type": "error" - } - ] - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled, but this partition does not support FIPS.", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] - }, - { - "conditions": [], - "endpoint": { - "url": "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, - { - "conditions": [], - "error": "Operation Type is not set. Please contact service team for resolution.", - "type": "error" - } - ] - } - ] + "ref": "PartitionResult" }, - { - "conditions": [], - "error": "Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.", - "type": "error" - } + "supportsFIPS" ] - } + }, + true ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.", - "type": "error" + "endpoint": { + "url": "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] }, { "conditions": [], - "error": "Invalid ARN: No ARN type specified", - "type": "error" + "endpoint": { + "url": "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "Operation Type is not set. Please contact service team for resolution.", + "type": "error" } ] }, { "conditions": [], - "error": "Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.", + "error": "Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.", "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.", + "type": "error" } ] }, { "conditions": [], - "error": "Invalid ARN: Invalid region.", + "error": "Invalid ARN: No ARN type specified", "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.", + "type": "error" } ] }, { "conditions": [], - "error": "Invalid ARN: Invalid account id.", + "error": "Invalid ARN: Invalid region.", "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid ARN: Invalid account id.", + "type": "error" } ] }, @@ -2810,52 +2702,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2863,13 +2759,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2879,175 +2784,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://kinesis.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -3056,110 +2869,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://kinesis.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://kinesis.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-gov-west-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://kinesis.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://kinesis.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kinesis.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3174,8 +2992,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3187,8 +3005,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3200,8 +3018,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3213,8 +3031,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3226,8 +3044,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3239,8 +3057,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3252,8 +3070,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3265,8 +3083,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3278,8 +3096,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3291,8 +3109,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3304,8 +3122,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3317,8 +3135,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3330,8 +3148,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3343,8 +3161,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3356,8 +3174,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3369,8 +3187,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3382,8 +3200,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3395,8 +3213,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3408,8 +3226,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3421,8 +3239,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3434,8 +3252,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3447,8 +3265,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3460,8 +3278,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3473,8 +3291,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3486,8 +3304,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3499,8 +3317,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3512,8 +3330,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3525,8 +3343,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3538,8 +3356,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3551,8 +3369,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3564,8 +3382,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3577,8 +3395,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3590,8 +3408,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3603,8 +3421,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3616,8 +3434,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3629,8 +3447,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3642,8 +3460,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3655,8 +3473,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3668,8 +3486,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3681,8 +3499,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3694,8 +3512,19 @@ }, "params": { "Region": "us-iso-west-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3707,8 +3536,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3720,8 +3560,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3733,8 +3584,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3746,8 +3608,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3759,8 +3621,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3771,8 +3633,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3783,11 +3645,17 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + }, { "documentation": "Invalid ARN: Failed to parse ARN.", "expect": { diff --git a/codegen/sdk-codegen/aws-models/kms.json b/codegen/sdk-codegen/aws-models/kms.json index c5426034d9b..3a8eb8f9747 100644 --- a/codegen/sdk-codegen/aws-models/kms.json +++ b/codegen/sdk-codegen/aws-models/kms.json @@ -188,7 +188,19 @@ } ], "traits": { - "smithy.api#documentation": "

Cancels the deletion of a KMS key. When this operation succeeds, the key state of the KMS\n key is Disabled. To enable the KMS key, use EnableKey.

\n

For more information about scheduling and canceling deletion of a KMS key, see Deleting KMS keys in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:CancelKeyDeletion (key policy)

\n

\n Related operations: ScheduleKeyDeletion\n

" + "smithy.api#documentation": "

Cancels the deletion of a KMS key. When this operation succeeds, the key state of the KMS\n key is Disabled. To enable the KMS key, use EnableKey.

\n

For more information about scheduling and canceling deletion of a KMS key, see Deleting KMS keys in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:CancelKeyDeletion (key policy)

\n

\n Related operations: ScheduleKeyDeletion\n

", + "smithy.api#examples": [ + { + "title": "To cancel deletion of a KMS key", + "documentation": "The following example cancels deletion of the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "output": { + "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#CancelKeyDeletionRequest": { @@ -350,7 +362,17 @@ } ], "traits": { - "smithy.api#documentation": "

Connects or reconnects a custom key store to its backing key store. For an CloudHSM key\n store, ConnectCustomKeyStore connects the key store to its associated CloudHSM\n cluster. For an external key store, ConnectCustomKeyStore connects the key store\n to the external key store proxy that communicates with your external key manager.

\n

The custom key store must be connected before you can create KMS keys in the key store or\n use the KMS keys it contains. You can disconnect and reconnect a custom key store at any\n time.

\n

The connection process for a custom key store can take an extended amount of time to\n complete. This operation starts the connection process, but it does not wait for it to\n complete. When it succeeds, this operation quickly returns an HTTP 200 response and a JSON\n object with no properties. However, this response does not indicate that the custom key store\n is connected. To get the connection state of the custom key store, use the DescribeCustomKeyStores operation.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n

The ConnectCustomKeyStore operation might fail for various reasons. To find\n the reason, use the DescribeCustomKeyStores operation and see the\n ConnectionErrorCode in the response. For help interpreting the\n ConnectionErrorCode, see CustomKeyStoresListEntry.

\n

To fix the failure, use the DisconnectCustomKeyStore operation to\n disconnect the custom key store, correct the error, use the UpdateCustomKeyStore operation if necessary, and then use\n ConnectCustomKeyStore again.

\n

\n CloudHSM key store\n

\n

During the connection process for an CloudHSM key store, KMS finds the CloudHSM cluster that\n is associated with the custom key store, creates the connection infrastructure, connects to\n the cluster, logs into the CloudHSM client as the kmsuser CU, and rotates its\n password.

\n

To connect an CloudHSM key store, its associated CloudHSM cluster must have at least one active\n HSM. To get the number of active HSMs in a cluster, use the DescribeClusters operation. To add HSMs\n to the cluster, use the CreateHsm operation. Also, the \n kmsuser crypto\n user (CU) must not be logged into the cluster. This prevents KMS from using this\n account to log in.

\n

If you are having trouble connecting or disconnecting a CloudHSM key store, see Troubleshooting an CloudHSM key\n store in the Key Management Service Developer Guide.

\n

\n External key store\n

\n

When you connect an external key store that uses public endpoint connectivity, KMS tests\n its ability to communicate with your external key manager by sending a request via the\n external key store proxy.

\n

When you connect to an external key store that uses VPC endpoint service connectivity,\n KMS establishes the networking elements that it needs to communicate with your external key\n manager via the external key store proxy. This includes creating an interface endpoint to the\n VPC endpoint service and a private hosted zone for traffic between KMS and the VPC endpoint\n service.

\n

To connect an external key store, KMS must be able to connect to the external key store\n proxy, the external key store proxy must be able to communicate with your external key\n manager, and the external key manager must be available for cryptographic operations.

\n

If you are having trouble connecting or disconnecting an external key store, see Troubleshooting an external\n key store in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:ConnectCustomKeyStore (IAM policy)

\n

\n Related operations\n

\n " + "smithy.api#documentation": "

Connects or reconnects a custom key store to its backing key store. For an CloudHSM key\n store, ConnectCustomKeyStore connects the key store to its associated CloudHSM\n cluster. For an external key store, ConnectCustomKeyStore connects the key store\n to the external key store proxy that communicates with your external key manager.

\n

The custom key store must be connected before you can create KMS keys in the key store or\n use the KMS keys it contains. You can disconnect and reconnect a custom key store at any\n time.

\n

The connection process for a custom key store can take an extended amount of time to\n complete. This operation starts the connection process, but it does not wait for it to\n complete. When it succeeds, this operation quickly returns an HTTP 200 response and a JSON\n object with no properties. However, this response does not indicate that the custom key store\n is connected. To get the connection state of the custom key store, use the DescribeCustomKeyStores operation.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n

The ConnectCustomKeyStore operation might fail for various reasons. To find\n the reason, use the DescribeCustomKeyStores operation and see the\n ConnectionErrorCode in the response. For help interpreting the\n ConnectionErrorCode, see CustomKeyStoresListEntry.

\n

To fix the failure, use the DisconnectCustomKeyStore operation to\n disconnect the custom key store, correct the error, use the UpdateCustomKeyStore operation if necessary, and then use\n ConnectCustomKeyStore again.

\n

\n CloudHSM key store\n

\n

During the connection process for an CloudHSM key store, KMS finds the CloudHSM cluster that\n is associated with the custom key store, creates the connection infrastructure, connects to\n the cluster, logs into the CloudHSM client as the kmsuser CU, and rotates its\n password.

\n

To connect an CloudHSM key store, its associated CloudHSM cluster must have at least one active\n HSM. To get the number of active HSMs in a cluster, use the DescribeClusters operation. To add HSMs\n to the cluster, use the CreateHsm operation. Also, the \n kmsuser crypto\n user (CU) must not be logged into the cluster. This prevents KMS from using this\n account to log in.

\n

If you are having trouble connecting or disconnecting a CloudHSM key store, see Troubleshooting an CloudHSM key\n store in the Key Management Service Developer Guide.

\n

\n External key store\n

\n

When you connect an external key store that uses public endpoint connectivity, KMS tests\n its ability to communicate with your external key manager by sending a request via the\n external key store proxy.

\n

When you connect to an external key store that uses VPC endpoint service connectivity,\n KMS establishes the networking elements that it needs to communicate with your external key\n manager via the external key store proxy. This includes creating an interface endpoint to the\n VPC endpoint service and a private hosted zone for traffic between KMS and the VPC endpoint\n service.

\n

To connect an external key store, KMS must be able to connect to the external key store\n proxy, the external key store proxy must be able to communicate with your external key\n manager, and the external key manager must be available for cryptographic operations.

\n

If you are having trouble connecting or disconnecting an external key store, see Troubleshooting an external\n key store in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:ConnectCustomKeyStore (IAM policy)

\n

\n Related operations\n

\n ", + "smithy.api#examples": [ + { + "title": "To connect a custom key store", + "documentation": "This example connects an AWS KMS custom key store to its backing key store. For an AWS CloudHSM key store, it connects the key store to its AWS CloudHSM cluster. For an external key store, it connects the key store to the external key store proxy that communicates with your external key manager. This operation does not return any data. To verify that the custom key store is connected, use the DescribeCustomKeyStores operation.", + "input": { + "CustomKeyStoreId": "cks-1234567890abcdef0" + }, + "output": {} + } + ] } }, "com.amazonaws.kms#ConnectCustomKeyStoreRequest": { @@ -555,7 +577,17 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a friendly name for a KMS key.

\n \n

Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

You can use an alias to identify a KMS key in the KMS console, in the DescribeKey operation and in cryptographic operations, such as Encrypt and\n GenerateDataKey. You can also change the KMS key that's associated with\n the alias (UpdateAlias) or delete the alias (DeleteAlias)\n at any time. These operations don't affect the underlying KMS key.

\n

You can associate the alias with any customer managed key in the same Amazon Web Services Region. Each\n alias is associated with only one KMS key at a time, but a KMS key can have multiple aliases.\n A valid KMS key is required. You can't create an alias without a KMS key.

\n

The alias must be unique in the account and Region, but you can have aliases with the same\n name in different Regions. For detailed information about aliases, see Using aliases in the\n Key Management Service Developer Guide.

\n

This operation does not return a response. To get the alias that you created, use the\n ListAliases operation.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on an alias in a different Amazon Web Services account.

\n

\n Required permissions\n

\n \n

For details, see Controlling access to aliases in the\n Key Management Service Developer Guide.

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Creates a friendly name for a KMS key.

\n \n

Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

You can use an alias to identify a KMS key in the KMS console, in the DescribeKey operation and in cryptographic operations, such as Encrypt and\n GenerateDataKey. You can also change the KMS key that's associated with\n the alias (UpdateAlias) or delete the alias (DeleteAlias)\n at any time. These operations don't affect the underlying KMS key.

\n

You can associate the alias with any customer managed key in the same Amazon Web Services Region. Each\n alias is associated with only one KMS key at a time, but a KMS key can have multiple aliases.\n A valid KMS key is required. You can't create an alias without a KMS key.

\n

The alias must be unique in the account and Region, but you can have aliases with the same\n name in different Regions. For detailed information about aliases, see Using aliases in the\n Key Management Service Developer Guide.

\n

This operation does not return a response. To get the alias that you created, use the\n ListAliases operation.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on an alias in a different Amazon Web Services account.

\n

\n Required permissions\n

\n \n

For details, see Controlling access to aliases in the\n Key Management Service Developer Guide.

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To create an alias", + "documentation": "The following example creates an alias for the specified KMS key.", + "input": { + "AliasName": "alias/ExampleAlias", + "TargetKeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#CreateAliasRequest": { @@ -642,7 +674,22 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a custom key store backed by a key store that you own and manage. When you use a\n KMS key in a custom key store for a cryptographic operation, the cryptographic operation is\n actually performed in your key store using your keys. KMS supports CloudHSM key stores\n backed by an CloudHSM cluster\n and external key\n stores backed by an external key store proxy and external key manager outside of\n Amazon Web Services.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n

Before you create the custom key store, the required elements must be in place and\n operational. We recommend that you use the test tools that KMS provides to verify the\n configuration your external key store proxy. For details about the required elements and\n verification tests, see Assemble the prerequisites (for\n CloudHSM key stores) or Assemble the prerequisites (for\n external key stores) in the Key Management Service Developer Guide.

\n

To create a custom key store, use the following parameters.

\n
    \n
  • \n

    To create an CloudHSM key store, specify the CustomKeyStoreName,\n CloudHsmClusterId, KeyStorePassword, and\n TrustAnchorCertificate. The CustomKeyStoreType parameter is\n optional for CloudHSM key stores. If you include it, set it to the default value,\n AWS_CLOUDHSM. For help with failures, see Troubleshooting an CloudHSM key store in the\n Key Management Service Developer Guide.

    \n
  • \n
  • \n

    To create an external key store, specify the CustomKeyStoreName and a\n CustomKeyStoreType of EXTERNAL_KEY_STORE. Also, specify values\n for XksProxyConnectivity, XksProxyAuthenticationCredential,\n XksProxyUriEndpoint, and XksProxyUriPath. If your\n XksProxyConnectivity value is VPC_ENDPOINT_SERVICE, specify\n the XksProxyVpcEndpointServiceName parameter. For help with failures, see\n Troubleshooting\n an external key store in the Key Management Service Developer Guide.

    \n
  • \n
\n \n

For external key stores:

\n

Some external key managers provide a simpler method for creating an external key store.\n For details, see your external key manager documentation.

\n

When creating an external key store in the KMS console, you can upload a JSON-based\n proxy configuration file with the desired values. You cannot use a proxy configuration with\n the CreateCustomKeyStore operation. However, you can use the values in the file\n to help you determine the correct values for the CreateCustomKeyStore\n parameters.

\n
\n

When the operation completes successfully, it returns the ID of the new custom key store.\n Before you can use your new custom key store, you need to use the ConnectCustomKeyStore operation to connect a new CloudHSM key store to its CloudHSM\n cluster, or to connect a new external key store to the external key store proxy for your\n external key manager. Even if you are not going to use your custom key store immediately, you\n might want to connect it to verify that all settings are correct and then disconnect it until\n you are ready to use it.

\n

For help with failures, see Troubleshooting a custom key store in the\n Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:CreateCustomKeyStore (IAM policy).

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Creates a custom key store backed by a key store that you own and manage. When you use a\n KMS key in a custom key store for a cryptographic operation, the cryptographic operation is\n actually performed in your key store using your keys. KMS supports CloudHSM key stores\n backed by an CloudHSM cluster\n and external key\n stores backed by an external key store proxy and external key manager outside of\n Amazon Web Services.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n

Before you create the custom key store, the required elements must be in place and\n operational. We recommend that you use the test tools that KMS provides to verify the\n configuration your external key store proxy. For details about the required elements and\n verification tests, see Assemble the prerequisites (for\n CloudHSM key stores) or Assemble the prerequisites (for\n external key stores) in the Key Management Service Developer Guide.

\n

To create a custom key store, use the following parameters.

\n
    \n
  • \n

    To create an CloudHSM key store, specify the CustomKeyStoreName,\n CloudHsmClusterId, KeyStorePassword, and\n TrustAnchorCertificate. The CustomKeyStoreType parameter is\n optional for CloudHSM key stores. If you include it, set it to the default value,\n AWS_CLOUDHSM. For help with failures, see Troubleshooting an CloudHSM key store in the\n Key Management Service Developer Guide.

    \n
  • \n
  • \n

    To create an external key store, specify the CustomKeyStoreName and a\n CustomKeyStoreType of EXTERNAL_KEY_STORE. Also, specify values\n for XksProxyConnectivity, XksProxyAuthenticationCredential,\n XksProxyUriEndpoint, and XksProxyUriPath. If your\n XksProxyConnectivity value is VPC_ENDPOINT_SERVICE, specify\n the XksProxyVpcEndpointServiceName parameter. For help with failures, see\n Troubleshooting\n an external key store in the Key Management Service Developer Guide.

    \n
  • \n
\n \n

For external key stores:

\n

Some external key managers provide a simpler method for creating an external key store.\n For details, see your external key manager documentation.

\n

When creating an external key store in the KMS console, you can upload a JSON-based\n proxy configuration file with the desired values. You cannot use a proxy configuration with\n the CreateCustomKeyStore operation. However, you can use the values in the file\n to help you determine the correct values for the CreateCustomKeyStore\n parameters.

\n
\n

When the operation completes successfully, it returns the ID of the new custom key store.\n Before you can use your new custom key store, you need to use the ConnectCustomKeyStore operation to connect a new CloudHSM key store to its CloudHSM\n cluster, or to connect a new external key store to the external key store proxy for your\n external key manager. Even if you are not going to use your custom key store immediately, you\n might want to connect it to verify that all settings are correct and then disconnect it until\n you are ready to use it.

\n

For help with failures, see Troubleshooting a custom key store in the\n Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:CreateCustomKeyStore (IAM policy).

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To create an AWS CloudHSM key store", + "documentation": "This example creates a custom key store that is associated with an AWS CloudHSM cluster.", + "input": { + "CustomKeyStoreName": "ExampleKeyStore", + "CloudHsmClusterId": "cluster-234abcdefABC", + "TrustAnchorCertificate": "", + "KeyStorePassword": "kmsPswd" + }, + "output": { + "CustomKeyStoreId": "cks-1234567890abcdef0" + } + } + ] } }, "com.amazonaws.kms#CreateCustomKeyStoreRequest": { @@ -766,7 +813,25 @@ } ], "traits": { - "smithy.api#documentation": "

Adds a grant to a KMS key.

\n

A grant is a policy instrument that allows Amazon Web Services principals to use\n KMS keys in cryptographic operations. It also can allow them to view a KMS key (DescribeKey) and create and manage grants. When authorizing access to a KMS key,\n grants are considered along with key policies and IAM policies. Grants are often used for\n temporary permissions because you can create one, use its permissions, and delete it without\n changing your key policies or IAM policies.

\n

For detailed information about grants, including grant terminology, see Grants in KMS in the\n \n Key Management Service Developer Guide\n . For examples of working with grants in several\n programming languages, see Programming grants.

\n

The CreateGrant operation returns a GrantToken and a\n GrantId.

\n
    \n
  • \n

    When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as eventual consistency. Once the grant has achieved eventual consistency, the grantee\n principal can use the permissions in the grant without identifying the grant.

    \n

    However, to use the permissions in the grant immediately, use the\n GrantToken that CreateGrant returns. For details, see Using a\n grant token in the \n Key Management Service Developer Guide\n .

    \n
  • \n
  • \n

    The CreateGrant operation also returns a GrantId. You can\n use the GrantId and a key identifier to identify the grant in the RetireGrant and RevokeGrant operations. To find the grant\n ID, use the ListGrants or ListRetirableGrants\n operations.

    \n
  • \n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:CreateGrant (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Adds a grant to a KMS key.

\n

A grant is a policy instrument that allows Amazon Web Services principals to use\n KMS keys in cryptographic operations. It also can allow them to view a KMS key (DescribeKey) and create and manage grants. When authorizing access to a KMS key,\n grants are considered along with key policies and IAM policies. Grants are often used for\n temporary permissions because you can create one, use its permissions, and delete it without\n changing your key policies or IAM policies.

\n

For detailed information about grants, including grant terminology, see Grants in KMS in the\n \n Key Management Service Developer Guide\n . For examples of working with grants in several\n programming languages, see Programming grants.

\n

The CreateGrant operation returns a GrantToken and a\n GrantId.

\n
    \n
  • \n

    When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as eventual consistency. Once the grant has achieved eventual consistency, the grantee\n principal can use the permissions in the grant without identifying the grant.

    \n

    However, to use the permissions in the grant immediately, use the\n GrantToken that CreateGrant returns. For details, see Using a\n grant token in the \n Key Management Service Developer Guide\n .

    \n
  • \n
  • \n

    The CreateGrant operation also returns a GrantId. You can\n use the GrantId and a key identifier to identify the grant in the RetireGrant and RevokeGrant operations. To find the grant\n ID, use the ListGrants or ListRetirableGrants\n operations.

    \n
  • \n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:CreateGrant (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To create a grant", + "documentation": "The following example creates a grant that allows the specified IAM role to encrypt data with the specified KMS key.", + "input": { + "KeyId": "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "GranteePrincipal": "arn:aws:iam::111122223333:role/ExampleRole", + "Operations": [ + "Encrypt", + "Decrypt" + ] + }, + "output": { + "GrantToken": "AQpAM2RhZTk1MGMyNTk2ZmZmMzEyYWVhOWViN2I1MWM4Mzc0MWFiYjc0ZDE1ODkyNGFlNTIzODZhMzgyZjBlNGY3NiKIAgEBAgB4Pa6VDCWW__MSrqnre1HIN0Grt00ViSSuUjhqOC8OT3YAAADfMIHcBgkqhkiG9w0BBwaggc4wgcsCAQAwgcUGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMmqLyBTAegIn9XlK5AgEQgIGXZQjkBcl1dykDdqZBUQ6L1OfUivQy7JVYO2-ZJP7m6f1g8GzV47HX5phdtONAP7K_HQIflcgpkoCqd_fUnE114mSmiagWkbQ5sqAVV3ov-VeqgrvMe5ZFEWLMSluvBAqdjHEdMIkHMlhlj4ENZbzBfo9Wxk8b8SnwP4kc4gGivedzFXo-dwN8fxjjq_ZZ9JFOj2ijIbj5FyogDCN0drOfi8RORSEuCEmPvjFRMFAwcmwFkN2NPp89amA", + "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60" + } + } + ] } }, "com.amazonaws.kms#CreateGrantRequest": { @@ -1369,7 +1434,22 @@ } ], "traits": { - "smithy.api#documentation": "

Decrypts ciphertext that was encrypted by a KMS key using any of the following\n operations:

\n \n

You can use this operation to decrypt ciphertext that was encrypted under a symmetric\n encryption KMS key or an asymmetric encryption KMS key. When the KMS key is asymmetric, you\n must specify the KMS key and the encryption algorithm that was used to encrypt the ciphertext.\n For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

The Decrypt operation also decrypts ciphertext that was encrypted outside of\n KMS by the public key in an KMS asymmetric KMS key. However, it cannot decrypt symmetric\n ciphertext produced by other libraries, such as the Amazon Web Services Encryption SDK or Amazon S3 client-side encryption.\n These libraries return a ciphertext format that is incompatible with KMS.

\n

If the ciphertext was encrypted under a symmetric encryption KMS key, the\n KeyId parameter is optional. KMS can get this information from metadata that\n it adds to the symmetric ciphertext blob. This feature adds durability to your implementation\n by ensuring that authorized users can decrypt ciphertext decades after it was encrypted, even\n if they've lost track of the key ID. However, specifying the KMS key is always recommended as\n a best practice. When you use the KeyId parameter to specify a KMS key, KMS\n only uses the KMS key you specify. If the ciphertext was encrypted under a different KMS key,\n the Decrypt operation fails. This practice ensures that you use the KMS key that\n you intend.

\n

Whenever possible, use key policies to give users permission to call the\n Decrypt operation on a particular KMS key, instead of using &IAM; policies.\n Otherwise, you might create an &IAM; policy that gives the user Decrypt\n permission on all KMS keys. This user could decrypt ciphertext that was encrypted by KMS keys\n in other accounts if the key policy for the cross-account KMS key permits it. If you must use\n an IAM policy for Decrypt permissions, limit the user to particular KMS keys or\n particular trusted accounts. For details, see Best practices for IAM\n policies in the Key Management Service Developer Guide.

\n

\n Decrypt also supports Amazon Web Services Nitro Enclaves, which provide an\n isolated compute environment in Amazon EC2. To call Decrypt for a Nitro enclave, use\n the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient parameter to provide the\n attestation document for the enclave. Instead of the plaintext data, the response includes the\n plaintext data encrypted with the public key from the attestation document\n (CiphertextForRecipient).For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide..

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. If you use the KeyId\n parameter to identify a KMS key in a different Amazon Web Services account, specify the key ARN or the alias\n ARN of the KMS key.

\n

\n Required permissions: kms:Decrypt (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Decrypts ciphertext that was encrypted by a KMS key using any of the following\n operations:

\n \n

You can use this operation to decrypt ciphertext that was encrypted under a symmetric\n encryption KMS key or an asymmetric encryption KMS key. When the KMS key is asymmetric, you\n must specify the KMS key and the encryption algorithm that was used to encrypt the ciphertext.\n For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

The Decrypt operation also decrypts ciphertext that was encrypted outside of\n KMS by the public key in an KMS asymmetric KMS key. However, it cannot decrypt symmetric\n ciphertext produced by other libraries, such as the Amazon Web Services Encryption SDK or Amazon S3 client-side encryption.\n These libraries return a ciphertext format that is incompatible with KMS.

\n

If the ciphertext was encrypted under a symmetric encryption KMS key, the\n KeyId parameter is optional. KMS can get this information from metadata that\n it adds to the symmetric ciphertext blob. This feature adds durability to your implementation\n by ensuring that authorized users can decrypt ciphertext decades after it was encrypted, even\n if they've lost track of the key ID. However, specifying the KMS key is always recommended as\n a best practice. When you use the KeyId parameter to specify a KMS key, KMS\n only uses the KMS key you specify. If the ciphertext was encrypted under a different KMS key,\n the Decrypt operation fails. This practice ensures that you use the KMS key that\n you intend.

\n

Whenever possible, use key policies to give users permission to call the\n Decrypt operation on a particular KMS key, instead of using &IAM; policies.\n Otherwise, you might create an &IAM; policy that gives the user Decrypt\n permission on all KMS keys. This user could decrypt ciphertext that was encrypted by KMS keys\n in other accounts if the key policy for the cross-account KMS key permits it. If you must use\n an IAM policy for Decrypt permissions, limit the user to particular KMS keys or\n particular trusted accounts. For details, see Best practices for IAM\n policies in the Key Management Service Developer Guide.

\n

\n Decrypt also supports Amazon Web Services Nitro Enclaves, which provide an\n isolated compute environment in Amazon EC2. To call Decrypt for a Nitro enclave, use\n the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient parameter to provide the\n attestation document for the enclave. Instead of the plaintext data, the response includes the\n plaintext data encrypted with the public key from the attestation document\n (CiphertextForRecipient).For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide..

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. If you use the KeyId\n parameter to identify a KMS key in a different Amazon Web Services account, specify the key ARN or the alias\n ARN of the KMS key.

\n

\n Required permissions: kms:Decrypt (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To decrypt data with a symmetric encryption KMS key", + "documentation": "The following example decrypts data that was encrypted with a symmetric encryption KMS key. The KeyId is not required when decrypting with a symmetric encryption key, but it is a best practice.", + "input": { + "CiphertextBlob": "", + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "output": { + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "Plaintext": "", + "EncryptionAlgorithm": "SYMMETRIC_DEFAULT" + } + } + ] } }, "com.amazonaws.kms#DecryptRequest": { @@ -1478,7 +1558,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified alias.

\n \n

Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

Because an alias is not a property of a KMS key, you can delete and change the aliases of\n a KMS key without affecting the KMS key. Also, aliases do not appear in the response from the\n DescribeKey operation. To get the aliases of all KMS keys, use the ListAliases operation.

\n

Each KMS key can have multiple aliases. To change the alias of a KMS key, use DeleteAlias to delete the current alias and CreateAlias to\n create a new alias. To associate an existing alias with a different KMS key, call UpdateAlias.

\n

\n Cross-account use: No. You cannot perform this operation on an alias in a different Amazon Web Services account.

\n

\n Required permissions\n

\n \n

For details, see Controlling access to aliases in the\n Key Management Service Developer Guide.

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Deletes the specified alias.

\n \n

Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

Because an alias is not a property of a KMS key, you can delete and change the aliases of\n a KMS key without affecting the KMS key. Also, aliases do not appear in the response from the\n DescribeKey operation. To get the aliases of all KMS keys, use the ListAliases operation.

\n

Each KMS key can have multiple aliases. To change the alias of a KMS key, use DeleteAlias to delete the current alias and CreateAlias to\n create a new alias. To associate an existing alias with a different KMS key, call UpdateAlias.

\n

\n Cross-account use: No. You cannot perform this operation on an alias in a different Amazon Web Services account.

\n

\n Required permissions\n

\n \n

For details, see Controlling access to aliases in the\n Key Management Service Developer Guide.

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To delete an alias", + "documentation": "The following example deletes the specified alias.", + "input": { + "AliasName": "alias/ExampleAlias" + } + } + ] } }, "com.amazonaws.kms#DeleteAliasRequest": { @@ -1519,7 +1608,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a custom key store. This operation does not affect any backing elements of the\n custom key store. It does not delete the CloudHSM cluster that is associated with an CloudHSM key\n store, or affect any users or keys in the cluster. For an external key store, it does not\n affect the external key store proxy, external key manager, or any external keys.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n

The custom key store that you delete cannot contain any KMS keys. Before deleting the key store,\n verify that you will never need to use any of the KMS keys in the key store for any\n cryptographic operations. Then, use ScheduleKeyDeletion to delete the KMS keys from the\n key store. After the required waiting period expires and all KMS keys are deleted from the\n custom key store, use DisconnectCustomKeyStore to disconnect the key store\n from KMS. Then, you can delete the custom key store.

\n

For keys in an CloudHSM key store, the ScheduleKeyDeletion operation makes a\n best effort to delete the key material from the associated cluster. However, you might need to\n manually delete the orphaned key\n material from the cluster and its backups. KMS never creates, manages, or deletes\n cryptographic keys in the external key manager associated with an external key store. You must\n manage them using your external key manager tools.

\n

Instead of deleting the custom key store, consider using the DisconnectCustomKeyStore operation to disconnect the custom key store from its\n backing key store. While the key store is disconnected, you cannot create or use the KMS keys\n in the key store. But, you do not need to delete KMS keys and you can reconnect a disconnected\n custom key store at any time.

\n

If the operation succeeds, it returns a JSON object with no\nproperties.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:DeleteCustomKeyStore (IAM policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Deletes a custom key store. This operation does not affect any backing elements of the\n custom key store. It does not delete the CloudHSM cluster that is associated with an CloudHSM key\n store, or affect any users or keys in the cluster. For an external key store, it does not\n affect the external key store proxy, external key manager, or any external keys.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n

The custom key store that you delete cannot contain any KMS keys. Before deleting the key store,\n verify that you will never need to use any of the KMS keys in the key store for any\n cryptographic operations. Then, use ScheduleKeyDeletion to delete the KMS keys from the\n key store. After the required waiting period expires and all KMS keys are deleted from the\n custom key store, use DisconnectCustomKeyStore to disconnect the key store\n from KMS. Then, you can delete the custom key store.

\n

For keys in an CloudHSM key store, the ScheduleKeyDeletion operation makes a\n best effort to delete the key material from the associated cluster. However, you might need to\n manually delete the orphaned key\n material from the cluster and its backups. KMS never creates, manages, or deletes\n cryptographic keys in the external key manager associated with an external key store. You must\n manage them using your external key manager tools.

\n

Instead of deleting the custom key store, consider using the DisconnectCustomKeyStore operation to disconnect the custom key store from its\n backing key store. While the key store is disconnected, you cannot create or use the KMS keys\n in the key store. But, you do not need to delete KMS keys and you can reconnect a disconnected\n custom key store at any time.

\n

If the operation succeeds, it returns a JSON object with no\nproperties.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:DeleteCustomKeyStore (IAM policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To delete a custom key store from AWS KMS", + "documentation": "This example deletes a custom key store from AWS KMS. This operation does not affect the backing key store, such as a CloudHSM cluster, external key store proxy, or your external key manager. This operation doesn't return any data. To verify that the operation was successful, use the DescribeCustomKeyStores operation.", + "input": { + "CustomKeyStoreId": "cks-1234567890abcdef0" + }, + "output": {} + } + ] } }, "com.amazonaws.kms#DeleteCustomKeyStoreRequest": { @@ -1573,7 +1672,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes key material that was previously imported. This operation makes the specified KMS\n key temporarily unusable. To restore the usability of the KMS key, reimport the same key\n material. For more information about importing key material into KMS, see Importing Key Material\n in the Key Management Service Developer Guide.

\n

When the specified KMS key is in the PendingDeletion state, this operation\n does not change the KMS key's state. Otherwise, it changes the KMS key's state to\n PendingImport.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:DeleteImportedKeyMaterial (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Deletes key material that was previously imported. This operation makes the specified KMS\n key temporarily unusable. To restore the usability of the KMS key, reimport the same key\n material. For more information about importing key material into KMS, see Importing Key Material\n in the Key Management Service Developer Guide.

\n

When the specified KMS key is in the PendingDeletion state, this operation\n does not change the KMS key's state. Otherwise, it changes the KMS key's state to\n PendingImport.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:DeleteImportedKeyMaterial (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To delete imported key material", + "documentation": "The following example deletes the imported key material from the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#DeleteImportedKeyMaterialRequest": { @@ -1629,6 +1737,15 @@ ], "traits": { "smithy.api#documentation": "

Gets information about custom key stores in the account and Region.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n

By default, this operation returns information about all custom key stores in the account\n and Region. To get only information about a particular custom key store, use either the\n CustomKeyStoreName or CustomKeyStoreId parameter (but not\n both).

\n

To determine whether the custom key store is connected to its CloudHSM cluster or external\n key store proxy, use the ConnectionState element in the response. If an attempt\n to connect the custom key store failed, the ConnectionState value is\n FAILED and the ConnectionErrorCode element in the response\n indicates the cause of the failure. For help interpreting the\n ConnectionErrorCode, see CustomKeyStoresListEntry.

\n

Custom key stores have a DISCONNECTED connection state if the key store has\n never been connected or you used the DisconnectCustomKeyStore operation to\n disconnect it. Otherwise, the connection state is CONNECTED. If your custom key store\n connection state is CONNECTED but you are having trouble using it, verify that\n the backing store is active and available. For an CloudHSM key store, verify that the associated\n CloudHSM cluster is active and contains the minimum number of HSMs required for the operation, if\n any. For an external key store, verify that the external key store proxy and its associated\n external key manager are reachable and enabled.

\n

For help repairing your CloudHSM key store, see the Troubleshooting CloudHSM key stores. For help\n repairing your external key store, see the Troubleshooting external key stores.\n Both topics are in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:DescribeCustomKeyStores (IAM policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To get detailed information about custom key stores in the account and Region", + "documentation": "This example gets detailed information about all AWS KMS custom key stores in an AWS account and Region. To get all key stores, do not enter a custom key store name or ID.", + "output": { + "CustomKeyStores": [] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "NextMarker", @@ -1792,7 +1909,16 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the state of a KMS key to disabled. This change temporarily prevents use of the KMS\n key for cryptographic operations.

\n

For more information about how key state affects the use of a KMS key, see\n Key states of KMS keys in the \n Key Management Service Developer Guide\n .

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:DisableKey (key policy)

\n

\n Related operations: EnableKey\n

" + "smithy.api#documentation": "

Sets the state of a KMS key to disabled. This change temporarily prevents use of the KMS\n key for cryptographic operations.

\n

For more information about how key state affects the use of a KMS key, see\n Key states of KMS keys in the \n Key Management Service Developer Guide\n .

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:DisableKey (key policy)

\n

\n Related operations: EnableKey\n

", + "smithy.api#examples": [ + { + "title": "To disable a KMS key", + "documentation": "The following example disables the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#DisableKeyRequest": { @@ -1842,7 +1968,16 @@ } ], "traits": { - "smithy.api#documentation": "

Disables automatic\n rotation of the key material of the specified symmetric encryption KMS key.

\n

Automatic key rotation is supported only on symmetric encryption KMS keys.\n You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n

You can enable (EnableKeyRotation) and disable automatic rotation of the\n key material in customer managed KMS keys. Key material rotation of Amazon Web Services managed KMS keys is not\n configurable. KMS always rotates the key material for every year. Rotation of Amazon Web Services owned KMS\n keys varies.

\n \n

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three\n years to every year. For details, see EnableKeyRotation.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:DisableKeyRotation (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Disables automatic\n rotation of the key material of the specified symmetric encryption KMS key.

\n

Automatic key rotation is supported only on symmetric encryption KMS keys.\n You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n

You can enable (EnableKeyRotation) and disable automatic rotation of the\n key material in customer managed KMS keys. Key material rotation of Amazon Web Services managed KMS keys is not\n configurable. KMS always rotates the key material for every year. Rotation of Amazon Web Services owned KMS\n keys varies.

\n \n

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three\n years to every year. For details, see EnableKeyRotation.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:DisableKeyRotation (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To disable automatic rotation of key material", + "documentation": "The following example disables automatic annual rotation of the key material for the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#DisableKeyRotationRequest": { @@ -1897,7 +2032,17 @@ } ], "traits": { - "smithy.api#documentation": "

Disconnects the custom key store from its backing key store. This operation disconnects an\n CloudHSM key store from its associated CloudHSM cluster or disconnects an external key store from\n the external key store proxy that communicates with your external key manager.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n

While a custom key store is disconnected, you can manage the custom key store and its KMS\n keys, but you cannot create or use its KMS keys. You can reconnect the custom key store at any\n time.

\n \n

While a custom key store is disconnected, all attempts to create KMS keys in the custom key store or to use existing KMS keys in cryptographic operations will\n fail. This action can prevent users from storing and accessing sensitive data.

\n
\n

When you disconnect a custom key store, its ConnectionState changes to\n Disconnected. To find the connection state of a custom key store, use the DescribeCustomKeyStores operation. To reconnect a custom key store, use the\n ConnectCustomKeyStore operation.

\n

If the operation succeeds, it returns a JSON object with no\nproperties.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:DisconnectCustomKeyStore (IAM policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Disconnects the custom key store from its backing key store. This operation disconnects an\n CloudHSM key store from its associated CloudHSM cluster or disconnects an external key store from\n the external key store proxy that communicates with your external key manager.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n

While a custom key store is disconnected, you can manage the custom key store and its KMS\n keys, but you cannot create or use its KMS keys. You can reconnect the custom key store at any\n time.

\n \n

While a custom key store is disconnected, all attempts to create KMS keys in the custom key store or to use existing KMS keys in cryptographic operations will\n fail. This action can prevent users from storing and accessing sensitive data.

\n
\n

When you disconnect a custom key store, its ConnectionState changes to\n Disconnected. To find the connection state of a custom key store, use the DescribeCustomKeyStores operation. To reconnect a custom key store, use the\n ConnectCustomKeyStore operation.

\n

If the operation succeeds, it returns a JSON object with no\nproperties.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:DisconnectCustomKeyStore (IAM policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To disconnect a custom key store from its CloudHSM cluster", + "documentation": "This example disconnects an AWS KMS custom key store from its backing key store. For an AWS CloudHSM key store, it disconnects the key store from its AWS CloudHSM cluster. For an external key store, it disconnects the key store from the external key store proxy that communicates with your external key manager. This operation doesn't return any data. To verify that the custom key store is disconnected, use the DescribeCustomKeyStores operation.", + "input": { + "CustomKeyStoreId": "cks-1234567890abcdef0" + }, + "output": {} + } + ] } }, "com.amazonaws.kms#DisconnectCustomKeyStoreRequest": { @@ -1968,7 +2113,16 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the key state of a KMS key to enabled. This allows you to use the KMS key for\n cryptographic operations.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:EnableKey (key policy)

\n

\n Related operations: DisableKey\n

" + "smithy.api#documentation": "

Sets the key state of a KMS key to enabled. This allows you to use the KMS key for\n cryptographic operations.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:EnableKey (key policy)

\n

\n Related operations: DisableKey\n

", + "smithy.api#examples": [ + { + "title": "To enable a KMS key", + "documentation": "The following example enables the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#EnableKeyRequest": { @@ -2018,7 +2172,16 @@ } ], "traits": { - "smithy.api#documentation": "

Enables automatic rotation\n of the key material of the specified symmetric encryption KMS key.

\n

When you enable automatic rotation of acustomer managed KMS key, KMS\n rotates the key material of the KMS key one year (approximately 365 days) from the enable date\n and every year thereafter. You can monitor rotation of the key material for your KMS keys in\n CloudTrail and Amazon CloudWatch. To disable rotation of the key material in a customer\n managed KMS key, use the DisableKeyRotation operation.

\n

Automatic key rotation is supported only on symmetric encryption KMS keys.\n You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n

You cannot enable or disable automatic rotation Amazon Web Services managed KMS keys. KMS\n always rotates the key material of Amazon Web Services managed keys every year. Rotation of Amazon Web Services owned KMS\n keys varies.

\n \n

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three\n years (approximately 1,095 days) to every year (approximately 365 days).

\n

New Amazon Web Services managed keys are automatically rotated one year after they are created, and\n approximately every year thereafter.

\n

Existing Amazon Web Services managed keys are automatically rotated one year after their most recent\n rotation, and every year thereafter.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:EnableKeyRotation (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Enables automatic rotation\n of the key material of the specified symmetric encryption KMS key.

\n

When you enable automatic rotation of acustomer managed KMS key, KMS\n rotates the key material of the KMS key one year (approximately 365 days) from the enable date\n and every year thereafter. You can monitor rotation of the key material for your KMS keys in\n CloudTrail and Amazon CloudWatch. To disable rotation of the key material in a customer\n managed KMS key, use the DisableKeyRotation operation.

\n

Automatic key rotation is supported only on symmetric encryption KMS keys.\n You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key.

\n

You cannot enable or disable automatic rotation Amazon Web Services managed KMS keys. KMS\n always rotates the key material of Amazon Web Services managed keys every year. Rotation of Amazon Web Services owned KMS\n keys varies.

\n \n

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three\n years (approximately 1,095 days) to every year (approximately 365 days).

\n

New Amazon Web Services managed keys are automatically rotated one year after they are created, and\n approximately every year thereafter.

\n

Existing Amazon Web Services managed keys are automatically rotated one year after their most recent\n rotation, and every year thereafter.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:EnableKeyRotation (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To enable automatic rotation of key material", + "documentation": "The following example enables automatic annual rotation of the key material for the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#EnableKeyRotationRequest": { @@ -2074,7 +2237,22 @@ } ], "traits": { - "smithy.api#documentation": "

Encrypts plaintext of up to 4,096 bytes using a KMS key. You can use a symmetric or\n asymmetric KMS key with a KeyUsage of ENCRYPT_DECRYPT.

\n

You can use this operation to encrypt small amounts of arbitrary data, such as a personal\n identifier or database password, or other sensitive information. You don't need to use the\n Encrypt operation to encrypt a data key. The GenerateDataKey\n and GenerateDataKeyPair operations return a plaintext data key and an\n encrypted copy of that data key.

\n

If you use a symmetric encryption KMS key, you can use an encryption context to add\n additional security to your encryption operation. If you specify an\n EncryptionContext when encrypting data, you must specify the same encryption\n context (a case-sensitive exact match) when decrypting the data. Otherwise, the request to\n decrypt fails with an InvalidCiphertextException. For more information, see\n Encryption\n Context in the Key Management Service Developer Guide.

\n

If you specify an asymmetric KMS key, you must also specify the encryption algorithm. The\n algorithm must be compatible with the KMS key spec.

\n \n

When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.

\n

You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.

\n
\n

The maximum size of the data that you can encrypt varies with the type of KMS key and the\n encryption algorithm that you choose.

\n
    \n
  • \n

    Symmetric encryption KMS keys

    \n
      \n
    • \n

      \n SYMMETRIC_DEFAULT: 4096 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_2048\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 214 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 190 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_3072\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 342 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 318 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_4096\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 470 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 446 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n SM2PKE: 1024 bytes (China Regions only)

    \n
  • \n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:Encrypt (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Encrypts plaintext of up to 4,096 bytes using a KMS key. You can use a symmetric or\n asymmetric KMS key with a KeyUsage of ENCRYPT_DECRYPT.

\n

You can use this operation to encrypt small amounts of arbitrary data, such as a personal\n identifier or database password, or other sensitive information. You don't need to use the\n Encrypt operation to encrypt a data key. The GenerateDataKey\n and GenerateDataKeyPair operations return a plaintext data key and an\n encrypted copy of that data key.

\n

If you use a symmetric encryption KMS key, you can use an encryption context to add\n additional security to your encryption operation. If you specify an\n EncryptionContext when encrypting data, you must specify the same encryption\n context (a case-sensitive exact match) when decrypting the data. Otherwise, the request to\n decrypt fails with an InvalidCiphertextException. For more information, see\n Encryption\n Context in the Key Management Service Developer Guide.

\n

If you specify an asymmetric KMS key, you must also specify the encryption algorithm. The\n algorithm must be compatible with the KMS key spec.

\n \n

When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.

\n

You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.

\n
\n

The maximum size of the data that you can encrypt varies with the type of KMS key and the\n encryption algorithm that you choose.

\n
    \n
  • \n

    Symmetric encryption KMS keys

    \n
      \n
    • \n

      \n SYMMETRIC_DEFAULT: 4096 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_2048\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 214 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 190 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_3072\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 342 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 318 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n RSA_4096\n

    \n
      \n
    • \n

      \n RSAES_OAEP_SHA_1: 470 bytes

      \n
    • \n
    • \n

      \n RSAES_OAEP_SHA_256: 446 bytes

      \n
    • \n
    \n
  • \n
  • \n

    \n SM2PKE: 1024 bytes (China Regions only)

    \n
  • \n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:Encrypt (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To encrypt data with a symmetric encryption KMS key", + "documentation": "The following example encrypts data with the specified symmetric encryption KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "Plaintext": "" + }, + "output": { + "CiphertextBlob": "", + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "EncryptionAlgorithm": "SYMMETRIC_DEFAULT" + } + } + ] } }, "com.amazonaws.kms#EncryptRequest": { @@ -2274,7 +2452,22 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a unique symmetric data key for use outside of KMS. This operation returns a\n plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS\n key that you specify. The bytes in the plaintext key are random; they are not related to the\n caller or the KMS key. You can use the plaintext key to encrypt your data outside of KMS and\n store the encrypted data key with the encrypted data.

\n

To generate a data key, specify the symmetric encryption KMS key that will be used to\n encrypt the data key. You cannot use an asymmetric KMS key to encrypt data keys. To get the\n type of your KMS key, use the DescribeKey operation.

\n

You must also specify the length of the data key. Use either the KeySpec or\n NumberOfBytes parameters (but not both). For 128-bit and 256-bit data keys, use\n the KeySpec parameter.

\n

To generate a 128-bit SM4 data key (China Regions only), specify a KeySpec\n value of AES_128 or a NumberOfBytes value of 16. The\n symmetric encryption key used in China Regions to encrypt your data key is an SM4 encryption\n key.

\n

To get only an encrypted copy of the data key, use GenerateDataKeyWithoutPlaintext. To generate an asymmetric data key pair, use\n the GenerateDataKeyPair or GenerateDataKeyPairWithoutPlaintext operation. To get a cryptographically secure\n random byte string, use GenerateRandom.

\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

\n GenerateDataKey also supports Amazon Web Services Nitro Enclaves, which provide an\n isolated compute environment in Amazon EC2. To call GenerateDataKey for an Amazon Web Services Nitro\n enclave, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient parameter\n to provide the attestation document for the enclave. GenerateDataKey returns a\n copy of the data key encrypted under the specified KMS key, as usual. But instead of a\n plaintext copy of the data key, the response includes a copy of the data key encrypted under\n the public key from the attestation document (CiphertextForRecipient).\n For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide..

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n How to use your data key\n

\n

We recommend that you use the following pattern to encrypt data locally in your\n application. You can write your own code or use a client-side encryption library, such as the\n Amazon Web Services Encryption SDK, the\n Amazon DynamoDB Encryption Client,\n or Amazon S3\n client-side encryption to do these tasks for you.

\n

To encrypt data outside of KMS:

\n
    \n
  1. \n

    Use the GenerateDataKey operation to get a data key.

    \n
  2. \n
  3. \n

    Use the plaintext data key (in the Plaintext field of the response) to\n encrypt your data outside of KMS. Then erase the plaintext data key from memory.

    \n
  4. \n
  5. \n

    Store the encrypted data key (in the CiphertextBlob field of the\n response) with the encrypted data.

    \n
  6. \n
\n

To decrypt data outside of KMS:

\n
    \n
  1. \n

    Use the Decrypt operation to decrypt the encrypted data key. The\n operation returns a plaintext copy of the data key.

    \n
  2. \n
  3. \n

    Use the plaintext data key to decrypt data outside of KMS, then erase the plaintext\n data key from memory.

    \n
  4. \n
\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateDataKey (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Returns a unique symmetric data key for use outside of KMS. This operation returns a\n plaintext copy of the data key and a copy that is encrypted under a symmetric encryption KMS\n key that you specify. The bytes in the plaintext key are random; they are not related to the\n caller or the KMS key. You can use the plaintext key to encrypt your data outside of KMS and\n store the encrypted data key with the encrypted data.

\n

To generate a data key, specify the symmetric encryption KMS key that will be used to\n encrypt the data key. You cannot use an asymmetric KMS key to encrypt data keys. To get the\n type of your KMS key, use the DescribeKey operation.

\n

You must also specify the length of the data key. Use either the KeySpec or\n NumberOfBytes parameters (but not both). For 128-bit and 256-bit data keys, use\n the KeySpec parameter.

\n

To generate a 128-bit SM4 data key (China Regions only), specify a KeySpec\n value of AES_128 or a NumberOfBytes value of 16. The\n symmetric encryption key used in China Regions to encrypt your data key is an SM4 encryption\n key.

\n

To get only an encrypted copy of the data key, use GenerateDataKeyWithoutPlaintext. To generate an asymmetric data key pair, use\n the GenerateDataKeyPair or GenerateDataKeyPairWithoutPlaintext operation. To get a cryptographically secure\n random byte string, use GenerateRandom.

\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

\n GenerateDataKey also supports Amazon Web Services Nitro Enclaves, which provide an\n isolated compute environment in Amazon EC2. To call GenerateDataKey for an Amazon Web Services Nitro\n enclave, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient parameter\n to provide the attestation document for the enclave. GenerateDataKey returns a\n copy of the data key encrypted under the specified KMS key, as usual. But instead of a\n plaintext copy of the data key, the response includes a copy of the data key encrypted under\n the public key from the attestation document (CiphertextForRecipient).\n For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide..

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n How to use your data key\n

\n

We recommend that you use the following pattern to encrypt data locally in your\n application. You can write your own code or use a client-side encryption library, such as the\n Amazon Web Services Encryption SDK, the\n Amazon DynamoDB Encryption Client,\n or Amazon S3\n client-side encryption to do these tasks for you.

\n

To encrypt data outside of KMS:

\n
    \n
  1. \n

    Use the GenerateDataKey operation to get a data key.

    \n
  2. \n
  3. \n

    Use the plaintext data key (in the Plaintext field of the response) to\n encrypt your data outside of KMS. Then erase the plaintext data key from memory.

    \n
  4. \n
  5. \n

    Store the encrypted data key (in the CiphertextBlob field of the\n response) with the encrypted data.

    \n
  6. \n
\n

To decrypt data outside of KMS:

\n
    \n
  1. \n

    Use the Decrypt operation to decrypt the encrypted data key. The\n operation returns a plaintext copy of the data key.

    \n
  2. \n
  3. \n

    Use the plaintext data key to decrypt data outside of KMS, then erase the plaintext\n data key from memory.

    \n
  4. \n
\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateDataKey (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To generate a data key", + "documentation": "The following example generates a 256-bit symmetric data encryption key (data key) in two formats. One is the unencrypted (plainext) data key, and the other is the data key encrypted with the specified KMS key.", + "input": { + "KeyId": "alias/ExampleAlias", + "KeySpec": "AES_256" + }, + "output": { + "CiphertextBlob": "", + "Plaintext": "", + "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#GenerateDataKeyPair": { @@ -2318,7 +2511,24 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a unique asymmetric data key pair for use outside of KMS. This operation returns\n a plaintext public key, a plaintext private key, and a copy of the private key that is\n encrypted under the symmetric encryption KMS key you specify. You can use the data key pair to\n perform asymmetric cryptography and implement digital signatures outside of KMS. The bytes\n in the keys are random; they not related to the caller or to the KMS key that is used to\n encrypt the private key.

\n

You can use the public key that GenerateDataKeyPair returns to encrypt data\n or verify a signature outside of KMS. Then, store the encrypted private key with the data.\n When you are ready to decrypt data or sign a message, you can use the Decrypt operation to decrypt the encrypted private key.

\n

To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt\n the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a\n custom key store. To get the type and origin of your KMS key, use the DescribeKey operation.

\n

Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data\n key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that\n you use ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or\n signing, but not both. However, KMS cannot enforce any restrictions on the use of data key\n pairs outside of KMS.

\n

If you are using the data key pair to encrypt data, or for any operation where you don't\n immediately need a private key, consider using the GenerateDataKeyPairWithoutPlaintext operation.\n GenerateDataKeyPairWithoutPlaintext returns a plaintext public key and an\n encrypted private key, but omits the plaintext private key that you need only to decrypt\n ciphertext or sign a message. Later, when you need to decrypt the data or sign a message, use\n the Decrypt operation to decrypt the encrypted private key in the data key\n pair.

\n

\n GenerateDataKeyPair returns a unique data key pair for each request. The\n bytes in the keys are random; they are not related to the caller or the KMS key that is used\n to encrypt the private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as\n specified in RFC 5280. The private\n key is a DER-encoded PKCS8 PrivateKeyInfo, as specified in RFC 5958.

\n

\n GenerateDataKeyPair also supports Amazon Web Services Nitro Enclaves, which provide an\n isolated compute environment in Amazon EC2. To call GenerateDataKeyPair for an Amazon Web Services\n Nitro enclave, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient\n parameter to provide the attestation document for the enclave.\n GenerateDataKeyPair returns the public data key and a copy of the private data\n key encrypted under the specified KMS key, as usual. But instead of a plaintext copy of the\n private data key (PrivateKeyPlaintext), the response includes a copy of the\n private data key encrypted under the public key from the attestation document\n (CiphertextForRecipient). For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide..

\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateDataKeyPair (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Returns a unique asymmetric data key pair for use outside of KMS. This operation returns\n a plaintext public key, a plaintext private key, and a copy of the private key that is\n encrypted under the symmetric encryption KMS key you specify. You can use the data key pair to\n perform asymmetric cryptography and implement digital signatures outside of KMS. The bytes\n in the keys are random; they not related to the caller or to the KMS key that is used to\n encrypt the private key.

\n

You can use the public key that GenerateDataKeyPair returns to encrypt data\n or verify a signature outside of KMS. Then, store the encrypted private key with the data.\n When you are ready to decrypt data or sign a message, you can use the Decrypt operation to decrypt the encrypted private key.

\n

To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt\n the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a\n custom key store. To get the type and origin of your KMS key, use the DescribeKey operation.

\n

Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data\n key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that\n you use ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or\n signing, but not both. However, KMS cannot enforce any restrictions on the use of data key\n pairs outside of KMS.

\n

If you are using the data key pair to encrypt data, or for any operation where you don't\n immediately need a private key, consider using the GenerateDataKeyPairWithoutPlaintext operation.\n GenerateDataKeyPairWithoutPlaintext returns a plaintext public key and an\n encrypted private key, but omits the plaintext private key that you need only to decrypt\n ciphertext or sign a message. Later, when you need to decrypt the data or sign a message, use\n the Decrypt operation to decrypt the encrypted private key in the data key\n pair.

\n

\n GenerateDataKeyPair returns a unique data key pair for each request. The\n bytes in the keys are random; they are not related to the caller or the KMS key that is used\n to encrypt the private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as\n specified in RFC 5280. The private\n key is a DER-encoded PKCS8 PrivateKeyInfo, as specified in RFC 5958.

\n

\n GenerateDataKeyPair also supports Amazon Web Services Nitro Enclaves, which provide an\n isolated compute environment in Amazon EC2. To call GenerateDataKeyPair for an Amazon Web Services\n Nitro enclave, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient\n parameter to provide the attestation document for the enclave.\n GenerateDataKeyPair returns the public data key and a copy of the private data\n key encrypted under the specified KMS key, as usual. But instead of a plaintext copy of the\n private data key (PrivateKeyPlaintext), the response includes a copy of the\n private data key encrypted under the public key from the attestation document\n (CiphertextForRecipient). For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide..

\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateDataKeyPair (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To generate an RSA key pair for encryption and decryption", + "documentation": "This example generates an RSA data key pair for encryption and decryption. The operation returns a plaintext public key and private key, and a copy of the private key that is encrypted under a symmetric encryption KMS key that you specify.", + "input": { + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "KeyPairSpec": "RSA_3072" + }, + "output": { + "PrivateKeyCiphertextBlob": "", + "PrivateKeyPlaintext": "", + "PublicKey": "", + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "KeyPairSpec": "RSA_3072" + } + } + ] } }, "com.amazonaws.kms#GenerateDataKeyPairRequest": { @@ -2452,7 +2662,23 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a unique asymmetric data key pair for use outside of KMS. This operation returns\n a plaintext public key and a copy of the private key that is encrypted under the symmetric\n encryption KMS key you specify. Unlike GenerateDataKeyPair, this operation\n does not return a plaintext private key. The bytes in the keys are random; they are not\n related to the caller or to the KMS key that is used to encrypt the private key.

\n

You can use the public key that GenerateDataKeyPairWithoutPlaintext returns\n to encrypt data or verify a signature outside of KMS. Then, store the encrypted private key\n with the data. When you are ready to decrypt data or sign a message, you can use the Decrypt operation to decrypt the encrypted private key.

\n

To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt\n the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a\n custom key store. To get the type and origin of your KMS key, use the DescribeKey operation.

\n

Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data\n key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that\n you use ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or\n signing, but not both. However, KMS cannot enforce any restrictions on the use of data key\n pairs outside of KMS.

\n

\n GenerateDataKeyPairWithoutPlaintext returns a unique data key pair for each\n request. The bytes in the key are not related to the caller or KMS key that is used to encrypt\n the private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as specified in\n RFC 5280.

\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateDataKeyPairWithoutPlaintext (key\n policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Returns a unique asymmetric data key pair for use outside of KMS. This operation returns\n a plaintext public key and a copy of the private key that is encrypted under the symmetric\n encryption KMS key you specify. Unlike GenerateDataKeyPair, this operation\n does not return a plaintext private key. The bytes in the keys are random; they are not\n related to the caller or to the KMS key that is used to encrypt the private key.

\n

You can use the public key that GenerateDataKeyPairWithoutPlaintext returns\n to encrypt data or verify a signature outside of KMS. Then, store the encrypted private key\n with the data. When you are ready to decrypt data or sign a message, you can use the Decrypt operation to decrypt the encrypted private key.

\n

To generate a data key pair, you must specify a symmetric encryption KMS key to encrypt\n the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a\n custom key store. To get the type and origin of your KMS key, use the DescribeKey operation.

\n

Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data\n key pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends that\n you use ECC key pairs for signing, and use RSA and SM2 key pairs for either encryption or\n signing, but not both. However, KMS cannot enforce any restrictions on the use of data key\n pairs outside of KMS.

\n

\n GenerateDataKeyPairWithoutPlaintext returns a unique data key pair for each\n request. The bytes in the key are not related to the caller or KMS key that is used to encrypt\n the private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as specified in\n RFC 5280.

\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateDataKeyPairWithoutPlaintext (key\n policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To generate an asymmetric data key pair without a plaintext key", + "documentation": "This example returns an asymmetric elliptic curve (ECC) data key pair. The private key is encrypted under the symmetric encryption KMS key that you specify. This operation doesn't return a plaintext (unencrypted) private key.", + "input": { + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "KeyPairSpec": "ECC_NIST_P521" + }, + "output": { + "PrivateKeyCiphertextBlob": "", + "PublicKey": "", + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "KeyPairSpec": "ECC_NIST_P521" + } + } + ] } }, "com.amazonaws.kms#GenerateDataKeyPairWithoutPlaintextRequest": { @@ -2648,7 +2874,21 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a unique symmetric data key for use outside of KMS. This operation returns a\n data key that is encrypted under a symmetric encryption KMS key that you specify. The bytes in\n the key are random; they are not related to the caller or to the KMS key.

\n

\n GenerateDataKeyWithoutPlaintext is identical to the GenerateDataKey operation except that it does not return a plaintext copy of the\n data key.

\n

This operation is useful for systems that need to encrypt data at some point, but not\n immediately. When you need to encrypt the data, you call the Decrypt\n operation on the encrypted copy of the key.

\n

It's also useful in distributed systems with different levels of trust. For example, you\n might store encrypted data in containers. One component of your system creates new containers\n and stores an encrypted data key with each container. Then, a different component puts the\n data into the containers. That component first decrypts the data key, uses the plaintext data\n key to encrypt data, puts the encrypted data into the container, and then destroys the\n plaintext data key. In this system, the component that creates the containers never sees the\n plaintext data key.

\n

To request an asymmetric data key pair, use the GenerateDataKeyPair or\n GenerateDataKeyPairWithoutPlaintext operations.

\n

To generate a data key, you must specify the symmetric encryption KMS key that is used to\n encrypt the data key. You cannot use an asymmetric KMS key or a key in a custom key store to\n generate a data key. To get the type of your KMS key, use the DescribeKey\n operation.

\n

You must also specify the length of the data key. Use either the KeySpec or\n NumberOfBytes parameters (but not both). For 128-bit and 256-bit data keys, use\n the KeySpec parameter.

\n

To generate an SM4 data key (China Regions only), specify a KeySpec value of\n AES_128 or NumberOfBytes value of 16. The symmetric\n encryption key used in China Regions to encrypt your data key is an SM4 encryption key.

\n

If the operation succeeds, you will find the encrypted copy of the data key in the\n CiphertextBlob field.

\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateDataKeyWithoutPlaintext (key\n policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Returns a unique symmetric data key for use outside of KMS. This operation returns a\n data key that is encrypted under a symmetric encryption KMS key that you specify. The bytes in\n the key are random; they are not related to the caller or to the KMS key.

\n

\n GenerateDataKeyWithoutPlaintext is identical to the GenerateDataKey operation except that it does not return a plaintext copy of the\n data key.

\n

This operation is useful for systems that need to encrypt data at some point, but not\n immediately. When you need to encrypt the data, you call the Decrypt\n operation on the encrypted copy of the key.

\n

It's also useful in distributed systems with different levels of trust. For example, you\n might store encrypted data in containers. One component of your system creates new containers\n and stores an encrypted data key with each container. Then, a different component puts the\n data into the containers. That component first decrypts the data key, uses the plaintext data\n key to encrypt data, puts the encrypted data into the container, and then destroys the\n plaintext data key. In this system, the component that creates the containers never sees the\n plaintext data key.

\n

To request an asymmetric data key pair, use the GenerateDataKeyPair or\n GenerateDataKeyPairWithoutPlaintext operations.

\n

To generate a data key, you must specify the symmetric encryption KMS key that is used to\n encrypt the data key. You cannot use an asymmetric KMS key or a key in a custom key store to\n generate a data key. To get the type of your KMS key, use the DescribeKey\n operation.

\n

You must also specify the length of the data key. Use either the KeySpec or\n NumberOfBytes parameters (but not both). For 128-bit and 256-bit data keys, use\n the KeySpec parameter.

\n

To generate an SM4 data key (China Regions only), specify a KeySpec value of\n AES_128 or NumberOfBytes value of 16. The symmetric\n encryption key used in China Regions to encrypt your data key is an SM4 encryption key.

\n

If the operation succeeds, you will find the encrypted copy of the data key in the\n CiphertextBlob field.

\n

You can use an optional encryption context to add additional security to the encryption\n operation. If you specify an EncryptionContext, you must specify the same\n encryption context (a case-sensitive exact match) when decrypting the encrypted data key.\n Otherwise, the request to decrypt fails with an InvalidCiphertextException. For more information, see Encryption Context in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateDataKeyWithoutPlaintext (key\n policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To generate an encrypted data key", + "documentation": "The following example generates an encrypted copy of a 256-bit symmetric data encryption key (data key). The data key is encrypted with the specified KMS key.", + "input": { + "KeyId": "alias/ExampleAlias", + "KeySpec": "AES_256" + }, + "output": { + "CiphertextBlob": "", + "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#GenerateDataKeyWithoutPlaintextRequest": { @@ -2751,7 +2991,23 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a hash-based message authentication code (HMAC) for a message using an HMAC KMS\n key and a MAC algorithm that the key supports. HMAC KMS keys and the HMAC algorithms that\n KMS uses conform to industry standards defined in RFC 2104.

\n

You can use value that GenerateMac returns in the VerifyMac operation to\n demonstrate that the original message has not changed. Also, because a secret key is used to\n create the hash, you can verify that the party that generated the hash has the required secret\n key. You can also use the raw result to implement HMAC-based algorithms such as key derivation\n functions. This operation is part of KMS support for HMAC KMS keys. For\n details, see HMAC keys in\n KMS in the \n Key Management Service Developer Guide\n .

\n \n

Best practices recommend that you limit the time during which any signing mechanism,\n including an HMAC, is effective. This deters an attack where the actor uses a signed message\n to establish validity repeatedly or long after the message is superseded. HMAC tags do not\n include a timestamp, but you can include a timestamp in the token or message to help you\n detect when its time to refresh the HMAC.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateMac (key policy)

\n

\n Related operations: VerifyMac\n

" + "smithy.api#documentation": "

Generates a hash-based message authentication code (HMAC) for a message using an HMAC KMS\n key and a MAC algorithm that the key supports. HMAC KMS keys and the HMAC algorithms that\n KMS uses conform to industry standards defined in RFC 2104.

\n

You can use value that GenerateMac returns in the VerifyMac operation to\n demonstrate that the original message has not changed. Also, because a secret key is used to\n create the hash, you can verify that the party that generated the hash has the required secret\n key. You can also use the raw result to implement HMAC-based algorithms such as key derivation\n functions. This operation is part of KMS support for HMAC KMS keys. For\n details, see HMAC keys in\n KMS in the \n Key Management Service Developer Guide\n .

\n \n

Best practices recommend that you limit the time during which any signing mechanism,\n including an HMAC, is effective. This deters an attack where the actor uses a signed message\n to establish validity repeatedly or long after the message is superseded. HMAC tags do not\n include a timestamp, but you can include a timestamp in the token or message to help you\n detect when its time to refresh the HMAC.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GenerateMac (key policy)

\n

\n Related operations: VerifyMac\n

", + "smithy.api#examples": [ + { + "title": "To generate an HMAC for a message", + "documentation": "This example generates an HMAC for a message, an HMAC KMS key, and a MAC algorithm. The algorithm must be supported by the specified HMAC KMS key.", + "input": { + "Message": "Hello World", + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "MacAlgorithm": "HMAC_SHA_384" + }, + "output": { + "Mac": "", + "MacAlgorithm": "HMAC_SHA_384", + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#GenerateMacRequest": { @@ -2847,7 +3103,19 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a random byte string that is cryptographically secure.

\n

You must use the NumberOfBytes parameter to specify the length of the random\n byte string. There is no default value for string length.

\n

By default, the random byte string is generated in KMS. To generate the byte string in\n the CloudHSM cluster associated with an CloudHSM key store, use the CustomKeyStoreId\n parameter.

\n

\n GenerateRandom also supports Amazon Web Services Nitro Enclaves, which provide an\n isolated compute environment in Amazon EC2. To call GenerateRandom for a Nitro\n enclave, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient parameter\n to provide the attestation document for the enclave. Instead of plaintext bytes, the response\n includes the plaintext bytes encrypted under the public key from the attestation document\n (CiphertextForRecipient).For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide.

\n

For more information about entropy and random number generation, see\n Key Management Service Cryptographic Details.

\n

\n Cross-account use: Not applicable.\n GenerateRandom does not use any account-specific resources, such as KMS\n keys.

\n

\n Required permissions: kms:GenerateRandom (IAM policy)

" + "smithy.api#documentation": "

Returns a random byte string that is cryptographically secure.

\n

You must use the NumberOfBytes parameter to specify the length of the random\n byte string. There is no default value for string length.

\n

By default, the random byte string is generated in KMS. To generate the byte string in\n the CloudHSM cluster associated with an CloudHSM key store, use the CustomKeyStoreId\n parameter.

\n

\n GenerateRandom also supports Amazon Web Services Nitro Enclaves, which provide an\n isolated compute environment in Amazon EC2. To call GenerateRandom for a Nitro\n enclave, use the Amazon Web Services Nitro Enclaves SDK or any Amazon Web Services SDK. Use the Recipient parameter\n to provide the attestation document for the enclave. Instead of plaintext bytes, the response\n includes the plaintext bytes encrypted under the public key from the attestation document\n (CiphertextForRecipient).For information about the interaction between KMS and Amazon Web Services Nitro Enclaves, see How Amazon Web Services Nitro Enclaves uses KMS in the Key Management Service Developer Guide.

\n

For more information about entropy and random number generation, see\n Key Management Service Cryptographic Details.

\n

\n Cross-account use: Not applicable.\n GenerateRandom does not use any account-specific resources, such as KMS\n keys.

\n

\n Required permissions: kms:GenerateRandom (IAM policy)

", + "smithy.api#examples": [ + { + "title": "To generate random data", + "documentation": "The following example generates 32 bytes of random data.", + "input": { + "NumberOfBytes": 32 + }, + "output": { + "Plaintext": "" + } + } + ] } }, "com.amazonaws.kms#GenerateRandomRequest": { @@ -2922,7 +3190,20 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a key policy attached to the specified KMS key.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:GetKeyPolicy (key policy)

\n

\n Related operations: PutKeyPolicy\n

" + "smithy.api#documentation": "

Gets a key policy attached to the specified KMS key.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:GetKeyPolicy (key policy)

\n

\n Related operations: PutKeyPolicy\n

", + "smithy.api#examples": [ + { + "title": "To retrieve a key policy", + "documentation": "The following example retrieves the key policy for the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "PolicyName": "default" + }, + "output": { + "Policy": "{\n \"Version\" : \"2012-10-17\",\n \"Id\" : \"key-default-1\",\n \"Statement\" : [ {\n \"Sid\" : \"Enable IAM User Permissions\",\n \"Effect\" : \"Allow\",\n \"Principal\" : {\n \"AWS\" : \"arn:aws:iam::111122223333:root\"\n },\n \"Action\" : \"kms:*\",\n \"Resource\" : \"*\"\n } ]\n}" + } + } + ] } }, "com.amazonaws.kms#GetKeyPolicyRequest": { @@ -2990,7 +3271,19 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a Boolean value that indicates whether automatic rotation of the key material is\n enabled for the specified KMS key.

\n

When you enable automatic rotation for customer managed KMS keys, KMS\n rotates the key material of the KMS key one year (approximately 365 days) from the enable date\n and every year thereafter. You can monitor rotation of the key material for your KMS keys in\n CloudTrail and Amazon CloudWatch.

\n

Automatic key rotation is supported only on symmetric encryption KMS keys.\n You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key..

\n

You can enable (EnableKeyRotation) and disable automatic rotation (DisableKeyRotation) of the key material in customer managed KMS keys. Key\n material rotation of Amazon Web Services managed KMS keys is not\n configurable. KMS always rotates the key material in Amazon Web Services managed KMS keys every year. The\n key rotation status for Amazon Web Services managed KMS keys is always true.

\n \n

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three\n years to every year. For details, see EnableKeyRotation.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n
    \n
  • \n

    Disabled: The key rotation status does not change when you disable a KMS key. However,\n while the KMS key is disabled, KMS does not rotate the key material. When you re-enable\n the KMS key, rotation resumes. If the key material in the re-enabled KMS key hasn't been\n rotated in one year, KMS rotates it immediately, and every year thereafter. If it's been\n less than a year since the key material in the re-enabled KMS key was rotated, the KMS key\n resumes its prior rotation schedule.

    \n
  • \n
  • \n

    Pending deletion: While a KMS key is pending deletion, its key rotation status is\n false and KMS does not rotate the key material. If you cancel the\n deletion, the original key rotation status returns to true.

    \n
  • \n
\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GetKeyRotationStatus (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Gets a Boolean value that indicates whether automatic rotation of the key material is\n enabled for the specified KMS key.

\n

When you enable automatic rotation for customer managed KMS keys, KMS\n rotates the key material of the KMS key one year (approximately 365 days) from the enable date\n and every year thereafter. You can monitor rotation of the key material for your KMS keys in\n CloudTrail and Amazon CloudWatch.

\n

Automatic key rotation is supported only on symmetric encryption KMS keys.\n You cannot enable automatic rotation of asymmetric KMS keys, HMAC KMS keys, KMS keys with imported key material, or KMS keys in a custom key store. To enable or disable automatic rotation of a set of related multi-Region keys, set the property on the primary key..

\n

You can enable (EnableKeyRotation) and disable automatic rotation (DisableKeyRotation) of the key material in customer managed KMS keys. Key\n material rotation of Amazon Web Services managed KMS keys is not\n configurable. KMS always rotates the key material in Amazon Web Services managed KMS keys every year. The\n key rotation status for Amazon Web Services managed KMS keys is always true.

\n \n

In May 2022, KMS changed the rotation schedule for Amazon Web Services managed keys from every three\n years to every year. For details, see EnableKeyRotation.

\n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n
    \n
  • \n

    Disabled: The key rotation status does not change when you disable a KMS key. However,\n while the KMS key is disabled, KMS does not rotate the key material. When you re-enable\n the KMS key, rotation resumes. If the key material in the re-enabled KMS key hasn't been\n rotated in one year, KMS rotates it immediately, and every year thereafter. If it's been\n less than a year since the key material in the re-enabled KMS key was rotated, the KMS key\n resumes its prior rotation schedule.

    \n
  • \n
  • \n

    Pending deletion: While a KMS key is pending deletion, its key rotation status is\n false and KMS does not rotate the key material. If you cancel the\n deletion, the original key rotation status returns to true.

    \n
  • \n
\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GetKeyRotationStatus (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To retrieve the rotation status for a KMS key", + "documentation": "The following example retrieves the status of automatic annual rotation of the key material for the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "output": { + "KeyRotationEnabled": true + } + } + ] } }, "com.amazonaws.kms#GetKeyRotationStatusRequest": { @@ -3157,7 +3450,26 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the public key of an asymmetric KMS key. Unlike the private key of a asymmetric\n KMS key, which never leaves KMS unencrypted, callers with kms:GetPublicKey\n permission can download the public key of an asymmetric KMS key. You can share the public key\n to allow others to encrypt messages and verify signatures outside of KMS.\n For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

You do not need to download the public key. Instead, you can use the public key within\n KMS by calling the Encrypt, ReEncrypt, or Verify operations with the identifier of an asymmetric KMS key. When you use the\n public key within KMS, you benefit from the authentication, authorization, and logging that\n are part of every KMS operation. You also reduce of risk of encrypting data that cannot be\n decrypted. These features are not effective outside of KMS.

\n

To help you use the public key safely outside of KMS, GetPublicKey returns\n important information about the public key in the response, including:

\n
    \n
  • \n

    \n KeySpec: The type of key material in the public key, such as\n RSA_4096 or ECC_NIST_P521.

    \n
  • \n
  • \n

    \n KeyUsage: Whether the key is used for encryption or signing.

    \n
  • \n
  • \n

    \n EncryptionAlgorithms or SigningAlgorithms: A list of the encryption algorithms or the signing\n algorithms for the key.

    \n
  • \n
\n

Although KMS cannot enforce these restrictions on external operations, it is crucial\n that you use this information to prevent the public key from being used improperly. For\n example, you can prevent a public signing key from being used encrypt data, or prevent a\n public key from being used with an encryption algorithm that is not supported by KMS. You\n can also avoid errors, such as using the wrong signing algorithm in a verification\n operation.

\n

To verify a signature outside of KMS with an SM2 public key (China Regions only), you\n must specify the distinguishing ID. By default, KMS uses 1234567812345678 as\n the distinguishing ID. For more information, see Offline\n verification with SM2 key pairs.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GetPublicKey (key policy)

\n

\n Related operations: CreateKey\n

" + "smithy.api#documentation": "

Returns the public key of an asymmetric KMS key. Unlike the private key of a asymmetric\n KMS key, which never leaves KMS unencrypted, callers with kms:GetPublicKey\n permission can download the public key of an asymmetric KMS key. You can share the public key\n to allow others to encrypt messages and verify signatures outside of KMS.\n For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

You do not need to download the public key. Instead, you can use the public key within\n KMS by calling the Encrypt, ReEncrypt, or Verify operations with the identifier of an asymmetric KMS key. When you use the\n public key within KMS, you benefit from the authentication, authorization, and logging that\n are part of every KMS operation. You also reduce of risk of encrypting data that cannot be\n decrypted. These features are not effective outside of KMS.

\n

To help you use the public key safely outside of KMS, GetPublicKey returns\n important information about the public key in the response, including:

\n
    \n
  • \n

    \n KeySpec: The type of key material in the public key, such as\n RSA_4096 or ECC_NIST_P521.

    \n
  • \n
  • \n

    \n KeyUsage: Whether the key is used for encryption or signing.

    \n
  • \n
  • \n

    \n EncryptionAlgorithms or SigningAlgorithms: A list of the encryption algorithms or the signing\n algorithms for the key.

    \n
  • \n
\n

Although KMS cannot enforce these restrictions on external operations, it is crucial\n that you use this information to prevent the public key from being used improperly. For\n example, you can prevent a public signing key from being used encrypt data, or prevent a\n public key from being used with an encryption algorithm that is not supported by KMS. You\n can also avoid errors, such as using the wrong signing algorithm in a verification\n operation.

\n

To verify a signature outside of KMS with an SM2 public key (China Regions only), you\n must specify the distinguishing ID. By default, KMS uses 1234567812345678 as\n the distinguishing ID. For more information, see Offline\n verification with SM2 key pairs.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:GetPublicKey (key policy)

\n

\n Related operations: CreateKey\n

", + "smithy.api#examples": [ + { + "title": "To download the public key of an asymmetric KMS key", + "documentation": "This example gets the public key of an asymmetric RSA KMS key used for encryption and decryption. The operation returns the key spec, key usage, and encryption or signing algorithms to help you use the public key correctly outside of AWS KMS.", + "input": { + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321" + }, + "output": { + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321", + "PublicKey": "", + "CustomerMasterKeySpec": "RSA_4096", + "KeyUsage": "ENCRYPT_DECRYPT", + "EncryptionAlgorithms": [ + "RSAES_OAEP_SHA_1", + "RSAES_OAEP_SHA_256" + ] + } + } + ] } }, "com.amazonaws.kms#GetPublicKeyRequest": { @@ -3510,7 +3822,19 @@ } ], "traits": { - "smithy.api#documentation": "

Imports or reimports key material into an existing KMS key that was created without key\n material. ImportKeyMaterial also sets the expiration model and expiration date of\n the imported key material.

\n

By default, KMS keys are created with key material that KMS generates. This operation\n supports Importing key\n material, an advanced feature that lets you generate and import the cryptographic\n key material for a KMS key. For more information about importing key material into KMS, see\n Importing key\n material in the Key Management Service Developer Guide.

\n

After you successfully import key material into a KMS key, you can reimport\n the same key material into that KMS key, but you cannot import different key\n material. You might reimport key material to replace key material that expired or key material\n that you deleted. You might also reimport key material to change the expiration model or\n expiration date of the key material. Before reimporting key material, if necessary, call DeleteImportedKeyMaterial to delete the current imported key material.

\n

Each time you import key material into KMS, you can determine whether\n (ExpirationModel) and when (ValidTo) the key material expires. To\n change the expiration of your key material, you must import it again, either by calling\n ImportKeyMaterial or using the import features of the KMS console.

\n

Before calling ImportKeyMaterial:

\n
    \n
  • \n

    Create or identify a KMS key with no key material. The KMS key must have an\n Origin value of EXTERNAL, which indicates that the KMS key is\n designed for imported key material.

    \n

    To create an new KMS key for imported key material, call the CreateKey operation with an Origin value of EXTERNAL. You can create a\n symmetric encryption KMS key, HMAC KMS key, asymmetric encryption KMS key, or asymmetric\n signing KMS key. You can also import key material into a multi-Region key of any\n supported type. However, you can't import key material into a KMS key in a custom key store.

    \n
  • \n
  • \n

    Use the DescribeKey operation to verify that the\n KeyState of the KMS key is PendingImport, which indicates that\n the KMS key has no key material.

    \n

    If you are reimporting the same key material into an existing KMS key, you might need\n to call the DeleteImportedKeyMaterial to delete its existing key\n material.

    \n
  • \n
  • \n

    Call the GetParametersForImport operation to get a public key and\n import token set for importing key material.

    \n
  • \n
  • \n

    Use the public key in the GetParametersForImport response to encrypt\n your key material.

    \n
  • \n
\n

Then, in an ImportKeyMaterial request, you submit your encrypted key\n material and import token. When calling this operation, you must specify the following\n values:

\n
    \n
  • \n

    The key ID or key ARN of the KMS key to associate with the imported key material. Its\n Origin must be EXTERNAL and its KeyState must be\n PendingImport. You cannot perform this operation on a KMS key in a custom key store, or on a KMS\n key in a different Amazon Web Services account. To get the Origin and KeyState\n of a KMS key, call DescribeKey.

    \n
  • \n
  • \n

    The encrypted key material.

    \n
  • \n
  • \n

    The import token that GetParametersForImport returned. You must use\n a public key and token from the same GetParametersForImport response.

    \n
  • \n
  • \n

    Whether the key material expires (ExpirationModel) and, if so, when\n (ValidTo). For help with this choice, see Setting an expiration time in the Key Management Service Developer Guide.

    \n

    If you set an expiration date, KMS deletes the key material from the KMS key on the\n specified date, making the KMS key unusable. To use the KMS key in cryptographic\n operations again, you must reimport the same key material. However, you can delete and\n reimport the key material at any time, including before the key material expires. Each\n time you reimport, you can eliminate or reset the expiration time.

    \n
  • \n
\n

When this operation is successful, the key state of the KMS key changes from\n PendingImport to Enabled, and you can use the KMS key in\n cryptographic operations.

\n

If this operation fails, use the exception to help determine the problem. If the error is\n related to the key material, the import token, or wrapping key, use GetParametersForImport to get a new public key and import token for the KMS key\n and repeat the import procedure. For help, see How To Import Key\n Material in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:ImportKeyMaterial (key policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Imports or reimports key material into an existing KMS key that was created without key\n material. ImportKeyMaterial also sets the expiration model and expiration date of\n the imported key material.

\n

By default, KMS keys are created with key material that KMS generates. This operation\n supports Importing key\n material, an advanced feature that lets you generate and import the cryptographic\n key material for a KMS key. For more information about importing key material into KMS, see\n Importing key\n material in the Key Management Service Developer Guide.

\n

After you successfully import key material into a KMS key, you can reimport\n the same key material into that KMS key, but you cannot import different key\n material. You might reimport key material to replace key material that expired or key material\n that you deleted. You might also reimport key material to change the expiration model or\n expiration date of the key material. Before reimporting key material, if necessary, call DeleteImportedKeyMaterial to delete the current imported key material.

\n

Each time you import key material into KMS, you can determine whether\n (ExpirationModel) and when (ValidTo) the key material expires. To\n change the expiration of your key material, you must import it again, either by calling\n ImportKeyMaterial or using the import features of the KMS console.

\n

Before calling ImportKeyMaterial:

\n
    \n
  • \n

    Create or identify a KMS key with no key material. The KMS key must have an\n Origin value of EXTERNAL, which indicates that the KMS key is\n designed for imported key material.

    \n

    To create an new KMS key for imported key material, call the CreateKey operation with an Origin value of EXTERNAL. You can create a\n symmetric encryption KMS key, HMAC KMS key, asymmetric encryption KMS key, or asymmetric\n signing KMS key. You can also import key material into a multi-Region key of any\n supported type. However, you can't import key material into a KMS key in a custom key store.

    \n
  • \n
  • \n

    Use the DescribeKey operation to verify that the\n KeyState of the KMS key is PendingImport, which indicates that\n the KMS key has no key material.

    \n

    If you are reimporting the same key material into an existing KMS key, you might need\n to call the DeleteImportedKeyMaterial to delete its existing key\n material.

    \n
  • \n
  • \n

    Call the GetParametersForImport operation to get a public key and\n import token set for importing key material.

    \n
  • \n
  • \n

    Use the public key in the GetParametersForImport response to encrypt\n your key material.

    \n
  • \n
\n

Then, in an ImportKeyMaterial request, you submit your encrypted key\n material and import token. When calling this operation, you must specify the following\n values:

\n
    \n
  • \n

    The key ID or key ARN of the KMS key to associate with the imported key material. Its\n Origin must be EXTERNAL and its KeyState must be\n PendingImport. You cannot perform this operation on a KMS key in a custom key store, or on a KMS\n key in a different Amazon Web Services account. To get the Origin and KeyState\n of a KMS key, call DescribeKey.

    \n
  • \n
  • \n

    The encrypted key material.

    \n
  • \n
  • \n

    The import token that GetParametersForImport returned. You must use\n a public key and token from the same GetParametersForImport response.

    \n
  • \n
  • \n

    Whether the key material expires (ExpirationModel) and, if so, when\n (ValidTo). For help with this choice, see Setting an expiration time in the Key Management Service Developer Guide.

    \n

    If you set an expiration date, KMS deletes the key material from the KMS key on the\n specified date, making the KMS key unusable. To use the KMS key in cryptographic\n operations again, you must reimport the same key material. However, you can delete and\n reimport the key material at any time, including before the key material expires. Each\n time you reimport, you can eliminate or reset the expiration time.

    \n
  • \n
\n

When this operation is successful, the key state of the KMS key changes from\n PendingImport to Enabled, and you can use the KMS key in\n cryptographic operations.

\n

If this operation fails, use the exception to help determine the problem. If the error is\n related to the key material, the import token, or wrapping key, use GetParametersForImport to get a new public key and import token for the KMS key\n and repeat the import procedure. For help, see How To Import Key\n Material in the Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:ImportKeyMaterial (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To import key material into a KMS key", + "documentation": "The following example imports key material into the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "ImportToken": "", + "EncryptedKeyMaterial": "", + "ExpirationModel": "KEY_MATERIAL_DOES_NOT_EXPIRE" + } + } + ] } }, "com.amazonaws.kms#ImportKeyMaterialRequest": { @@ -4275,6 +4599,57 @@ ], "traits": { "smithy.api#documentation": "

Gets a list of aliases in the caller's Amazon Web Services account and region. For more information\n about aliases, see CreateAlias.

\n

By default, the ListAliases operation returns all aliases in the account and\n region. To get only the aliases associated with a particular KMS key, use the\n KeyId parameter.

\n

The ListAliases response can include aliases that you created and associated\n with your customer managed keys, and aliases that Amazon Web Services created and associated with Amazon Web Services\n managed keys in your account. You can recognize Amazon Web Services aliases because their names have the\n format aws/, such as aws/dynamodb.

\n

The response might also include aliases that have no TargetKeyId field. These\n are predefined aliases that Amazon Web Services has created but has not yet associated with a KMS key.\n Aliases that Amazon Web Services creates in your account, including predefined aliases, do not count against\n your KMS aliases\n quota.

\n

\n Cross-account use: No. ListAliases does not\n return aliases in other Amazon Web Services accounts.

\n

\n Required permissions: kms:ListAliases (IAM policy)

\n

For details, see Controlling access to aliases in the\n Key Management Service Developer Guide.

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To list aliases", + "documentation": "The following example lists aliases.", + "output": { + "Aliases": [ + { + "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/acm", + "AliasName": "alias/aws/acm", + "TargetKeyId": "da03f6f7-d279-427a-9cae-de48d07e5b66" + }, + { + "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/ebs", + "AliasName": "alias/aws/ebs", + "TargetKeyId": "25a217e7-7170-4b8c-8bf6-045ea5f70e5b" + }, + { + "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/rds", + "AliasName": "alias/aws/rds", + "TargetKeyId": "7ec3104e-c3f2-4b5c-bf42-bfc4772c6685" + }, + { + "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/redshift", + "AliasName": "alias/aws/redshift", + "TargetKeyId": "08f7a25a-69e2-4fb5-8f10-393db27326fa" + }, + { + "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/s3", + "AliasName": "alias/aws/s3", + "TargetKeyId": "d2b0f1a3-580d-4f79-b836-bc983be8cfa5" + }, + { + "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example1", + "AliasName": "alias/example1", + "TargetKeyId": "4da1e216-62d0-46c5-a7c0-5f3a3d2f8046" + }, + { + "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example2", + "AliasName": "alias/example2", + "TargetKeyId": "f32fef59-2cc2-445b-8573-2d73328acbee" + }, + { + "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example3", + "AliasName": "alias/example3", + "TargetKeyId": "1374ef38-d34e-4d5f-b2c9-4e0daee38855" + } + ], + "Truncated": false + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "NextMarker", @@ -4467,6 +4842,21 @@ ], "traits": { "smithy.api#documentation": "

Gets the names of the key policies that are attached to a KMS key. This operation is\n designed to get policy names that you can use in a GetKeyPolicy operation.\n However, the only valid policy name is default.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:ListKeyPolicies (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To list key policies for a KMS key", + "documentation": "The following example lists key policies for the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "output": { + "PolicyNames": [ + "default" + ], + "Truncated": false + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "NextMarker", @@ -4550,6 +4940,45 @@ ], "traits": { "smithy.api#documentation": "

Gets a list of all KMS keys in the caller's Amazon Web Services account and Region.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:ListKeys (IAM policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To list KMS keys", + "documentation": "The following example lists KMS keys.", + "output": { + "Keys": [ + { + "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/0d990263-018e-4e65-a703-eff731de951e", + "KeyId": "0d990263-018e-4e65-a703-eff731de951e" + }, + { + "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/144be297-0ae1-44ac-9c8f-93cd8c82f841", + "KeyId": "144be297-0ae1-44ac-9c8f-93cd8c82f841" + }, + { + "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/21184251-b765-428e-b852-2c7353e72571", + "KeyId": "21184251-b765-428e-b852-2c7353e72571" + }, + { + "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/214fe92f-5b03-4ae1-b350-db2a45dbe10c", + "KeyId": "214fe92f-5b03-4ae1-b350-db2a45dbe10c" + }, + { + "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/339963f2-e523-49d3-af24-a0fe752aa458", + "KeyId": "339963f2-e523-49d3-af24-a0fe752aa458" + }, + { + "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/b776a44b-df37-4438-9be4-a27494e4271a", + "KeyId": "b776a44b-df37-4438-9be4-a27494e4271a" + }, + { + "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/deaf6c9e-cf2c-46a6-bf6d-0b6d487cffbb", + "KeyId": "deaf6c9e-cf2c-46a6-bf6d-0b6d487cffbb" + } + ], + "Truncated": false + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "NextMarker", @@ -4629,6 +5058,32 @@ ], "traits": { "smithy.api#documentation": "

Returns all tags on the specified KMS key.

\n

For general information about tags, including the format and syntax, see Tagging Amazon Web Services resources in\n the Amazon Web Services General Reference. For information about using\n tags in KMS, see Tagging\n keys.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:ListResourceTags (key policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To list tags for a KMS key", + "documentation": "The following example lists tags for a KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "output": { + "Tags": [ + { + "TagKey": "CostCenter", + "TagValue": "87654" + }, + { + "TagKey": "CreatedBy", + "TagValue": "ExampleUser" + }, + { + "TagKey": "Purpose", + "TagValue": "Test" + } + ], + "Truncated": false + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "NextMarker", @@ -5058,7 +5513,18 @@ } ], "traits": { - "smithy.api#documentation": "

Attaches a key policy to the specified KMS key.

\n

For more information about key policies, see Key Policies in the Key Management Service Developer Guide.\n For help writing and formatting a JSON policy document, see the IAM JSON Policy Reference in the \n Identity and Access Management User Guide\n . For examples of adding a key policy in multiple programming languages,\n see Setting a key policy in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:PutKeyPolicy (key policy)

\n

\n Related operations: GetKeyPolicy\n

" + "smithy.api#documentation": "

Attaches a key policy to the specified KMS key.

\n

For more information about key policies, see Key Policies in the Key Management Service Developer Guide.\n For help writing and formatting a JSON policy document, see the IAM JSON Policy Reference in the \n Identity and Access Management User Guide\n . For examples of adding a key policy in multiple programming languages,\n see Setting a key policy in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:PutKeyPolicy (key policy)

\n

\n Related operations: GetKeyPolicy\n

", + "smithy.api#examples": [ + { + "title": "To attach a key policy to a KMS key", + "documentation": "The following example attaches a key policy to the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "PolicyName": "default", + "Policy": "{\n \"Version\": \"2012-10-17\",\n \"Id\": \"custom-policy-2016-12-07\",\n \"Statement\": [\n {\n \"Sid\": \"Enable IAM User Permissions\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::111122223333:root\"\n },\n \"Action\": \"kms:*\",\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"Allow access for Key Administrators\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": [\n \"arn:aws:iam::111122223333:user/ExampleAdminUser\",\n \"arn:aws:iam::111122223333:role/ExampleAdminRole\"\n ]\n },\n \"Action\": [\n \"kms:Create*\",\n \"kms:Describe*\",\n \"kms:Enable*\",\n \"kms:List*\",\n \"kms:Put*\",\n \"kms:Update*\",\n \"kms:Revoke*\",\n \"kms:Disable*\",\n \"kms:Get*\",\n \"kms:Delete*\",\n \"kms:ScheduleKeyDeletion\",\n \"kms:CancelKeyDeletion\"\n ],\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"Allow use of the key\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::111122223333:role/ExamplePowerUserRole\"\n },\n \"Action\": [\n \"kms:Encrypt\",\n \"kms:Decrypt\",\n \"kms:ReEncrypt*\",\n \"kms:GenerateDataKey*\",\n \"kms:DescribeKey\"\n ],\n \"Resource\": \"*\"\n },\n {\n \"Sid\": \"Allow attachment of persistent resources\",\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"AWS\": \"arn:aws:iam::111122223333:role/ExamplePowerUserRole\"\n },\n \"Action\": [\n \"kms:CreateGrant\",\n \"kms:ListGrants\",\n \"kms:RevokeGrant\"\n ],\n \"Resource\": \"*\",\n \"Condition\": {\n \"Bool\": {\n \"kms:GrantIsForAWSResource\": \"true\"\n }\n }\n }\n ]\n}\n" + } + } + ] } }, "com.amazonaws.kms#PutKeyPolicyRequest": { @@ -5141,7 +5607,22 @@ } ], "traits": { - "smithy.api#documentation": "

Decrypts ciphertext and then reencrypts it entirely within KMS. You can use this\n operation to change the KMS key under which data is encrypted, such as when you manually\n rotate a KMS key or change the KMS key that protects a ciphertext. You can also use\n it to reencrypt ciphertext under the same KMS key, such as to change the encryption\n context of a ciphertext.

\n

The ReEncrypt operation can decrypt ciphertext that was encrypted by using a\n KMS key in an KMS operation, such as Encrypt or GenerateDataKey. It can also decrypt ciphertext that was encrypted by using the\n public key of an asymmetric KMS key\n outside of KMS. However, it cannot decrypt ciphertext produced by other libraries, such as\n the Amazon Web Services Encryption SDK or\n Amazon S3\n client-side encryption. These libraries return a ciphertext format that is\n incompatible with KMS.

\n

When you use the ReEncrypt operation, you need to provide information for the\n decrypt operation and the subsequent encrypt operation.

\n
    \n
  • \n

    If your ciphertext was encrypted under an asymmetric KMS key, you must use the\n SourceKeyId parameter to identify the KMS key that encrypted the\n ciphertext. You must also supply the encryption algorithm that was used. This information\n is required to decrypt the data.

    \n
  • \n
  • \n

    If your ciphertext was encrypted under a symmetric encryption KMS key, the\n SourceKeyId parameter is optional. KMS can get this information from\n metadata that it adds to the symmetric ciphertext blob. This feature adds durability to\n your implementation by ensuring that authorized users can decrypt ciphertext decades after\n it was encrypted, even if they've lost track of the key ID. However, specifying the source\n KMS key is always recommended as a best practice. When you use the\n SourceKeyId parameter to specify a KMS key, KMS uses only the KMS key you\n specify. If the ciphertext was encrypted under a different KMS key, the\n ReEncrypt operation fails. This practice ensures that you use the KMS key\n that you intend.

    \n
  • \n
  • \n

    To reencrypt the data, you must use the DestinationKeyId parameter to\n specify the KMS key that re-encrypts the data after it is decrypted. If the destination\n KMS key is an asymmetric KMS key, you must also provide the encryption algorithm. The\n algorithm that you choose must be compatible with the KMS key.

    \n \n

    When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.

    \n

    You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.

    \n
    \n
  • \n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. The source KMS key and\n destination KMS key can be in different Amazon Web Services accounts. Either or both KMS keys can be in a\n different account than the caller. To specify a KMS key in a different account, you must use\n its key ARN or alias ARN.

\n

\n Required permissions:

\n
    \n
  • \n

    \n kms:ReEncryptFrom\n permission on the source KMS key (key policy)

    \n
  • \n
  • \n

    \n kms:ReEncryptTo\n permission on the destination KMS key (key policy)

    \n
  • \n
\n

To permit reencryption from or to a KMS key, include the \"kms:ReEncrypt*\"\n permission in your key policy. This permission is\n automatically included in the key policy when you use the console to create a KMS key. But you\n must include it manually when you create a KMS key programmatically or when you use the PutKeyPolicy operation to set a key policy.

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Decrypts ciphertext and then reencrypts it entirely within KMS. You can use this\n operation to change the KMS key under which data is encrypted, such as when you manually\n rotate a KMS key or change the KMS key that protects a ciphertext. You can also use\n it to reencrypt ciphertext under the same KMS key, such as to change the encryption\n context of a ciphertext.

\n

The ReEncrypt operation can decrypt ciphertext that was encrypted by using a\n KMS key in an KMS operation, such as Encrypt or GenerateDataKey. It can also decrypt ciphertext that was encrypted by using the\n public key of an asymmetric KMS key\n outside of KMS. However, it cannot decrypt ciphertext produced by other libraries, such as\n the Amazon Web Services Encryption SDK or\n Amazon S3\n client-side encryption. These libraries return a ciphertext format that is\n incompatible with KMS.

\n

When you use the ReEncrypt operation, you need to provide information for the\n decrypt operation and the subsequent encrypt operation.

\n
    \n
  • \n

    If your ciphertext was encrypted under an asymmetric KMS key, you must use the\n SourceKeyId parameter to identify the KMS key that encrypted the\n ciphertext. You must also supply the encryption algorithm that was used. This information\n is required to decrypt the data.

    \n
  • \n
  • \n

    If your ciphertext was encrypted under a symmetric encryption KMS key, the\n SourceKeyId parameter is optional. KMS can get this information from\n metadata that it adds to the symmetric ciphertext blob. This feature adds durability to\n your implementation by ensuring that authorized users can decrypt ciphertext decades after\n it was encrypted, even if they've lost track of the key ID. However, specifying the source\n KMS key is always recommended as a best practice. When you use the\n SourceKeyId parameter to specify a KMS key, KMS uses only the KMS key you\n specify. If the ciphertext was encrypted under a different KMS key, the\n ReEncrypt operation fails. This practice ensures that you use the KMS key\n that you intend.

    \n
  • \n
  • \n

    To reencrypt the data, you must use the DestinationKeyId parameter to\n specify the KMS key that re-encrypts the data after it is decrypted. If the destination\n KMS key is an asymmetric KMS key, you must also provide the encryption algorithm. The\n algorithm that you choose must be compatible with the KMS key.

    \n \n

    When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.

    \n

    You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric encryption KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.

    \n
    \n
  • \n
\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. The source KMS key and\n destination KMS key can be in different Amazon Web Services accounts. Either or both KMS keys can be in a\n different account than the caller. To specify a KMS key in a different account, you must use\n its key ARN or alias ARN.

\n

\n Required permissions:

\n
    \n
  • \n

    \n kms:ReEncryptFrom\n permission on the source KMS key (key policy)

    \n
  • \n
  • \n

    \n kms:ReEncryptTo\n permission on the destination KMS key (key policy)

    \n
  • \n
\n

To permit reencryption from or to a KMS key, include the \"kms:ReEncrypt*\"\n permission in your key policy. This permission is\n automatically included in the key policy when you use the console to create a KMS key. But you\n must include it manually when you create a KMS key programmatically or when you use the PutKeyPolicy operation to set a key policy.

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To reencrypt data", + "documentation": "The following example reencrypts data with the specified KMS key.", + "input": { + "CiphertextBlob": "", + "DestinationKeyId": "0987dcba-09fe-87dc-65ba-ab0987654321" + }, + "output": { + "CiphertextBlob": "", + "KeyId": "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321", + "SourceKeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#ReEncryptRequest": { @@ -5317,7 +5798,51 @@ } ], "traits": { - "smithy.api#documentation": "

Replicates a multi-Region key into the specified Region. This operation creates a\n multi-Region replica key based on a multi-Region primary key in a different Region of the same\n Amazon Web Services partition. You can create multiple replicas of a primary key, but each must be in a\n different Region. To create a multi-Region primary key, use the CreateKey\n operation.

\n

This operation supports multi-Region keys, an KMS feature that lets you create multiple\n interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key\n material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt\n it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

A replica key is a fully-functional KMS key that can be used\n independently of its primary and peer replica keys. A primary key and its replica keys share\n properties that make them interoperable. They have the same key ID and key material. They also\n have the same key\n spec, key\n usage, key\n material origin, and automatic key rotation status. KMS automatically synchronizes these shared\n properties among related multi-Region keys. All other properties of a replica key can differ,\n including its key\n policy, tags, aliases, and Key states of KMS keys. KMS pricing and quotas for KMS keys apply to each\n primary key and replica key.

\n

When this operation completes, the new replica key has a transient key state of\n Creating. This key state changes to Enabled (or\n PendingImport) after a few seconds when the process of creating the new replica\n key is complete. While the key state is Creating, you can manage key, but you\n cannot yet use it in cryptographic operations. If you are creating and using the replica key\n programmatically, retry on KMSInvalidStateException or call\n DescribeKey to check its KeyState value before using it. For\n details about the Creating key state, see Key states of KMS keys in the\n Key Management Service Developer Guide.

\n

You cannot create more than one replica of a primary key in any Region. If the Region\n already includes a replica of the key you're trying to replicate, ReplicateKey\n returns an AlreadyExistsException error. If the key state of the existing replica\n is PendingDeletion, you can cancel the scheduled key deletion (CancelKeyDeletion) or wait for the key to be deleted. The new replica key you\n create will have the same shared\n properties as the original replica key.

\n

The CloudTrail log of a ReplicateKey operation records a\n ReplicateKey operation in the primary key's Region and a CreateKey operation in the replica key's Region.

\n

If you replicate a multi-Region primary key with imported key material, the replica key is\n created with no key material. You must import the same key material that you imported into the\n primary key. For details, see Importing key material into multi-Region keys in the Key Management Service Developer Guide.

\n

To convert a replica key to a primary key, use the UpdatePrimaryRegion\n operation.

\n \n

\n ReplicateKey uses different default values for the KeyPolicy\n and Tags parameters than those used in the KMS console. For details, see the\n parameter descriptions.

\n
\n

\n Cross-account use: No. You cannot use this operation to\n create a replica key in a different Amazon Web Services account.

\n

\n Required permissions:

\n
    \n
  • \n

    \n kms:ReplicateKey on the primary key (in the primary key's Region).\n Include this permission in the primary key's key policy.

    \n
  • \n
  • \n

    \n kms:CreateKey in an IAM policy in the replica Region.

    \n
  • \n
  • \n

    To use the Tags parameter, kms:TagResource in an IAM policy\n in the replica Region.

    \n
  • \n
\n

\n Related operations\n

\n " + "smithy.api#documentation": "

Replicates a multi-Region key into the specified Region. This operation creates a\n multi-Region replica key based on a multi-Region primary key in a different Region of the same\n Amazon Web Services partition. You can create multiple replicas of a primary key, but each must be in a\n different Region. To create a multi-Region primary key, use the CreateKey\n operation.

\n

This operation supports multi-Region keys, an KMS feature that lets you create multiple\n interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key\n material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt\n it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

A replica key is a fully-functional KMS key that can be used\n independently of its primary and peer replica keys. A primary key and its replica keys share\n properties that make them interoperable. They have the same key ID and key material. They also\n have the same key\n spec, key\n usage, key\n material origin, and automatic key rotation status. KMS automatically synchronizes these shared\n properties among related multi-Region keys. All other properties of a replica key can differ,\n including its key\n policy, tags, aliases, and Key states of KMS keys. KMS pricing and quotas for KMS keys apply to each\n primary key and replica key.

\n

When this operation completes, the new replica key has a transient key state of\n Creating. This key state changes to Enabled (or\n PendingImport) after a few seconds when the process of creating the new replica\n key is complete. While the key state is Creating, you can manage key, but you\n cannot yet use it in cryptographic operations. If you are creating and using the replica key\n programmatically, retry on KMSInvalidStateException or call\n DescribeKey to check its KeyState value before using it. For\n details about the Creating key state, see Key states of KMS keys in the\n Key Management Service Developer Guide.

\n

You cannot create more than one replica of a primary key in any Region. If the Region\n already includes a replica of the key you're trying to replicate, ReplicateKey\n returns an AlreadyExistsException error. If the key state of the existing replica\n is PendingDeletion, you can cancel the scheduled key deletion (CancelKeyDeletion) or wait for the key to be deleted. The new replica key you\n create will have the same shared\n properties as the original replica key.

\n

The CloudTrail log of a ReplicateKey operation records a\n ReplicateKey operation in the primary key's Region and a CreateKey operation in the replica key's Region.

\n

If you replicate a multi-Region primary key with imported key material, the replica key is\n created with no key material. You must import the same key material that you imported into the\n primary key. For details, see Importing key material into multi-Region keys in the Key Management Service Developer Guide.

\n

To convert a replica key to a primary key, use the UpdatePrimaryRegion\n operation.

\n \n

\n ReplicateKey uses different default values for the KeyPolicy\n and Tags parameters than those used in the KMS console. For details, see the\n parameter descriptions.

\n
\n

\n Cross-account use: No. You cannot use this operation to\n create a replica key in a different Amazon Web Services account.

\n

\n Required permissions:

\n
    \n
  • \n

    \n kms:ReplicateKey on the primary key (in the primary key's Region).\n Include this permission in the primary key's key policy.

    \n
  • \n
  • \n

    \n kms:CreateKey in an IAM policy in the replica Region.

    \n
  • \n
  • \n

    To use the Tags parameter, kms:TagResource in an IAM policy\n in the replica Region.

    \n
  • \n
\n

\n Related operations\n

\n ", + "smithy.api#examples": [ + { + "title": "To replicate a multi-Region key in a different AWS Region", + "documentation": "This example creates a multi-Region replica key in us-west-2 of a multi-Region primary key in us-east-1.", + "input": { + "KeyId": "arn:aws:kms:us-east-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab", + "ReplicaRegion": "us-west-2" + }, + "output": { + "ReplicaKeyMetadata": { + "MultiRegion": true, + "MultiRegionConfiguration": { + "MultiRegionKeyType": "REPLICA", + "PrimaryKey": { + "Arn": "arn:aws:kms:us-east-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab", + "Region": "us-east-1" + }, + "ReplicaKeys": [ + { + "Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab", + "Region": "us-west-2" + } + ] + }, + "AWSAccountId": "111122223333", + "Arn": "arn:aws:kms:us-west-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab", + "CreationDate": 1.607472987918E9, + "Description": "", + "Enabled": true, + "KeyId": "mrk-1234abcd12ab34cd56ef1234567890ab", + "KeyManager": "CUSTOMER", + "KeyState": "Enabled", + "KeyUsage": "ENCRYPT_DECRYPT", + "Origin": "AWS_KMS", + "CustomerMasterKeySpec": "SYMMETRIC_DEFAULT", + "EncryptionAlgorithms": [ + "SYMMETRIC_DEFAULT" + ] + }, + "ReplicaPolicy": "{\n \"Version\" : \"2012-10-17\",\n \"Id\" : \"key-default-1\",...}", + "ReplicaTags": [] + } + } + ] } }, "com.amazonaws.kms#ReplicateKeyRequest": { @@ -5428,7 +5953,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a grant. Typically, you retire a grant when you no longer need its permissions. To\n identify the grant to retire, use a grant token, or both the grant ID and a\n key identifier (key ID or key ARN) of the KMS key. The CreateGrant operation\n returns both values.

\n

This operation can be called by the retiring principal for a grant,\n by the grantee principal if the grant allows the RetireGrant\n operation, and by the Amazon Web Services account in which the grant is created. It can also be called by\n principals to whom permission for retiring a grant is delegated. For details, see Retiring and revoking\n grants in the Key Management Service Developer Guide.

\n

For detailed information about grants, including grant terminology, see Grants in KMS in the\n \n Key Management Service Developer Guide\n . For examples of working with grants in several\n programming languages, see Programming grants.

\n

\n Cross-account use: Yes. You can retire a grant on a KMS\n key in a different Amazon Web Services account.

\n

\n Required permissions::Permission to retire a grant is\n determined primarily by the grant. For details, see Retiring and revoking grants in\n the Key Management Service Developer Guide.

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Deletes a grant. Typically, you retire a grant when you no longer need its permissions. To\n identify the grant to retire, use a grant token, or both the grant ID and a\n key identifier (key ID or key ARN) of the KMS key. The CreateGrant operation\n returns both values.

\n

This operation can be called by the retiring principal for a grant,\n by the grantee principal if the grant allows the RetireGrant\n operation, and by the Amazon Web Services account in which the grant is created. It can also be called by\n principals to whom permission for retiring a grant is delegated. For details, see Retiring and revoking\n grants in the Key Management Service Developer Guide.

\n

For detailed information about grants, including grant terminology, see Grants in KMS in the\n \n Key Management Service Developer Guide\n . For examples of working with grants in several\n programming languages, see Programming grants.

\n

\n Cross-account use: Yes. You can retire a grant on a KMS\n key in a different Amazon Web Services account.

\n

\n Required permissions::Permission to retire a grant is\n determined primarily by the grant. For details, see Retiring and revoking grants in\n the Key Management Service Developer Guide.

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To retire a grant", + "documentation": "The following example retires a grant.", + "input": { + "KeyId": "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60" + } + } + ] } }, "com.amazonaws.kms#RetireGrantRequest": { @@ -5495,7 +6030,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified grant. You revoke a grant to terminate the permissions that the\n grant allows. For more information, see Retiring and revoking grants in\n the \n Key Management Service Developer Guide\n .

\n

When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as eventual consistency. For details, see Eventual consistency in\n the \n Key Management Service Developer Guide\n .

\n

For detailed information about grants, including grant terminology, see Grants in KMS in the\n \n Key Management Service Developer Guide\n . For examples of working with grants in several\n programming languages, see Programming grants.

\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:RevokeGrant (key policy).

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Deletes the specified grant. You revoke a grant to terminate the permissions that the\n grant allows. For more information, see Retiring and revoking grants in\n the \n Key Management Service Developer Guide\n .

\n

When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as eventual consistency. For details, see Eventual consistency in\n the \n Key Management Service Developer Guide\n .

\n

For detailed information about grants, including grant terminology, see Grants in KMS in the\n \n Key Management Service Developer Guide\n . For examples of working with grants in several\n programming languages, see Programming grants.

\n

\n Cross-account use: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key\n ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:RevokeGrant (key policy).

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To revoke a grant", + "documentation": "The following example revokes a grant.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "GrantId": "0c237476b39f8bc44e45212e08498fbe3151305030726c0590dd8d3e9f3d6a60" + } + } + ] } }, "com.amazonaws.kms#RevokeGrantRequest": { @@ -5646,7 +6191,24 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a digital\n signature for a message or message digest by using the private key in an asymmetric\n signing KMS key. To verify the signature, use the Verify operation, or use\n the public key in the same asymmetric KMS key outside of KMS. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

Digital signatures are generated and verified by using asymmetric key pair, such as an RSA\n or ECC pair that is represented by an asymmetric KMS key. The key owner (or an authorized\n user) uses their private key to sign a message. Anyone with the public key can verify that the\n message was signed with that particular private key and that the message hasn't changed since\n it was signed.

\n

To use the Sign operation, provide the following information:

\n
    \n
  • \n

    Use the KeyId parameter to identify an asymmetric KMS key with a\n KeyUsage value of SIGN_VERIFY. To get the\n KeyUsage value of a KMS key, use the DescribeKey\n operation. The caller must have kms:Sign permission on the KMS key.

    \n
  • \n
  • \n

    Use the Message parameter to specify the message or message digest to\n sign. You can submit messages of up to 4096 bytes. To sign a larger message, generate a\n hash digest of the message, and then provide the hash digest in the Message\n parameter. To indicate whether the message is a full message or a digest, use the\n MessageType parameter.

    \n
  • \n
  • \n

    Choose a signing algorithm that is compatible with the KMS key.

    \n
  • \n
\n \n

When signing a message, be sure to record the KMS key and the signing algorithm. This\n information is required to verify the signature.

\n
\n \n

Best practices recommend that you limit the time during which any signature is\n effective. This deters an attack where the actor uses a signed message to establish validity\n repeatedly or long after the message is superseded. Signatures do not include a timestamp,\n but you can include a timestamp in the signed message to help you detect when its time to\n refresh the signature.

\n
\n

To verify the signature that this operation generates, use the Verify\n operation. Or use the GetPublicKey operation to download the public key and\n then use the public key to verify the signature outside of KMS.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:Sign (key policy)

\n

\n Related operations: Verify\n

" + "smithy.api#documentation": "

Creates a digital\n signature for a message or message digest by using the private key in an asymmetric\n signing KMS key. To verify the signature, use the Verify operation, or use\n the public key in the same asymmetric KMS key outside of KMS. For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

Digital signatures are generated and verified by using asymmetric key pair, such as an RSA\n or ECC pair that is represented by an asymmetric KMS key. The key owner (or an authorized\n user) uses their private key to sign a message. Anyone with the public key can verify that the\n message was signed with that particular private key and that the message hasn't changed since\n it was signed.

\n

To use the Sign operation, provide the following information:

\n
    \n
  • \n

    Use the KeyId parameter to identify an asymmetric KMS key with a\n KeyUsage value of SIGN_VERIFY. To get the\n KeyUsage value of a KMS key, use the DescribeKey\n operation. The caller must have kms:Sign permission on the KMS key.

    \n
  • \n
  • \n

    Use the Message parameter to specify the message or message digest to\n sign. You can submit messages of up to 4096 bytes. To sign a larger message, generate a\n hash digest of the message, and then provide the hash digest in the Message\n parameter. To indicate whether the message is a full message or a digest, use the\n MessageType parameter.

    \n
  • \n
  • \n

    Choose a signing algorithm that is compatible with the KMS key.

    \n
  • \n
\n \n

When signing a message, be sure to record the KMS key and the signing algorithm. This\n information is required to verify the signature.

\n
\n \n

Best practices recommend that you limit the time during which any signature is\n effective. This deters an attack where the actor uses a signed message to establish validity\n repeatedly or long after the message is superseded. Signatures do not include a timestamp,\n but you can include a timestamp in the signed message to help you detect when its time to\n refresh the signature.

\n
\n

To verify the signature that this operation generates, use the Verify\n operation. Or use the GetPublicKey operation to download the public key and\n then use the public key to verify the signature outside of KMS.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:Sign (key policy)

\n

\n Related operations: Verify\n

", + "smithy.api#examples": [ + { + "title": "To digitally sign a message with an asymmetric KMS key.", + "documentation": "This operation uses the private key in an asymmetric elliptic curve (ECC) KMS key to generate a digital signature for a given message.", + "input": { + "KeyId": "alias/ECC_signing_key", + "Message": "", + "MessageType": "RAW", + "SigningAlgorithm": "ECDSA_SHA_384" + }, + "output": { + "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "Signature": "", + "SigningAlgorithm": "ECDSA_SHA_384" + } + } + ] } }, "com.amazonaws.kms#SignRequest": { @@ -5882,7 +6444,22 @@ } ], "traits": { - "smithy.api#documentation": "

Adds or edits tags on a customer managed key.

\n \n

Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

Each tag consists of a tag key and a tag value, both of which are case-sensitive strings.\n The tag value can be an empty (null) string. To add a tag, specify a new tag key and a tag\n value. To edit a tag, specify an existing tag key and a new tag value.

\n

You can use this operation to tag a customer managed key, but you cannot\n tag an Amazon Web Services\n managed key, an Amazon Web Services owned key, a custom key\n store, or an alias.

\n

You can also add tags to a KMS key while creating it (CreateKey) or\n replicating it (ReplicateKey).

\n

For information about using tags in KMS, see Tagging keys. For general information about\n tags, including the format and syntax, see Tagging Amazon Web Services resources in the Amazon\n Web Services General Reference.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:TagResource (key policy)

\n

\n Related operations\n

\n " + "smithy.api#documentation": "

Adds or edits tags on a customer managed key.

\n \n

Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

Each tag consists of a tag key and a tag value, both of which are case-sensitive strings.\n The tag value can be an empty (null) string. To add a tag, specify a new tag key and a tag\n value. To edit a tag, specify an existing tag key and a new tag value.

\n

You can use this operation to tag a customer managed key, but you cannot\n tag an Amazon Web Services\n managed key, an Amazon Web Services owned key, a custom key\n store, or an alias.

\n

You can also add tags to a KMS key while creating it (CreateKey) or\n replicating it (ReplicateKey).

\n

For information about using tags in KMS, see Tagging keys. For general information about\n tags, including the format and syntax, see Tagging Amazon Web Services resources in the Amazon\n Web Services General Reference.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:TagResource (key policy)

\n

\n Related operations\n

\n ", + "smithy.api#examples": [ + { + "title": "To tag a KMS key", + "documentation": "The following example tags a KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "Tags": [ + { + "TagKey": "Purpose", + "TagValue": "Test" + } + ] + } + } + ] } }, "com.amazonaws.kms#TagResourceRequest": { @@ -6148,52 +6725,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -6201,13 +6782,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -6217,224 +6807,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://kms-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://kms-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kms-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://kms-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://kms.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://kms.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://kms.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://kms.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -7417,7 +7958,20 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes tags from a customer managed key. To delete a tag,\n specify the tag key and the KMS key.

\n \n

Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

When it succeeds, the UntagResource operation doesn't return any output.\n Also, if the specified tag key isn't found on the KMS key, it doesn't throw an exception or\n return a response. To confirm that the operation worked, use the ListResourceTags operation.

\n

For information about using tags in KMS, see Tagging keys. For general information about\n tags, including the format and syntax, see Tagging Amazon Web Services resources in the Amazon\n Web Services General Reference.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:UntagResource (key policy)

\n

\n Related operations\n

\n " + "smithy.api#documentation": "

Deletes tags from a customer managed key. To delete a tag,\n specify the tag key and the KMS key.

\n \n

Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

When it succeeds, the UntagResource operation doesn't return any output.\n Also, if the specified tag key isn't found on the KMS key, it doesn't throw an exception or\n return a response. To confirm that the operation worked, use the ListResourceTags operation.

\n

For information about using tags in KMS, see Tagging keys. For general information about\n tags, including the format and syntax, see Tagging Amazon Web Services resources in the Amazon\n Web Services General Reference.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:UntagResource (key policy)

\n

\n Related operations\n

\n ", + "smithy.api#examples": [ + { + "title": "To remove tags from a KMS key", + "documentation": "The following example removes tags from a KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "TagKeys": [ + "Purpose", + "CostCenter" + ] + } + } + ] } }, "com.amazonaws.kms#UntagResourceRequest": { @@ -7468,7 +8022,17 @@ } ], "traits": { - "smithy.api#documentation": "

Associates an existing KMS alias with a different KMS key. Each alias is associated with\n only one KMS key at a time, although a KMS key can have multiple aliases. The alias and the\n KMS key must be in the same Amazon Web Services account and Region.

\n \n

Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

The current and new KMS key must be the same type (both symmetric or both asymmetric or\n both HMAC), and they must have the same key usage. This restriction prevents errors in code\n that uses aliases. If you must assign an alias to a different type of KMS key, use DeleteAlias to delete the old alias and CreateAlias to create\n a new alias.

\n

You cannot use UpdateAlias to change an alias name. To change an alias name,\n use DeleteAlias to delete the old alias and CreateAlias to\n create a new alias.

\n

Because an alias is not a property of a KMS key, you can create, update, and delete the\n aliases of a KMS key without affecting the KMS key. Also, aliases do not appear in the\n response from the DescribeKey operation. To get the aliases of all KMS keys\n in the account, use the ListAliases operation.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions\n

\n \n

For details, see Controlling access to aliases in the\n Key Management Service Developer Guide.

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Associates an existing KMS alias with a different KMS key. Each alias is associated with\n only one KMS key at a time, although a KMS key can have multiple aliases. The alias and the\n KMS key must be in the same Amazon Web Services account and Region.

\n \n

Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see ABAC for KMS in the Key Management Service Developer Guide.

\n
\n

The current and new KMS key must be the same type (both symmetric or both asymmetric or\n both HMAC), and they must have the same key usage. This restriction prevents errors in code\n that uses aliases. If you must assign an alias to a different type of KMS key, use DeleteAlias to delete the old alias and CreateAlias to create\n a new alias.

\n

You cannot use UpdateAlias to change an alias name. To change an alias name,\n use DeleteAlias to delete the old alias and CreateAlias to\n create a new alias.

\n

Because an alias is not a property of a KMS key, you can create, update, and delete the\n aliases of a KMS key without affecting the KMS key. Also, aliases do not appear in the\n response from the DescribeKey operation. To get the aliases of all KMS keys\n in the account, use the ListAliases operation.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions\n

\n \n

For details, see Controlling access to aliases in the\n Key Management Service Developer Guide.

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To update an alias", + "documentation": "The following example updates the specified alias to refer to the specified KMS key.", + "input": { + "AliasName": "alias/ExampleAlias", + "TargetKeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" + } + } + ] } }, "com.amazonaws.kms#UpdateAliasRequest": { @@ -7555,7 +8119,18 @@ } ], "traits": { - "smithy.api#documentation": "

Changes the properties of a custom key store. You can use this operation to change the\n properties of an CloudHSM key store or an external key store.

\n

Use the required CustomKeyStoreId parameter to identify the custom key store.\n Use the remaining optional parameters to change its properties. This operation does not return\n any property values. To verify the updated property values, use the DescribeCustomKeyStores operation.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n \n

When updating the properties of an external key store, verify that the updated settings\n connect your key store, via the external key store proxy, to the same external key manager\n as the previous settings, or to a backup or snapshot of the external key manager with the\n same cryptographic keys. If the updated connection settings fail, you can fix them and\n retry, although an extended delay might disrupt Amazon Web Services services. However, if KMS\n permanently loses its access to cryptographic keys, ciphertext encrypted under those keys is\n unrecoverable.

\n
\n \n

For external key stores:

\n

Some external key managers provide a simpler method for updating an external key store.\n For details, see your external key manager documentation.

\n

When updating an external key store in the KMS console, you can upload a JSON-based\n proxy configuration file with the desired values. You cannot upload the proxy configuration\n file to the UpdateCustomKeyStore operation. However, you can use the file to\n help you determine the correct values for the UpdateCustomKeyStore\n parameters.

\n
\n

For an CloudHSM key store, you can use this operation to change the custom key store friendly\n name (NewCustomKeyStoreName), to tell KMS about a change to the\n kmsuser crypto user password (KeyStorePassword), or to associate\n the custom key store with a different, but related, CloudHSM cluster\n (CloudHsmClusterId). To update any property of an CloudHSM key store, the\n ConnectionState of the CloudHSM key store must be DISCONNECTED.

\n

For an external key store, you can use this operation to change the custom key store\n friendly name (NewCustomKeyStoreName), or to tell KMS about a change to the\n external key store proxy authentication credentials\n (XksProxyAuthenticationCredential), connection method\n (XksProxyConnectivity), external proxy endpoint\n (XksProxyUriEndpoint) and path (XksProxyUriPath). For external key\n stores with an XksProxyConnectivity of VPC_ENDPOINT_SERVICE, you can\n also update the Amazon VPC endpoint service name (XksProxyVpcEndpointServiceName). To\n update most properties of an external key store, the ConnectionState of the\n external key store must be DISCONNECTED. However, you can update the\n CustomKeyStoreName, XksProxyAuthenticationCredential, and\n XksProxyUriPath of an external key store when it is in the CONNECTED or\n DISCONNECTED state.

\n

If your update requires a DISCONNECTED state, before using\n UpdateCustomKeyStore, use the DisconnectCustomKeyStore\n operation to disconnect the custom key store. After the UpdateCustomKeyStore\n operation completes, use the ConnectCustomKeyStore to reconnect the custom\n key store. To find the ConnectionState of the custom key store, use the DescribeCustomKeyStores operation.

\n

\n

\n

Before updating the custom key store, verify that the new values allow KMS to connect\n the custom key store to its backing key store. For example, before you change the\n XksProxyUriPath value, verify that the external key store proxy is reachable at\n the new path.

\n

If the operation succeeds, it returns a JSON object with no\nproperties.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:UpdateCustomKeyStore (IAM policy)

\n

\n Related operations:\n

\n " + "smithy.api#documentation": "

Changes the properties of a custom key store. You can use this operation to change the\n properties of an CloudHSM key store or an external key store.

\n

Use the required CustomKeyStoreId parameter to identify the custom key store.\n Use the remaining optional parameters to change its properties. This operation does not return\n any property values. To verify the updated property values, use the DescribeCustomKeyStores operation.

\n

This operation is part of the custom key stores feature in KMS, which\ncombines the convenience and extensive integration of KMS with the isolation and control of a\nkey store that you own and manage.

\n \n

When updating the properties of an external key store, verify that the updated settings\n connect your key store, via the external key store proxy, to the same external key manager\n as the previous settings, or to a backup or snapshot of the external key manager with the\n same cryptographic keys. If the updated connection settings fail, you can fix them and\n retry, although an extended delay might disrupt Amazon Web Services services. However, if KMS\n permanently loses its access to cryptographic keys, ciphertext encrypted under those keys is\n unrecoverable.

\n
\n \n

For external key stores:

\n

Some external key managers provide a simpler method for updating an external key store.\n For details, see your external key manager documentation.

\n

When updating an external key store in the KMS console, you can upload a JSON-based\n proxy configuration file with the desired values. You cannot upload the proxy configuration\n file to the UpdateCustomKeyStore operation. However, you can use the file to\n help you determine the correct values for the UpdateCustomKeyStore\n parameters.

\n
\n

For an CloudHSM key store, you can use this operation to change the custom key store friendly\n name (NewCustomKeyStoreName), to tell KMS about a change to the\n kmsuser crypto user password (KeyStorePassword), or to associate\n the custom key store with a different, but related, CloudHSM cluster\n (CloudHsmClusterId). To update any property of an CloudHSM key store, the\n ConnectionState of the CloudHSM key store must be DISCONNECTED.

\n

For an external key store, you can use this operation to change the custom key store\n friendly name (NewCustomKeyStoreName), or to tell KMS about a change to the\n external key store proxy authentication credentials\n (XksProxyAuthenticationCredential), connection method\n (XksProxyConnectivity), external proxy endpoint\n (XksProxyUriEndpoint) and path (XksProxyUriPath). For external key\n stores with an XksProxyConnectivity of VPC_ENDPOINT_SERVICE, you can\n also update the Amazon VPC endpoint service name (XksProxyVpcEndpointServiceName). To\n update most properties of an external key store, the ConnectionState of the\n external key store must be DISCONNECTED. However, you can update the\n CustomKeyStoreName, XksProxyAuthenticationCredential, and\n XksProxyUriPath of an external key store when it is in the CONNECTED or\n DISCONNECTED state.

\n

If your update requires a DISCONNECTED state, before using\n UpdateCustomKeyStore, use the DisconnectCustomKeyStore\n operation to disconnect the custom key store. After the UpdateCustomKeyStore\n operation completes, use the ConnectCustomKeyStore to reconnect the custom\n key store. To find the ConnectionState of the custom key store, use the DescribeCustomKeyStores operation.

\n

\n

\n

Before updating the custom key store, verify that the new values allow KMS to connect\n the custom key store to its backing key store. For example, before you change the\n XksProxyUriPath value, verify that the external key store proxy is reachable at\n the new path.

\n

If the operation succeeds, it returns a JSON object with no\nproperties.

\n

\n Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.

\n

\n Required permissions: kms:UpdateCustomKeyStore (IAM policy)

\n

\n Related operations:\n

\n ", + "smithy.api#examples": [ + { + "title": "To edit the friendly name of a custom key store", + "documentation": "This example changes the friendly name of the AWS KMS custom key store to the name that you specify. This operation does not return any data. To verify that the operation worked, use the DescribeCustomKeyStores operation.", + "input": { + "CustomKeyStoreId": "cks-1234567890abcdef0", + "NewCustomKeyStoreName": "DevelopmentKeys" + }, + "output": {} + } + ] } }, "com.amazonaws.kms#UpdateCustomKeyStoreRequest": { @@ -7654,7 +8229,17 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the description of a KMS key. To see the description of a KMS key, use DescribeKey.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:UpdateKeyDescription (key policy)

\n

\n Related operations\n

\n " + "smithy.api#documentation": "

Updates the description of a KMS key. To see the description of a KMS key, use DescribeKey.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

\n

\n Required permissions: kms:UpdateKeyDescription (key policy)

\n

\n Related operations\n

\n ", + "smithy.api#examples": [ + { + "title": "To update the description of a KMS key", + "documentation": "The following example updates the description of the specified KMS key.", + "input": { + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "Description": "Example description that indicates the intended use of this KMS key." + } + } + ] } }, "com.amazonaws.kms#UpdateKeyDescriptionRequest": { @@ -7708,7 +8293,17 @@ } ], "traits": { - "smithy.api#documentation": "

Changes the primary key of a multi-Region key.

\n

This operation changes the replica key in the specified Region to a primary key and\n changes the former primary key to a replica key. For example, suppose you have a primary key\n in us-east-1 and a replica key in eu-west-2. If you run\n UpdatePrimaryRegion with a PrimaryRegion value of\n eu-west-2, the primary key is now the key in eu-west-2, and the\n key in us-east-1 becomes a replica key. For details, see Updating the primary Region in the Key Management Service Developer Guide.

\n

This operation supports multi-Region keys, an KMS feature that lets you create multiple\n interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key\n material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt\n it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

The primary key of a multi-Region key is the source for properties\n that are always shared by primary and replica keys, including the key material, key ID, key spec, key usage, key material\n origin, and automatic\n key rotation. It's the only key that can be replicated. You cannot delete the primary\n key until all replica keys are deleted.

\n

The key ID and primary Region that you specify uniquely identify the replica key that will\n become the primary key. The primary Region must already have a replica key. This operation\n does not create a KMS key in the specified Region. To find the replica keys, use the DescribeKey operation on the primary key or any replica key. To create a replica\n key, use the ReplicateKey operation.

\n

You can run this operation while using the affected multi-Region keys in cryptographic\n operations. This operation should not delay, interrupt, or cause failures in cryptographic\n operations.

\n

Even after this operation completes, the process of updating the primary Region might\n still be in progress for a few more seconds. Operations such as DescribeKey might\n display both the old and new primary keys as replicas. The old and new primary keys have a\n transient key state of Updating. The original key state is restored when the\n update is complete. While the key state is Updating, you can use the keys in\n cryptographic operations, but you cannot replicate the new primary key or perform certain\n management operations, such as enabling or disabling these keys. For details about the\n Updating key state, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

This operation does not return any output. To verify that primary key is changed, use the\n DescribeKey operation.

\n

\n Cross-account use: No. You cannot use this operation in a\n different Amazon Web Services account.

\n

\n Required permissions:

\n
    \n
  • \n

    \n kms:UpdatePrimaryRegion on the current primary key (in the primary key's\n Region). Include this permission primary key's key policy.

    \n
  • \n
  • \n

    \n kms:UpdatePrimaryRegion on the current replica key (in the replica key's\n Region). Include this permission in the replica key's key policy.

    \n
  • \n
\n

\n Related operations\n

\n " + "smithy.api#documentation": "

Changes the primary key of a multi-Region key.

\n

This operation changes the replica key in the specified Region to a primary key and\n changes the former primary key to a replica key. For example, suppose you have a primary key\n in us-east-1 and a replica key in eu-west-2. If you run\n UpdatePrimaryRegion with a PrimaryRegion value of\n eu-west-2, the primary key is now the key in eu-west-2, and the\n key in us-east-1 becomes a replica key. For details, see Updating the primary Region in the Key Management Service Developer Guide.

\n

This operation supports multi-Region keys, an KMS feature that lets you create multiple\n interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key\n material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt\n it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

\n

The primary key of a multi-Region key is the source for properties\n that are always shared by primary and replica keys, including the key material, key ID, key spec, key usage, key material\n origin, and automatic\n key rotation. It's the only key that can be replicated. You cannot delete the primary\n key until all replica keys are deleted.

\n

The key ID and primary Region that you specify uniquely identify the replica key that will\n become the primary key. The primary Region must already have a replica key. This operation\n does not create a KMS key in the specified Region. To find the replica keys, use the DescribeKey operation on the primary key or any replica key. To create a replica\n key, use the ReplicateKey operation.

\n

You can run this operation while using the affected multi-Region keys in cryptographic\n operations. This operation should not delay, interrupt, or cause failures in cryptographic\n operations.

\n

Even after this operation completes, the process of updating the primary Region might\n still be in progress for a few more seconds. Operations such as DescribeKey might\n display both the old and new primary keys as replicas. The old and new primary keys have a\n transient key state of Updating. The original key state is restored when the\n update is complete. While the key state is Updating, you can use the keys in\n cryptographic operations, but you cannot replicate the new primary key or perform certain\n management operations, such as enabling or disabling these keys. For details about the\n Updating key state, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

This operation does not return any output. To verify that primary key is changed, use the\n DescribeKey operation.

\n

\n Cross-account use: No. You cannot use this operation in a\n different Amazon Web Services account.

\n

\n Required permissions:

\n
    \n
  • \n

    \n kms:UpdatePrimaryRegion on the current primary key (in the primary key's\n Region). Include this permission primary key's key policy.

    \n
  • \n
  • \n

    \n kms:UpdatePrimaryRegion on the current replica key (in the replica key's\n Region). Include this permission in the replica key's key policy.

    \n
  • \n
\n

\n Related operations\n

\n ", + "smithy.api#examples": [ + { + "title": "To update the primary Region of a multi-Region KMS key", + "documentation": "The following UpdatePrimaryRegion example changes the multi-Region replica key in the eu-central-1 Region to the primary key. The current primary key in the us-west-1 Region becomes a replica key. \n\nThe KeyId parameter identifies the current primary key in the us-west-1 Region. The PrimaryRegion parameter indicates the Region of the replica key that will become the new primary key.\n\nThis operation does not return any output. To verify that primary key is changed, use the DescribeKey operation.", + "input": { + "KeyId": "arn:aws:kms:us-west-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab", + "PrimaryRegion": "eu-central-1" + } + } + ] } }, "com.amazonaws.kms#UpdatePrimaryRegionRequest": { @@ -7774,7 +8369,25 @@ } ], "traits": { - "smithy.api#documentation": "

Verifies a digital signature that was generated by the Sign operation.

\n

\n

Verification confirms that an authorized user signed the message with the specified KMS\n key and signing algorithm, and the message hasn't changed since it was signed. If the\n signature is verified, the value of the SignatureValid field in the response is\n True. If the signature verification fails, the Verify operation\n fails with an KMSInvalidSignatureException exception.

\n

A digital signature is generated by using the private key in an asymmetric KMS key. The\n signature is verified by using the public key in the same asymmetric KMS key.\n For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

To use the Verify operation, specify the same asymmetric KMS key, message,\n and signing algorithm that were used to produce the signature. The message type does not need\n to be the same as the one used for signing, but it must indicate whether the value of the\n Message parameter should be hashed as part of the verification process.

\n

You can also verify the digital signature by using the public key of the KMS key outside\n of KMS. Use the GetPublicKey operation to download the public key in the\n asymmetric KMS key and then use the public key to verify the signature outside of KMS. The\n advantage of using the Verify operation is that it is performed within KMS. As\n a result, it's easy to call, the operation is performed within the FIPS boundary, it is logged\n in CloudTrail, and you can use key policy and IAM policy to determine who is authorized to use\n the KMS key to verify signatures.

\n

To verify a signature outside of KMS with an SM2 public key (China Regions only), you\n must specify the distinguishing ID. By default, KMS uses 1234567812345678 as\n the distinguishing ID. For more information, see Offline\n verification with SM2 key pairs.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:Verify (key policy)

\n

\n Related operations: Sign\n

" + "smithy.api#documentation": "

Verifies a digital signature that was generated by the Sign operation.

\n

\n

Verification confirms that an authorized user signed the message with the specified KMS\n key and signing algorithm, and the message hasn't changed since it was signed. If the\n signature is verified, the value of the SignatureValid field in the response is\n True. If the signature verification fails, the Verify operation\n fails with an KMSInvalidSignatureException exception.

\n

A digital signature is generated by using the private key in an asymmetric KMS key. The\n signature is verified by using the public key in the same asymmetric KMS key.\n For information about asymmetric KMS keys, see Asymmetric KMS keys in the Key Management Service Developer Guide.

\n

To use the Verify operation, specify the same asymmetric KMS key, message,\n and signing algorithm that were used to produce the signature. The message type does not need\n to be the same as the one used for signing, but it must indicate whether the value of the\n Message parameter should be hashed as part of the verification process.

\n

You can also verify the digital signature by using the public key of the KMS key outside\n of KMS. Use the GetPublicKey operation to download the public key in the\n asymmetric KMS key and then use the public key to verify the signature outside of KMS. The\n advantage of using the Verify operation is that it is performed within KMS. As\n a result, it's easy to call, the operation is performed within the FIPS boundary, it is logged\n in CloudTrail, and you can use key policy and IAM policy to determine who is authorized to use\n the KMS key to verify signatures.

\n

To verify a signature outside of KMS with an SM2 public key (China Regions only), you\n must specify the distinguishing ID. By default, KMS uses 1234567812345678 as\n the distinguishing ID. For more information, see Offline\n verification with SM2 key pairs.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:Verify (key policy)

\n

\n Related operations: Sign\n

", + "smithy.api#examples": [ + { + "title": "To use an asymmetric KMS key to verify a digital signature", + "documentation": "This operation uses the public key in an elliptic curve (ECC) asymmetric key to verify a digital signature within AWS KMS.", + "input": { + "KeyId": "alias/ECC_signing_key", + "Message": "", + "MessageType": "RAW", + "Signature": "", + "SigningAlgorithm": "ECDSA_SHA_384" + }, + "output": { + "KeyId": "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "SignatureValid": true, + "SigningAlgorithm": "ECDSA_SHA_384" + } + } + ] } }, "com.amazonaws.kms#VerifyMac": { @@ -7815,7 +8428,24 @@ } ], "traits": { - "smithy.api#documentation": "

Verifies the hash-based message authentication code (HMAC) for a specified message, HMAC\n KMS key, and MAC algorithm. To verify the HMAC, VerifyMac computes an HMAC using\n the message, HMAC KMS key, and MAC algorithm that you specify, and compares the computed HMAC\n to the HMAC that you specify. If the HMACs are identical, the verification succeeds;\n otherwise, it fails. Verification indicates that the message hasn't changed since the HMAC was\n calculated, and the specified key was used to generate and verify the HMAC.

\n

HMAC KMS keys and the HMAC algorithms that KMS uses conform to industry standards\n defined in RFC 2104.

\n

This operation is part of KMS support for HMAC KMS keys. For details, see\n HMAC keys in KMS in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:VerifyMac (key policy)

\n

\n Related operations: GenerateMac\n

" + "smithy.api#documentation": "

Verifies the hash-based message authentication code (HMAC) for a specified message, HMAC\n KMS key, and MAC algorithm. To verify the HMAC, VerifyMac computes an HMAC using\n the message, HMAC KMS key, and MAC algorithm that you specify, and compares the computed HMAC\n to the HMAC that you specify. If the HMACs are identical, the verification succeeds;\n otherwise, it fails. Verification indicates that the message hasn't changed since the HMAC was\n calculated, and the specified key was used to generate and verify the HMAC.

\n

HMAC KMS keys and the HMAC algorithms that KMS uses conform to industry standards\n defined in RFC 2104.

\n

This operation is part of KMS support for HMAC KMS keys. For details, see\n HMAC keys in KMS in the\n Key Management Service Developer Guide.

\n

The KMS key that you use for this operation must be in a compatible key state. For\ndetails, see Key states of KMS keys in the Key Management Service Developer Guide.

\n

\n Cross-account use: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify\n the key ARN or alias ARN in the value of the KeyId parameter.

\n

\n Required permissions: kms:VerifyMac (key policy)

\n

\n Related operations: GenerateMac\n

", + "smithy.api#examples": [ + { + "title": "To verify an HMAC", + "documentation": "This example verifies an HMAC for a particular message, HMAC KMS keys, and MAC algorithm. A value of 'true' in the MacValid value in the response indicates that the HMAC is valid.", + "input": { + "Message": "Hello World", + "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", + "MacAlgorithm": "HMAC_SHA_384", + "Mac": "" + }, + "output": { + "KeyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", + "MacValid": true, + "MacAlgorithm": "HMAC_SHA_384" + } + } + ] } }, "com.amazonaws.kms#VerifyMacRequest": { diff --git a/codegen/sdk-codegen/aws-models/lakeformation.json b/codegen/sdk-codegen/aws-models/lakeformation.json index 0977a01aa07..6e0da02046b 100644 --- a/codegen/sdk-codegen/aws-models/lakeformation.json +++ b/codegen/sdk-codegen/aws-models/lakeformation.json @@ -249,52 +249,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -302,13 +306,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -318,224 +331,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://lakeformation-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://lakeformation-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://lakeformation-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://lakeformation-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://lakeformation.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://lakeformation.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://lakeformation.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://lakeformation.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/lambda.json b/codegen/sdk-codegen/aws-models/lambda.json index e3300f4f548..9f2a524dd9c 100644 --- a/codegen/sdk-codegen/aws-models/lambda.json +++ b/codegen/sdk-codegen/aws-models/lambda.json @@ -306,52 +306,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -359,13 +363,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -375,224 +388,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://lambda.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://lambda.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/lex-model-building-service.json b/codegen/sdk-codegen/aws-models/lex-model-building-service.json index 56ae837db80..10d77b5f4f6 100644 --- a/codegen/sdk-codegen/aws-models/lex-model-building-service.json +++ b/codegen/sdk-codegen/aws-models/lex-model-building-service.json @@ -166,6 +166,7 @@ "arnNamespace": "lex", "cloudFormationName": "LexModelBuildingService", "cloudTrailEventSource": "lexmodelbuildingservice.amazonaws.com", + "docId": "lex-models-2017-04-19", "endpointPrefix": "models.lex" }, "aws.auth#sigv4": { @@ -234,52 +235,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -287,13 +292,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -303,251 +317,86 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://models.lex-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://models-fips.lex.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://models-fips.lex.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://models.lex-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://models.lex-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://models.lex.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { @@ -569,7 +418,7 @@ } ], "endpoint": { - "url": "https://models.lex.{Region}.amazonaws.com", + "url": "https://models-fips.lex.{Region}.amazonaws.com", "properties": {}, "headers": {} }, @@ -594,7 +443,7 @@ } ], "endpoint": { - "url": "https://models.lex.{Region}.amazonaws.com", + "url": "https://models-fips.lex.{Region}.amazonaws.com", "properties": {}, "headers": {} }, @@ -603,24 +452,140 @@ { "conditions": [], "endpoint": { - "url": "https://models.lex.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://models.lex-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "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://models.lex.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://models.lex.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://models.lex.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://models.lex.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -635,8 +600,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -648,8 +613,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -661,8 +626,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -674,8 +639,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -687,8 +652,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -700,8 +665,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -713,8 +678,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -726,8 +691,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -739,8 +704,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -752,8 +717,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -765,8 +730,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -778,8 +743,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -791,8 +756,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -804,8 +769,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -817,8 +782,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -830,8 +795,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -843,8 +808,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -856,8 +821,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -869,8 +834,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -882,8 +847,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -895,8 +860,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -908,8 +873,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -921,8 +897,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -934,8 +921,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -947,8 +945,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -960,8 +969,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -973,8 +982,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -986,8 +995,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -998,8 +1007,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1010,10 +1019,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1167,7 +1182,7 @@ "botName": { "target": "com.amazonaws.lexmodelbuildingservice#BotName", "traits": { - "smithy.api#documentation": "

The name of the Amazon Lex bot to which this association is being made.

\n \n

Currently, Amazon Lex supports associations with Facebook and Slack,\n and Twilio.

\n\n
" + "smithy.api#documentation": "

The name of the Amazon Lex bot to which this association is being made.

\n \n

Currently, Amazon Lex supports associations with Facebook and Slack,\n and Twilio.

\n
" } }, "createdDate": { @@ -1388,45 +1403,55 @@ } }, "com.amazonaws.lexmodelbuildingservice#ChannelStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "CREATED", - "name": "CREATED" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATED" } - ] + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } } }, "com.amazonaws.lexmodelbuildingservice#ChannelType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Facebook", - "name": "FACEBOOK" - }, - { - "value": "Slack", - "name": "SLACK" - }, - { - "value": "Twilio-Sms", - "name": "TWILIO_SMS" - }, - { - "value": "Kik", - "name": "KIK" + "type": "enum", + "members": { + "FACEBOOK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Facebook" + } + }, + "SLACK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Slack" + } + }, + "TWILIO_SMS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Twilio-Sms" + } + }, + "KIK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Kik" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#CodeHook": { @@ -1483,22 +1508,26 @@ } }, "com.amazonaws.lexmodelbuildingservice#ContentType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PlainText", - "name": "PLAIN_TEXT" - }, - { - "value": "SSML", - "name": "SSML" - }, - { - "value": "CustomPayload", - "name": "CUSTOM_PAYLOAD" + "type": "enum", + "members": { + "PLAIN_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PlainText" + } + }, + "SSML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SSML" + } + }, + "CUSTOM_PAYLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CustomPayload" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#ContextTimeToLiveInSeconds": { @@ -1618,6 +1647,9 @@ "smithy.api#documentation": "

Identifies a specific revision of the $LATEST version\n of the bot. If you specify a checksum and the $LATEST version\n of the bot has a different checksum, a\n PreconditionFailedException exception is returned and Amazon Lex\n doesn't publish a new version. If you don't specify a checksum, Amazon Lex\n publishes the $LATEST version.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#CreateBotVersionResponse": { @@ -1725,6 +1757,9 @@ "smithy.api#documentation": "

Indicates whether utterances entered by the user should be sent to\n Amazon Comprehend for sentiment analysis.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#CreateIntentVersion": { @@ -1781,6 +1816,9 @@ "smithy.api#documentation": "

Checksum of the $LATEST version of the intent that\n should be used to create the new version. If you specify a checksum and\n the $LATEST version of the intent has a different checksum,\n Amazon Lex returns a PreconditionFailedException exception and\n doesn't publish a new version. If you don't specify a checksum, Amazon Lex\n publishes the $LATEST version.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#CreateIntentVersionResponse": { @@ -1894,6 +1932,9 @@ "smithy.api#documentation": "

An array of OutputContext objects that lists the contexts\n that the intent activates when the intent is fulfilled.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#CreateSlotTypeVersion": { @@ -1925,7 +1966,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new version of a slot type based on the\n $LATEST version of the specified slot type. If the\n $LATEST version of this resource has not changed since the\n last version that you created, Amazon Lex doesn't create a new version. It\n returns the last version that you created.

\n \n

You can update only the $LATEST version of a slot\n type. You can't update the numbered versions that you create with the\n CreateSlotTypeVersion operation.

\n
\n\n

When you create a version of a slot type, Amazon Lex sets the version to\n 1. Subsequent versions increment by 1. For more information, see versioning-intro.

\n\n

This operation requires permissions for the\n lex:CreateSlotTypeVersion action.

", + "smithy.api#documentation": "

Creates a new version of a slot type based on the\n $LATEST version of the specified slot type. If the\n $LATEST version of this resource has not changed since the\n last version that you created, Amazon Lex doesn't create a new version. It\n returns the last version that you created.

\n \n

You can update only the $LATEST version of a slot\n type. You can't update the numbered versions that you create with the\n CreateSlotTypeVersion operation.

\n
\n

When you create a version of a slot type, Amazon Lex sets the version to\n 1. Subsequent versions increment by 1. For more information, see versioning-intro.

\n

This operation requires permissions for the\n lex:CreateSlotTypeVersion action.

", "smithy.api#http": { "method": "POST", "uri": "/slottypes/{name}/versions", @@ -1950,6 +1991,9 @@ "smithy.api#documentation": "

Checksum for the $LATEST version of the slot type that\n you want to publish. If you specify a checksum and the\n $LATEST version of the slot type has a different checksum,\n Amazon Lex returns a PreconditionFailedException exception and\n doesn't publish the new version. If you don't specify a checksum, Amazon Lex\n publishes the $LATEST version.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#CreateSlotTypeVersionResponse": { @@ -2015,6 +2059,9 @@ "smithy.api#documentation": "

Configuration information that extends the parent built-in slot\n type.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#CustomOrBuiltinSlotTypeName": { @@ -2056,7 +2103,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes all versions of the bot, including the $LATEST\n version. To delete a specific version of the bot, use the DeleteBotVersion operation. The DeleteBot\n operation doesn't immediately remove the bot schema. Instead, it is marked\n for deletion and removed later.

\n

Amazon Lex stores utterances indefinitely for improving the ability of\n your bot to respond to user inputs. These utterances are not removed when\n the bot is deleted. To remove the utterances, use the DeleteUtterances operation.

\n

If a bot has an alias, you can't delete it. Instead, the\n DeleteBot operation returns a\n ResourceInUseException exception that includes a reference\n to the alias that refers to the bot. To remove the reference to the bot,\n delete the alias. If you get the same exception again, delete the\n referring alias until the DeleteBot operation is\n successful.

\n\n

This operation requires permissions for the\n lex:DeleteBot action.

", + "smithy.api#documentation": "

Deletes all versions of the bot, including the $LATEST\n version. To delete a specific version of the bot, use the DeleteBotVersion operation. The DeleteBot\n operation doesn't immediately remove the bot schema. Instead, it is marked\n for deletion and removed later.

\n

Amazon Lex stores utterances indefinitely for improving the ability of\n your bot to respond to user inputs. These utterances are not removed when\n the bot is deleted. To remove the utterances, use the DeleteUtterances operation.

\n

If a bot has an alias, you can't delete it. Instead, the\n DeleteBot operation returns a\n ResourceInUseException exception that includes a reference\n to the alias that refers to the bot. To remove the reference to the bot,\n delete the alias. If you get the same exception again, delete the\n referring alias until the DeleteBot operation is\n successful.

\n

This operation requires permissions for the\n lex:DeleteBot action.

", "smithy.api#http": { "method": "DELETE", "uri": "/bots/{name}", @@ -2120,6 +2167,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#DeleteBotChannelAssociation": { @@ -2183,6 +2233,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#DeleteBotRequest": { @@ -2196,6 +2249,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#DeleteBotVersion": { @@ -2254,6 +2310,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#DeleteIntent": { @@ -2285,7 +2344,7 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes all versions of the intent, including the\n $LATEST version. To delete a specific version of the\n intent, use the DeleteIntentVersion operation.

\n

You can delete a version of an intent only if it is not\n referenced. To delete an intent that is referred to in one or more bots\n (see how-it-works), you must remove those references\n first.

\n \n

If you get the ResourceInUseException exception, it\n provides an example reference that shows where the intent is referenced.\n To remove the reference to the intent, either update the bot or delete\n it. If you get the same exception when you attempt to delete the intent\n again, repeat until the intent has no references and the call to\n DeleteIntent is successful.

\n
\n\n

This operation requires permission for the\n lex:DeleteIntent action.

", + "smithy.api#documentation": "

Deletes all versions of the intent, including the\n $LATEST version. To delete a specific version of the\n intent, use the DeleteIntentVersion operation.

\n

You can delete a version of an intent only if it is not\n referenced. To delete an intent that is referred to in one or more bots\n (see how-it-works), you must remove those references\n first.

\n \n

If you get the ResourceInUseException exception, it\n provides an example reference that shows where the intent is referenced.\n To remove the reference to the intent, either update the bot or delete\n it. If you get the same exception when you attempt to delete the intent\n again, repeat until the intent has no references and the call to\n DeleteIntent is successful.

\n
\n

This operation requires permission for the\n lex:DeleteIntent action.

", "smithy.api#http": { "method": "DELETE", "uri": "/intents/{name}", @@ -2304,6 +2363,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#DeleteIntentVersion": { @@ -2362,6 +2424,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#DeleteSlotType": { @@ -2412,6 +2477,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#DeleteSlotTypeVersion": { @@ -2470,6 +2538,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#DeleteUtterances": { @@ -2522,6 +2593,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#Description": { @@ -2534,18 +2608,20 @@ } }, "com.amazonaws.lexmodelbuildingservice#Destination": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CLOUDWATCH_LOGS", - "name": "CLOUDWATCH_LOGS" - }, - { - "value": "S3", - "name": "S3" + "type": "enum", + "members": { + "CLOUDWATCH_LOGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLOUDWATCH_LOGS" + } + }, + "S3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#EnumerationValue": { @@ -2582,37 +2658,43 @@ } }, "com.amazonaws.lexmodelbuildingservice#ExportStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "READY", - "name": "READY" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#ExportType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ALEXA_SKILLS_KIT", - "name": "ALEXA_SKILLS_KIT" - }, - { - "value": "LEX", - "name": "LEX" + "type": "enum", + "members": { + "ALEXA_SKILLS_KIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALEXA_SKILLS_KIT" + } + }, + "LEX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LEX" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#FollowUpPrompt": { @@ -2655,22 +2737,24 @@ } }, "traits": { - "smithy.api#documentation": "

Describes how the intent is fulfilled after the user provides all\n of the information required for the intent. You can provide a Lambda\n function to process the intent, or you can return the intent information\n to the client application. We recommend that you use a Lambda function so\n that the relevant logic lives in the Cloud and limit the client-side code\n primarily to presentation. If you need to update the logic, you only\n update the Lambda function; you don't need to upgrade your client\n application.

\n\n\n

Consider the following examples:

\n
    \n
  • \n

    In a pizza ordering application, after the user provides all of\n the information for placing an order, you use a Lambda function to\n place an order with a pizzeria.

    \n
  • \n
  • \n

    In a gaming application, when a user says \"pick up a rock,\"\n this information must go back to the client application so that it can\n perform the operation and update the graphics. In this case, you want\n Amazon Lex to return the intent data to the client.

    \n
  • \n
" + "smithy.api#documentation": "

Describes how the intent is fulfilled after the user provides all\n of the information required for the intent. You can provide a Lambda\n function to process the intent, or you can return the intent information\n to the client application. We recommend that you use a Lambda function so\n that the relevant logic lives in the Cloud and limit the client-side code\n primarily to presentation. If you need to update the logic, you only\n update the Lambda function; you don't need to upgrade your client\n application.

\n

Consider the following examples:

\n
    \n
  • \n

    In a pizza ordering application, after the user provides all of\n the information for placing an order, you use a Lambda function to\n place an order with a pizzeria.

    \n
  • \n
  • \n

    In a gaming application, when a user says \"pick up a rock,\"\n this information must go back to the client application so that it can\n perform the operation and update the graphics. In this case, you want\n Amazon Lex to return the intent data to the client.

    \n
  • \n
" } }, "com.amazonaws.lexmodelbuildingservice#FulfillmentActivityType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ReturnIntent", - "name": "RETURN_INTENT" - }, - { - "value": "CodeHook", - "name": "CODE_HOOK" + "type": "enum", + "members": { + "RETURN_INTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReturnIntent" } - ] + }, + "CODE_HOOK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CodeHook" + } + } } }, "com.amazonaws.lexmodelbuildingservice#GetBot": { @@ -2697,6 +2781,59 @@ ], "traits": { "smithy.api#documentation": "

Returns metadata information for a specific bot. You must provide\n the bot name and the bot version or alias.

\n

This operation requires permissions for the\n lex:GetBot action.

", + "smithy.api#examples": [ + { + "title": "To get information about a bot", + "documentation": "This example shows how to get configuration information for a bot.", + "input": { + "name": "DocOrderPizza", + "versionOrAlias": "$LATEST" + }, + "output": { + "status": "NOT_BUILT", + "intents": [ + { + "intentVersion": "$LATEST", + "intentName": "DocOrderPizza" + } + ], + "name": "DocOrderPizzaBot", + "locale": "en-US", + "checksum": "20172ee3-fa06-49b2-bbc5-667c090303e9", + "abortStatement": { + "messages": [ + { + "content": "I don't understand. Can you try again?", + "contentType": "PlainText" + }, + { + "content": "I'm sorry, I don't understand.", + "contentType": "PlainText" + } + ] + }, + "version": "$LATEST", + "lastUpdatedDate": 1.494360160133E9, + "createdDate": 1.494360160133E9, + "clarificationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "I'm sorry, I didn't hear that. Can you repeate what you just said?", + "contentType": "PlainText" + }, + { + "content": "Can you say that again?", + "contentType": "PlainText" + } + ] + }, + "childDirected": true, + "idleSessionTTLInSeconds": 300, + "description": "Orders a pizza from a local pizzeria." + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/bots/{name}/versions/{versionOrAlias}", @@ -2754,6 +2891,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotAliasResponse": { @@ -2807,6 +2947,9 @@ "smithy.api#documentation": "

The settings that determine how Amazon Lex uses conversation logs for the\n alias.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotAliases": { @@ -2874,6 +3017,9 @@ "smithy.api#httpQuery": "nameContains" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotAliasesResponse": { @@ -2891,6 +3037,9 @@ "smithy.api#documentation": "

A pagination token for fetching next page of aliases. If the\n response to this call is truncated, Amazon Lex returns a pagination token in\n the response. To fetch the next page of aliases, specify the pagination\n token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotChannelAssociation": { @@ -2951,6 +3100,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotChannelAssociationResponse": { @@ -3010,6 +3162,9 @@ "smithy.api#documentation": "

If status is FAILED, Amazon Lex provides the\n reason that it failed to create the association.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotChannelAssociations": { @@ -3085,6 +3240,9 @@ "smithy.api#httpQuery": "nameContains" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotChannelAssociationsResponse": { @@ -3102,6 +3260,9 @@ "smithy.api#documentation": "

A pagination token that fetches the next page of associations. If\n the response to this call is truncated, Amazon Lex returns a pagination token\n in the response. To fetch the next page of associations, specify the\n pagination token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotRequest": { @@ -3123,6 +3284,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotResponse": { @@ -3236,6 +3400,9 @@ "smithy.api#documentation": "

Indicates whether user utterances should be sent to Amazon Comprehend\n for sentiment analysis.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotVersions": { @@ -3299,6 +3466,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotVersionsResponse": { @@ -3316,6 +3486,9 @@ "smithy.api#documentation": "

A pagination token for fetching the next page of bot versions. If\n the response to this call is truncated, Amazon Lex returns a pagination token\n in the response. To fetch the next page of versions, specify the\n pagination token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBots": { @@ -3342,6 +3515,28 @@ ], "traits": { "smithy.api#documentation": "

Returns bot information as follows:

\n
    \n
  • \n

    If you provide the nameContains field, the\n response includes information for the $LATEST version of\n all bots whose name contains the specified string.

    \n
  • \n
  • \n

    If you don't specify the nameContains field, the\n operation returns information about the $LATEST version\n of all of your bots.

    \n
  • \n
\n

This operation requires permission for the lex:GetBots\n action.

", + "smithy.api#examples": [ + { + "title": "To get a list of bots", + "documentation": "This example shows how to get a list of all of the bots in your account.", + "input": { + "nextToken": "", + "maxResults": 5 + }, + "output": { + "bots": [ + { + "status": "NOT_BUILT", + "name": "DocOrderPizzaBot", + "version": "$LATEST", + "lastUpdatedDate": 1.494360160133E9, + "createdDate": 1.494360160133E9, + "description": "Orders a pizza from a local pizzeria." + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/bots", @@ -3378,6 +3573,9 @@ "smithy.api#httpQuery": "nameContains" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBotsResponse": { @@ -3395,6 +3593,9 @@ "smithy.api#documentation": "

If the response is truncated, it includes a pagination token that\n you can specify in your next request to fetch the next page of bots.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBuiltinIntent": { @@ -3439,6 +3640,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBuiltinIntentResponse": { @@ -3462,6 +3666,9 @@ "smithy.api#documentation": "

An array of BuiltinIntentSlot objects, one entry for\n each slot type in the intent.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBuiltinIntents": { @@ -3528,6 +3735,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBuiltinIntentsResponse": { @@ -3545,6 +3755,9 @@ "smithy.api#documentation": "

A pagination token that fetches the next page of intents. If the\n response to this API call is truncated, Amazon Lex returns a pagination token\n in the response. To fetch the next page of intents, specify the pagination\n token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBuiltinSlotTypes": { @@ -3567,7 +3780,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets a list of built-in slot types that meet the specified\n criteria.

\n

For a list of built-in slot types, see Slot Type Reference in the Alexa Skills\n Kit.

\n\n

This operation requires permission for the\n lex:GetBuiltInSlotTypes action.

", + "smithy.api#documentation": "

Gets a list of built-in slot types that meet the specified\n criteria.

\n

For a list of built-in slot types, see Slot Type Reference in the Alexa Skills\n Kit.

\n

This operation requires permission for the\n lex:GetBuiltInSlotTypes action.

", "smithy.api#http": { "method": "GET", "uri": "/builtins/slottypes", @@ -3611,6 +3824,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetBuiltinSlotTypesResponse": { @@ -3628,6 +3844,9 @@ "smithy.api#documentation": "

If the response is truncated, the response includes a pagination\n token that you can use in your next request to fetch the next page of slot\n types.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetExport": { @@ -3696,6 +3915,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetExportResponse": { @@ -3743,6 +3965,9 @@ "smithy.api#documentation": "

An S3 pre-signed URL that provides the location of the exported\n resource. The exported resource is a ZIP archive that contains the\n exported resource in JSON format. The structure of the archive may change.\n Your code should not rely on the archive structure.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetImport": { @@ -3787,6 +4012,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetImportResponse": { @@ -3834,6 +4062,9 @@ "smithy.api#documentation": "

A timestamp for the date and time that the import job was\n created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetIntent": { @@ -3860,6 +4091,149 @@ ], "traits": { "smithy.api#documentation": "

Returns information about an intent. In addition to the intent\n name, you must specify the intent version.

\n

This operation requires permissions to perform the\n lex:GetIntent action.

", + "smithy.api#examples": [ + { + "title": "To get a information about an intent", + "documentation": "This example shows how to get information about an intent.", + "input": { + "name": "DocOrderPizza", + "version": "$LATEST" + }, + "output": { + "confirmationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "Should I order your {Crust} crust {Type} pizza with {Sauce} sauce?", + "contentType": "PlainText" + } + ] + }, + "name": "DocOrderPizza", + "checksum": "ca9bc13d-afc8-4706-bbaf-091f7a5935d6", + "conclusionStatement": { + "messages": [ + { + "content": "All right, I ordered you a {Crust} crust {Type} pizza with {Sauce} sauce.", + "contentType": "PlainText" + }, + { + "content": "OK, your {Crust} crust {Type} pizza with {Sauce} sauce is on the way.", + "contentType": "PlainText" + } + ], + "responseCard": "foo" + }, + "version": "$LATEST", + "rejectionStatement": { + "messages": [ + { + "content": "Ok, I'll cancel your order.", + "contentType": "PlainText" + }, + { + "content": "I cancelled your order.", + "contentType": "PlainText" + } + ] + }, + "createdDate": 1.494359783453E9, + "lastUpdatedDate": 1.494359783453E9, + "sampleUtterances": [ + "Order me a pizza.", + "Order me a {Type} pizza.", + "I want a {Crust} crust {Type} pizza", + "I want a {Crust} crust {Type} pizza with {Sauce} sauce." + ], + "slots": [ + { + "slotType": "DocPizzaType", + "name": "Type", + "slotConstraint": "Required", + "valueElicitationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "What type of pizza would you like?", + "contentType": "PlainText" + }, + { + "content": "Vegie or cheese pizza?", + "contentType": "PlainText" + }, + { + "content": "I can get you a vegie or a cheese pizza.", + "contentType": "PlainText" + } + ] + }, + "priority": 1, + "slotTypeVersion": "$LATEST", + "sampleUtterances": [ + "Get me a {Type} pizza.", + "A {Type} pizza please.", + "I'd like a {Type} pizza." + ], + "description": "The type of pizza to order." + }, + { + "slotType": "DocPizzaCrustType", + "name": "Crust", + "slotConstraint": "Required", + "valueElicitationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "What type of crust would you like?", + "contentType": "PlainText" + }, + { + "content": "Thick or thin crust?", + "contentType": "PlainText" + } + ] + }, + "priority": 2, + "slotTypeVersion": "$LATEST", + "sampleUtterances": [ + "Make it a {Crust} crust.", + "I'd like a {Crust} crust." + ], + "description": "The type of pizza crust to order." + }, + { + "slotType": "DocPizzaSauceType", + "name": "Sauce", + "slotConstraint": "Required", + "valueElicitationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "White or red sauce?", + "contentType": "PlainText" + }, + { + "content": "Garlic or tomato sauce?", + "contentType": "PlainText" + } + ] + }, + "priority": 3, + "slotTypeVersion": "$LATEST", + "sampleUtterances": [ + "Make it {Sauce} sauce.", + "I'd like {Sauce} sauce." + ], + "description": "The type of sauce to use on the pizza." + } + ], + "fulfillmentActivity": { + "type": "ReturnIntent" + }, + "description": "Order a pizza from a local pizzeria." + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/intents/{name}/versions/{version}", @@ -3886,6 +4260,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetIntentResponse": { @@ -3999,6 +4376,9 @@ "smithy.api#documentation": "

An array of OutputContext objects that lists the contexts\n that the intent activates when the intent is fulfilled.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetIntentVersions": { @@ -4062,6 +4442,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetIntentVersionsResponse": { @@ -4079,6 +4462,9 @@ "smithy.api#documentation": "

A pagination token for fetching the next page of intent versions.\n If the response to this call is truncated, Amazon Lex returns a pagination\n token in the response. To fetch the next page of versions, specify the\n pagination token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetIntents": { @@ -4105,6 +4491,27 @@ ], "traits": { "smithy.api#documentation": "

Returns intent information as follows:

\n
    \n
  • \n

    If you specify the nameContains field, returns the\n $LATEST version of all intents that contain the\n specified string.

    \n
  • \n
  • \n

    If you don't specify the nameContains field,\n returns information about the $LATEST version of all\n intents.

    \n
  • \n
\n

The operation requires permission for the\n lex:GetIntents action.

", + "smithy.api#examples": [ + { + "title": "To get a list of intents", + "documentation": "This example shows how to get a list of all of the intents in your account.", + "input": { + "nextToken": "", + "maxResults": 10 + }, + "output": { + "intents": [ + { + "version": "$LATEST", + "createdDate": 1.494359783453E9, + "name": "DocOrderPizza", + "lastUpdatedDate": 1.494359783453E9, + "description": "Order a pizza from a local pizzeria." + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/intents", @@ -4141,6 +4548,9 @@ "smithy.api#httpQuery": "nameContains" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetIntentsResponse": { @@ -4158,6 +4568,9 @@ "smithy.api#documentation": "

If the response is truncated, the response includes a pagination\n token that you can specify in your next request to fetch the next page of\n intents.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetMigration": { @@ -4202,6 +4615,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetMigrationResponse": { @@ -4267,6 +4683,9 @@ "smithy.api#documentation": "

A list of alerts and warnings that indicate issues with the migration\n for the Amazon Lex V1 bot to Amazon Lex V2. You receive a warning when an Amazon Lex V1\n feature has a different implementation if Amazon Lex V2.

\n

For more information, see Migrating a bot in the Amazon Lex V2\n developer guide.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetMigrations": { @@ -4347,6 +4766,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetMigrationsResponse": { @@ -4364,6 +4786,9 @@ "smithy.api#documentation": "

If the response is truncated, it includes a pagination token that you\n can specify in your next request to fetch the next page of\n migrations.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetSlotType": { @@ -4390,6 +4815,32 @@ ], "traits": { "smithy.api#documentation": "

Returns information about a specific version of a slot type. In\n addition to specifying the slot type name, you must specify the slot type\n version.

\n

This operation requires permissions for the\n lex:GetSlotType action.

", + "smithy.api#examples": [ + { + "title": "To get information about a slot type", + "documentation": "This example shows how to get information about a slot type.", + "input": { + "name": "DocPizzaCrustType", + "version": "$LATEST" + }, + "output": { + "enumerationValues": [ + { + "value": "thick" + }, + { + "value": "thin" + } + ], + "name": "DocPizzaCrustType", + "checksum": "210b3d5a-90a3-4b22-ac7e-f50c2c71095f", + "version": "$LATEST", + "lastUpdatedDate": 1.494359274403E9, + "createdDate": 1.494359274403E9, + "description": "Available crust types" + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/slottypes/{name}/versions/{version}", @@ -4416,6 +4867,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetSlotTypeResponse": { @@ -4481,6 +4935,9 @@ "smithy.api#documentation": "

Configuration information that extends the parent built-in slot\n type.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetSlotTypeVersions": { @@ -4544,6 +5001,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetSlotTypeVersionsResponse": { @@ -4561,6 +5021,9 @@ "smithy.api#documentation": "

A pagination token for fetching the next page of slot type\n versions. If the response to this call is truncated, Amazon Lex returns a\n pagination token in the response. To fetch the next page of versions,\n specify the pagination token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetSlotTypes": { @@ -4587,6 +5050,41 @@ ], "traits": { "smithy.api#documentation": "

Returns slot type information as follows:

\n
    \n
  • \n

    If you specify the nameContains field, returns the\n $LATEST version of all slot types that contain the\n specified string.

    \n
  • \n
  • \n

    If you don't specify the nameContains field,\n returns information about the $LATEST version of all slot\n types.

    \n
  • \n
\n

The operation requires permission for the\n lex:GetSlotTypes action.

", + "smithy.api#examples": [ + { + "title": "To get a list of slot types", + "documentation": "This example shows how to get a list of all of the slot types in your account.", + "input": { + "nextToken": "", + "maxResults": 10 + }, + "output": { + "slotTypes": [ + { + "version": "$LATEST", + "createdDate": 1.494359274403E9, + "name": "DocPizzaCrustType", + "lastUpdatedDate": 1.494359274403E9, + "description": "Available crust types" + }, + { + "version": "$LATEST", + "createdDate": 1.49435644223E9, + "name": "DocPizzaSauceType", + "lastUpdatedDate": 1.49435644223E9, + "description": "Available pizza sauces" + }, + { + "version": "$LATEST", + "createdDate": 1.494359198656E9, + "name": "DocPizzaType", + "lastUpdatedDate": 1.494359198656E9, + "description": "Available pizzas" + } + ] + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/slottypes", @@ -4623,6 +5121,9 @@ "smithy.api#httpQuery": "nameContains" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetSlotTypesResponse": { @@ -4640,6 +5141,9 @@ "smithy.api#documentation": "

If the response is truncated, it includes a pagination token that\n you can specify in your next request to fetch the next page of slot\n types.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GetUtterancesView": { @@ -4697,6 +5201,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#GetUtterancesViewResponse": { @@ -4714,6 +5221,9 @@ "smithy.api#documentation": "

An array of UtteranceList objects, each\n containing a list of UtteranceData objects describing\n the utterances that were processed by your bot. The response contains a\n maximum of 100 UtteranceData objects for each version. Amazon Lex\n returns the most frequent utterances received by the bot in the last 15\n days.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#GroupNumber": { @@ -4736,22 +5246,26 @@ } }, "com.amazonaws.lexmodelbuildingservice#ImportStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "COMPLETE", - "name": "COMPLETE" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETE" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#InputContext": { @@ -5023,6 +5537,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#ListTagsForResourceResponse": { @@ -5034,6 +5551,9 @@ "smithy.api#documentation": "

The tags associated with a resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#ListsOfUtterances": { @@ -5043,62 +5563,86 @@ } }, "com.amazonaws.lexmodelbuildingservice#Locale": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "de-DE", - "name": "DE_DE" - }, - { - "value": "en-AU", - "name": "EN_AU" - }, - { - "value": "en-GB", - "name": "EN_GB" - }, - { - "value": "en-IN", - "name": "EN_IN" - }, - { - "value": "en-US", - "name": "EN_US" - }, - { - "value": "es-419", - "name": "ES_419" - }, - { - "value": "es-ES", - "name": "ES_ES" - }, - { - "value": "es-US", - "name": "ES_US" - }, - { - "value": "fr-FR", - "name": "FR_FR" - }, - { - "value": "fr-CA", - "name": "FR_CA" - }, - { - "value": "it-IT", - "name": "IT_IT" - }, - { - "value": "ja-JP", - "name": "JA_JP" - }, - { - "value": "ko-KR", - "name": "KO_KR" + "type": "enum", + "members": { + "DE_DE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "de-DE" + } + }, + "EN_AU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-AU" + } + }, + "EN_GB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-GB" + } + }, + "EN_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-IN" + } + }, + "EN_US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "en-US" + } + }, + "ES_419": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es-419" + } + }, + "ES_ES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es-ES" + } + }, + "ES_US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es-US" + } + }, + "FR_FR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fr-FR" + } + }, + "FR_CA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fr-CA" + } + }, + "IT_IT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "it-IT" + } + }, + "JA_JP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ja-JP" } - ] + }, + "KO_KR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ko-KR" + } + } } }, "com.amazonaws.lexmodelbuildingservice#LocaleList": { @@ -5193,18 +5737,20 @@ } }, "com.amazonaws.lexmodelbuildingservice#LogType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AUDIO", - "name": "AUDIO" - }, - { - "value": "TEXT", - "name": "TEXT" + "type": "enum", + "members": { + "AUDIO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUDIO" + } + }, + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEXT" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#MaxResults": { @@ -5217,18 +5763,20 @@ } }, "com.amazonaws.lexmodelbuildingservice#MergeStrategy": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "OVERWRITE_LATEST", - "name": "OVERWRITE_LATEST" - }, - { - "value": "FAIL_ON_CONFLICT", - "name": "FAIL_ON_CONFLICT" + "type": "enum", + "members": { + "OVERWRITE_LATEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OVERWRITE_LATEST" + } + }, + "FAIL_ON_CONFLICT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAIL_ON_CONFLICT" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#Message": { @@ -5334,18 +5882,20 @@ } }, "com.amazonaws.lexmodelbuildingservice#MigrationAlertType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ERROR", - "name": "ERROR" - }, - { - "value": "WARN", - "name": "WARN" + "type": "enum", + "members": { + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ERROR" + } + }, + "WARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WARN" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#MigrationAlerts": { @@ -5365,52 +5915,60 @@ } }, "com.amazonaws.lexmodelbuildingservice#MigrationSortAttribute": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "V1_BOT_NAME", - "name": "V1_BOT_NAME" - }, - { - "value": "MIGRATION_DATE_TIME", - "name": "MIGRATION_DATE_TIME" + "type": "enum", + "members": { + "V1_BOT_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "V1_BOT_NAME" + } + }, + "MIGRATION_DATE_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MIGRATION_DATE_TIME" + } + } + } + }, + "com.amazonaws.lexmodelbuildingservice#MigrationStatus": { + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" } - ] - } - }, - "com.amazonaws.lexmodelbuildingservice#MigrationStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" - }, - { - "value": "FAILED", - "name": "FAILED" + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#MigrationStrategy": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATE_NEW", - "name": "CREATE_NEW" - }, - { - "value": "UPDATE_EXISTING", - "name": "UPDATE_EXISTING" + "type": "enum", + "members": { + "CREATE_NEW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_NEW" + } + }, + "UPDATE_EXISTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_EXISTING" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#MigrationSummary": { @@ -5518,18 +6076,20 @@ } }, "com.amazonaws.lexmodelbuildingservice#ObfuscationSetting": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "DEFAULT_OBFUSCATION", - "name": "DEFAULT_OBFUSCATION" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" } - ] + }, + "DEFAULT_OBFUSCATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEFAULT_OBFUSCATION" + } + } } }, "com.amazonaws.lexmodelbuildingservice#OutputContext": { @@ -5606,18 +6166,20 @@ } }, "com.amazonaws.lexmodelbuildingservice#ProcessBehavior": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SAVE", - "name": "SAVE" - }, - { - "value": "BUILD", - "name": "BUILD" + "type": "enum", + "members": { + "SAVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SAVE" + } + }, + "BUILD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILD" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#Prompt": { @@ -5683,7 +6245,95 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an Amazon Lex conversational bot or replaces an existing bot.\n When you create or update a bot you are only required to specify a name, a\n locale, and whether the bot is directed toward children under age 13. You\n can use this to add intents later, or to remove intents from an existing\n bot. When you create a bot with the minimum information, the bot is\n created or updated but Amazon Lex returns the response\n FAILED. You can build the bot after you add one or more\n intents. For more information about Amazon Lex bots, see how-it-works.

\n

If you specify the name of an existing bot, the fields in the\n request replace the existing values in the $LATEST version of\n the bot. Amazon Lex removes any fields that you don't provide values for in the\n request, except for the idleTTLInSeconds and\n privacySettings fields, which are set to their default\n values. If you don't specify values for required fields, Amazon Lex throws an\n exception.

\n\n

This operation requires permissions for the lex:PutBot\n action. For more information, see security-iam.

", + "smithy.api#documentation": "

Creates an Amazon Lex conversational bot or replaces an existing bot.\n When you create or update a bot you are only required to specify a name, a\n locale, and whether the bot is directed toward children under age 13. You\n can use this to add intents later, or to remove intents from an existing\n bot. When you create a bot with the minimum information, the bot is\n created or updated but Amazon Lex returns the response\n FAILED. You can build the bot after you add one or more\n intents. For more information about Amazon Lex bots, see how-it-works.

\n

If you specify the name of an existing bot, the fields in the\n request replace the existing values in the $LATEST version of\n the bot. Amazon Lex removes any fields that you don't provide values for in the\n request, except for the idleTTLInSeconds and\n privacySettings fields, which are set to their default\n values. If you don't specify values for required fields, Amazon Lex throws an\n exception.

\n

This operation requires permissions for the lex:PutBot\n action. For more information, see security-iam.

", + "smithy.api#examples": [ + { + "title": "To create a bot", + "documentation": "This example shows how to create a bot for ordering pizzas.", + "input": { + "name": "DocOrderPizzaBot", + "description": "Orders a pizza from a local pizzeria.", + "intents": [ + { + "intentName": "DocOrderPizza", + "intentVersion": "$LATEST" + } + ], + "clarificationPrompt": { + "messages": [ + { + "contentType": "PlainText", + "content": "I'm sorry, I didn't hear that. Can you repeat what you just said?" + }, + { + "contentType": "PlainText", + "content": "Can you say that again?" + } + ], + "maxAttempts": 1 + }, + "abortStatement": { + "messages": [ + { + "contentType": "PlainText", + "content": "I don't understand. Can you try again?" + }, + { + "contentType": "PlainText", + "content": "I'm sorry, I don't understand." + } + ] + }, + "idleSessionTTLInSeconds": 300, + "processBehavior": "SAVE", + "locale": "en-US", + "childDirected": true + }, + "output": { + "status": "NOT_BUILT", + "intents": [ + { + "intentVersion": "$LATEST", + "intentName": "DocOrderPizza" + } + ], + "name": "DocOrderPizzaBot", + "locale": "en-US", + "checksum": "20172ee3-fa06-49b2-bbc5-667c090303e9", + "abortStatement": { + "messages": [ + { + "content": "I don't understand. Can you try again?", + "contentType": "PlainText" + }, + { + "content": "I'm sorry, I don't understand.", + "contentType": "PlainText" + } + ] + }, + "version": "$LATEST", + "lastUpdatedDate": 1.494360160133E9, + "createdDate": 1.494360160133E9, + "clarificationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "I'm sorry, I didn't hear that. Can you repeate what you just said?", + "contentType": "PlainText" + }, + { + "content": "Can you say that again?", + "contentType": "PlainText" + } + ] + }, + "childDirected": true, + "idleSessionTTLInSeconds": 300, + "description": "Orders a pizza from a local pizzeria." + } + } + ], "smithy.api#http": { "method": "PUT", "uri": "/bots/{name}/versions/$LATEST", @@ -5775,6 +6425,9 @@ "smithy.api#documentation": "

A list of tags to add to the bot alias. You can only add tags when you\n create an alias, you can't use the PutBotAlias operation to\n update the tags on a bot alias. To update tags, use the\n TagResource operation.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#PutBotAliasResponse": { @@ -5834,6 +6487,9 @@ "smithy.api#documentation": "

A list of tags associated with a bot.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#PutBotRequest": { @@ -5910,7 +6566,7 @@ "locale": { "target": "com.amazonaws.lexmodelbuildingservice#Locale", "traits": { - "smithy.api#documentation": "

Specifies the target locale for the bot. Any intent used in the\n bot must be compatible with the locale of the bot.

\n\n

The default is en-US.

", + "smithy.api#documentation": "

Specifies the target locale for the bot. Any intent used in the\n bot must be compatible with the locale of the bot.

\n

The default is en-US.

", "smithy.api#required": {} } }, @@ -5939,6 +6595,9 @@ "smithy.api#documentation": "

A list of tags to add to the bot. You can only add tags when you\n create a bot, you can't use the PutBot operation to update\n the tags on a bot. To update tags, use the TagResource\n operation.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#PutBotResponse": { @@ -6064,6 +6723,9 @@ "smithy.api#documentation": "

A list of tags associated with the bot.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#PutIntent": { @@ -6092,7 +6754,275 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an intent or replaces an existing intent.

\n

To define the interaction between the user and your bot, you use\n one or more intents. For a pizza ordering bot, for example, you would\n create an OrderPizza intent.

\n

To create an intent or replace an existing intent, you must provide\n the following:

\n
    \n
  • \n

    Intent name. For example, OrderPizza.

    \n
  • \n
  • \n

    Sample utterances. For example, \"Can I order a pizza, please.\"\n and \"I want to order a pizza.\"

    \n
  • \n
  • \n

    Information to be gathered. You specify slot types for the\n information that your bot will request from the user. You can specify\n standard slot types, such as a date or a time, or custom slot types\n such as the size and crust of a pizza.

    \n
  • \n
  • \n

    How the intent will be fulfilled. You can provide a Lambda\n function or configure the intent to return the intent information to\n the client application. If you use a Lambda function, when all of the\n intent information is available, Amazon Lex invokes your Lambda function.\n If you configure your intent to return the intent information to the\n client application.

    \n
  • \n
\n

You can specify other optional information in the request, such\n as:

\n\n
    \n
  • \n

    A confirmation prompt to ask the user to confirm an intent. For\n example, \"Shall I order your pizza?\"

    \n
  • \n
  • \n

    A conclusion statement to send to the user after the intent has\n been fulfilled. For example, \"I placed your pizza order.\"

    \n
  • \n
  • \n

    A follow-up prompt that asks the user for additional activity.\n For example, asking \"Do you want to order a drink with your\n pizza?\"

    \n
  • \n
\n

If you specify an existing intent name to update the intent, Amazon Lex\n replaces the values in the $LATEST version of the intent with\n the values in the request. Amazon Lex removes fields that you don't provide in\n the request. If you don't specify the required fields, Amazon Lex throws an\n exception. When you update the $LATEST version of an intent,\n the status field of any bot that uses the\n $LATEST version of the intent is set to\n NOT_BUILT.

\n

For more information, see how-it-works.

\n

This operation requires permissions for the\n lex:PutIntent action.

", + "smithy.api#documentation": "

Creates an intent or replaces an existing intent.

\n

To define the interaction between the user and your bot, you use\n one or more intents. For a pizza ordering bot, for example, you would\n create an OrderPizza intent.

\n

To create an intent or replace an existing intent, you must provide\n the following:

\n
    \n
  • \n

    Intent name. For example, OrderPizza.

    \n
  • \n
  • \n

    Sample utterances. For example, \"Can I order a pizza, please.\"\n and \"I want to order a pizza.\"

    \n
  • \n
  • \n

    Information to be gathered. You specify slot types for the\n information that your bot will request from the user. You can specify\n standard slot types, such as a date or a time, or custom slot types\n such as the size and crust of a pizza.

    \n
  • \n
  • \n

    How the intent will be fulfilled. You can provide a Lambda\n function or configure the intent to return the intent information to\n the client application. If you use a Lambda function, when all of the\n intent information is available, Amazon Lex invokes your Lambda function.\n If you configure your intent to return the intent information to the\n client application.

    \n
  • \n
\n

You can specify other optional information in the request, such\n as:

\n
    \n
  • \n

    A confirmation prompt to ask the user to confirm an intent. For\n example, \"Shall I order your pizza?\"

    \n
  • \n
  • \n

    A conclusion statement to send to the user after the intent has\n been fulfilled. For example, \"I placed your pizza order.\"

    \n
  • \n
  • \n

    A follow-up prompt that asks the user for additional activity.\n For example, asking \"Do you want to order a drink with your\n pizza?\"

    \n
  • \n
\n

If you specify an existing intent name to update the intent, Amazon Lex\n replaces the values in the $LATEST version of the intent with\n the values in the request. Amazon Lex removes fields that you don't provide in\n the request. If you don't specify the required fields, Amazon Lex throws an\n exception. When you update the $LATEST version of an intent,\n the status field of any bot that uses the\n $LATEST version of the intent is set to\n NOT_BUILT.

\n

For more information, see how-it-works.

\n

This operation requires permissions for the\n lex:PutIntent action.

", + "smithy.api#examples": [ + { + "title": "To create an intent", + "documentation": "This example shows how to create an intent for ordering pizzas.", + "input": { + "name": "DocOrderPizza", + "description": "Order a pizza from a local pizzeria.", + "slots": [ + { + "name": "Type", + "description": "The type of pizza to order.", + "slotConstraint": "Required", + "slotType": "DocPizzaType", + "slotTypeVersion": "$LATEST", + "valueElicitationPrompt": { + "messages": [ + { + "contentType": "PlainText", + "content": "What type of pizza would you like?" + }, + { + "contentType": "PlainText", + "content": "Vegie or cheese pizza?" + }, + { + "contentType": "PlainText", + "content": "I can get you a vegie or a cheese pizza." + } + ], + "maxAttempts": 1 + }, + "priority": 1, + "sampleUtterances": [ + "Get me a {Type} pizza.", + "A {Type} pizza please.", + "I'd like a {Type} pizza." + ] + }, + { + "name": "Crust", + "description": "The type of pizza crust to order.", + "slotConstraint": "Required", + "slotType": "DocPizzaCrustType", + "slotTypeVersion": "$LATEST", + "valueElicitationPrompt": { + "messages": [ + { + "contentType": "PlainText", + "content": "What type of crust would you like?" + }, + { + "contentType": "PlainText", + "content": "Thick or thin crust?" + } + ], + "maxAttempts": 1 + }, + "priority": 2, + "sampleUtterances": [ + "Make it a {Crust} crust.", + "I'd like a {Crust} crust." + ] + }, + { + "name": "Sauce", + "description": "The type of sauce to use on the pizza.", + "slotConstraint": "Required", + "slotType": "DocPizzaSauceType", + "slotTypeVersion": "$LATEST", + "valueElicitationPrompt": { + "messages": [ + { + "contentType": "PlainText", + "content": "White or red sauce?" + }, + { + "contentType": "PlainText", + "content": "Garlic or tomato sauce?" + } + ], + "maxAttempts": 1 + }, + "priority": 3, + "sampleUtterances": [ + "Make it {Sauce} sauce.", + "I'd like {Sauce} sauce." + ] + } + ], + "sampleUtterances": [ + "Order me a pizza.", + "Order me a {Type} pizza.", + "I want a {Crust} crust {Type} pizza", + "I want a {Crust} crust {Type} pizza with {Sauce} sauce." + ], + "confirmationPrompt": { + "messages": [ + { + "contentType": "PlainText", + "content": "Should I order your {Crust} crust {Type} pizza with {Sauce} sauce?" + } + ], + "maxAttempts": 1 + }, + "rejectionStatement": { + "messages": [ + { + "contentType": "PlainText", + "content": "Ok, I'll cancel your order." + }, + { + "contentType": "PlainText", + "content": "I cancelled your order." + } + ] + }, + "conclusionStatement": { + "messages": [ + { + "contentType": "PlainText", + "content": "All right, I ordered you a {Crust} crust {Type} pizza with {Sauce} sauce." + }, + { + "contentType": "PlainText", + "content": "OK, your {Crust} crust {Type} pizza with {Sauce} sauce is on the way." + } + ], + "responseCard": "foo" + }, + "fulfillmentActivity": { + "type": "ReturnIntent" + } + }, + "output": { + "confirmationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "Should I order your {Crust} crust {Type} pizza with {Sauce} sauce?", + "contentType": "PlainText" + } + ] + }, + "name": "DocOrderPizza", + "checksum": "ca9bc13d-afc8-4706-bbaf-091f7a5935d6", + "conclusionStatement": { + "messages": [ + { + "content": "All right, I ordered you a {Crust} crust {Type} pizza with {Sauce} sauce.", + "contentType": "PlainText" + }, + { + "content": "OK, your {Crust} crust {Type} pizza with {Sauce} sauce is on the way.", + "contentType": "PlainText" + } + ], + "responseCard": "foo" + }, + "version": "$LATEST", + "rejectionStatement": { + "messages": [ + { + "content": "Ok, I'll cancel your order.", + "contentType": "PlainText" + }, + { + "content": "I cancelled your order.", + "contentType": "PlainText" + } + ] + }, + "createdDate": 1.494359783453E9, + "lastUpdatedDate": 1.494359783453E9, + "sampleUtterances": [ + "Order me a pizza.", + "Order me a {Type} pizza.", + "I want a {Crust} crust {Type} pizza", + "I want a {Crust} crust {Type} pizza with {Sauce} sauce." + ], + "slots": [ + { + "slotType": "DocPizzaSauceType", + "name": "Sauce", + "slotConstraint": "Required", + "valueElicitationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "White or red sauce?", + "contentType": "PlainText" + }, + { + "content": "Garlic or tomato sauce?", + "contentType": "PlainText" + } + ] + }, + "priority": 3, + "slotTypeVersion": "$LATEST", + "sampleUtterances": [ + "Make it {Sauce} sauce.", + "I'd like {Sauce} sauce." + ], + "description": "The type of sauce to use on the pizza." + }, + { + "slotType": "DocPizzaType", + "name": "Type", + "slotConstraint": "Required", + "valueElicitationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "What type of pizza would you like?", + "contentType": "PlainText" + }, + { + "content": "Vegie or cheese pizza?", + "contentType": "PlainText" + }, + { + "content": "I can get you a vegie or a cheese pizza.", + "contentType": "PlainText" + } + ] + }, + "priority": 1, + "slotTypeVersion": "$LATEST", + "sampleUtterances": [ + "Get me a {Type} pizza.", + "A {Type} pizza please.", + "I'd like a {Type} pizza." + ], + "description": "The type of pizza to order." + }, + { + "slotType": "DocPizzaCrustType", + "name": "Crust", + "slotConstraint": "Required", + "valueElicitationPrompt": { + "maxAttempts": 1, + "messages": [ + { + "content": "What type of crust would you like?", + "contentType": "PlainText" + }, + { + "content": "Thick or thin crust?", + "contentType": "PlainText" + } + ] + }, + "priority": 2, + "slotTypeVersion": "$LATEST", + "sampleUtterances": [ + "Make it a {Crust} crust.", + "I'd like a {Crust} crust." + ], + "description": "The type of pizza crust to order." + } + ], + "fulfillmentActivity": { + "type": "ReturnIntent" + }, + "description": "Order a pizza from a local pizzeria." + } + } + ], "smithy.api#http": { "method": "PUT", "uri": "/intents/{name}/versions/$LATEST", @@ -6126,7 +7056,7 @@ "sampleUtterances": { "target": "com.amazonaws.lexmodelbuildingservice#IntentUtteranceList", "traits": { - "smithy.api#documentation": "

An array of utterances (strings) that a user might say to signal\n the intent. For example, \"I want {PizzaSize} pizza\", \"Order {Quantity}\n {PizzaSize} pizzas\".

\n\n

In each utterance, a slot name is enclosed in curly braces.\n

" + "smithy.api#documentation": "

An array of utterances (strings) that a user might say to signal\n the intent. For example, \"I want {PizzaSize} pizza\", \"Order {Quantity}\n {PizzaSize} pizzas\".

\n

In each utterance, a slot name is enclosed in curly braces.\n

" } }, "confirmationPrompt": { @@ -6144,7 +7074,7 @@ "followUpPrompt": { "target": "com.amazonaws.lexmodelbuildingservice#FollowUpPrompt", "traits": { - "smithy.api#documentation": "

Amazon Lex uses this prompt to solicit additional activity after\n fulfilling an intent. For example, after the OrderPizza\n intent is fulfilled, you might prompt the user to order a drink.

\n

The action that Amazon Lex takes depends on the user's response, as\n follows:

\n
    \n
  • \n

    If the user says \"Yes\" it responds with the clarification\n prompt that is configured for the bot.

    \n
  • \n
  • \n

    if the user says \"Yes\" and continues with an utterance that\n triggers an intent it starts a conversation for the intent.

    \n
  • \n
  • \n

    If the user says \"No\" it responds with the rejection statement\n configured for the the follow-up prompt.

    \n
  • \n
  • \n

    If it doesn't recognize the utterance it repeats the follow-up\n prompt again.

    \n
  • \n
\n\n

The followUpPrompt field and the\n conclusionStatement field are mutually exclusive. You can\n specify only one.

" + "smithy.api#documentation": "

Amazon Lex uses this prompt to solicit additional activity after\n fulfilling an intent. For example, after the OrderPizza\n intent is fulfilled, you might prompt the user to order a drink.

\n

The action that Amazon Lex takes depends on the user's response, as\n follows:

\n
    \n
  • \n

    If the user says \"Yes\" it responds with the clarification\n prompt that is configured for the bot.

    \n
  • \n
  • \n

    if the user says \"Yes\" and continues with an utterance that\n triggers an intent it starts a conversation for the intent.

    \n
  • \n
  • \n

    If the user says \"No\" it responds with the rejection statement\n configured for the the follow-up prompt.

    \n
  • \n
  • \n

    If it doesn't recognize the utterance it repeats the follow-up\n prompt again.

    \n
  • \n
\n

The followUpPrompt field and the\n conclusionStatement field are mutually exclusive. You can\n specify only one.

" } }, "conclusionStatement": { @@ -6201,6 +7131,9 @@ "smithy.api#documentation": "

An array of OutputContext objects that lists the contexts\n that the intent activates when the intent is fulfilled.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#PutIntentResponse": { @@ -6320,6 +7253,9 @@ "smithy.api#documentation": "

An array of OutputContext objects that lists the contexts\n that the intent activates when the intent is fulfilled.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#PutSlotType": { @@ -6348,7 +7284,41 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a custom slot type or replaces an existing custom slot\n type.

\n

To create a custom slot type, specify a name for the slot type and\n a set of enumeration values, which are the values that a slot of this type\n can assume. For more information, see how-it-works.

\n

If you specify the name of an existing slot type, the fields in the\n request replace the existing values in the $LATEST version of\n the slot type. Amazon Lex removes the fields that you don't provide in the\n request. If you don't specify required fields, Amazon Lex throws an exception.\n When you update the $LATEST version of a slot type, if a bot\n uses the $LATEST version of an intent that contains the slot\n type, the bot's status field is set to\n NOT_BUILT.

\n\n

This operation requires permissions for the\n lex:PutSlotType action.

", + "smithy.api#documentation": "

Creates a custom slot type or replaces an existing custom slot\n type.

\n

To create a custom slot type, specify a name for the slot type and\n a set of enumeration values, which are the values that a slot of this type\n can assume. For more information, see how-it-works.

\n

If you specify the name of an existing slot type, the fields in the\n request replace the existing values in the $LATEST version of\n the slot type. Amazon Lex removes the fields that you don't provide in the\n request. If you don't specify required fields, Amazon Lex throws an exception.\n When you update the $LATEST version of a slot type, if a bot\n uses the $LATEST version of an intent that contains the slot\n type, the bot's status field is set to\n NOT_BUILT.

\n

This operation requires permissions for the\n lex:PutSlotType action.

", + "smithy.api#examples": [ + { + "title": "To Create a Slot Type", + "documentation": "This example shows how to create a slot type that describes pizza sauces.", + "input": { + "name": "PizzaSauceType", + "description": "Available pizza sauces", + "enumerationValues": [ + { + "value": "red" + }, + { + "value": "white" + } + ] + }, + "output": { + "enumerationValues": [ + { + "value": "red" + }, + { + "value": "white" + } + ], + "name": "DocPizzaSauceType", + "checksum": "cfd00ed1-775d-4357-947c-aca7e73b44ba", + "version": "$LATEST", + "lastUpdatedDate": 1.49435644223E9, + "createdDate": 1.49435644223E9, + "description": "Available pizza sauces" + } + } + ], "smithy.api#http": { "method": "PUT", "uri": "/slottypes/{name}/versions/$LATEST", @@ -6409,6 +7379,9 @@ "smithy.api#documentation": "

Configuration information that extends the parent built-in slot type.\n The configuration is added to the settings for the parent slot\n type.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#PutSlotTypeResponse": { @@ -6480,6 +7453,9 @@ "smithy.api#documentation": "

Configuration information that extends the parent built-in slot\n type.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#QueryFilterString": { @@ -6491,26 +7467,32 @@ } }, "com.amazonaws.lexmodelbuildingservice#ReferenceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Intent", - "name": "INTENT" - }, - { - "value": "Bot", - "name": "BOT" - }, - { - "value": "BotAlias", - "name": "BOTALIAS" - }, - { - "value": "BotChannel", - "name": "BOTCHANNEL" + "type": "enum", + "members": { + "INTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Intent" } - ] + }, + "BOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Bot" + } + }, + "BOTALIAS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BotAlias" + } + }, + "BOTCHANNEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BotChannel" + } + } } }, "com.amazonaws.lexmodelbuildingservice#RegexPattern": { @@ -6578,22 +7560,26 @@ } }, "com.amazonaws.lexmodelbuildingservice#ResourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BOT", - "name": "BOT" - }, - { - "value": "INTENT", - "name": "INTENT" - }, - { - "value": "SLOT_TYPE", - "name": "SLOT_TYPE" + "type": "enum", + "members": { + "BOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOT" + } + }, + "INTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTENT" + } + }, + "SLOT_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SLOT_TYPE" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#ResponseCard": { @@ -6691,18 +7677,20 @@ } }, "com.amazonaws.lexmodelbuildingservice#SlotConstraint": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Required", - "name": "REQUIRED" - }, - { - "value": "Optional", - "name": "OPTIONAL" + "type": "enum", + "members": { + "REQUIRED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Required" + } + }, + "OPTIONAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Optional" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#SlotDefaultValue": { @@ -6886,33 +7874,37 @@ } }, "com.amazonaws.lexmodelbuildingservice#SlotValueSelectionStrategy": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ORIGINAL_VALUE", - "name": "ORIGINAL_VALUE" - }, - { - "value": "TOP_RESOLUTION", - "name": "TOP_RESOLUTION" + "type": "enum", + "members": { + "ORIGINAL_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ORIGINAL_VALUE" } - ] + }, + "TOP_RESOLUTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TOP_RESOLUTION" + } + } } }, "com.amazonaws.lexmodelbuildingservice#SortOrder": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ASCENDING", - "name": "ASCENDING" - }, - { - "value": "DESCENDING", - "name": "DESCENDING" + "type": "enum", + "members": { + "ASCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASCENDING" + } + }, + "DESCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESCENDING" } - ] + } } }, "com.amazonaws.lexmodelbuildingservice#StartImport": { @@ -6973,6 +7965,9 @@ "smithy.api#documentation": "

A list of tags to add to the imported bot. You can only add tags when\n you import a bot, you can't add tags to an intent or slot type.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#StartImportResponse": { @@ -7020,6 +8015,9 @@ "smithy.api#documentation": "

A timestamp for the date and time that the import job was\n requested.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#StartMigration": { @@ -7094,6 +8092,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#StartMigrationResponse": { @@ -7147,6 +8148,9 @@ "smithy.api#documentation": "

The date and time that the migration started.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexmodelbuildingservice#Statement": { @@ -7171,45 +8175,55 @@ } }, "com.amazonaws.lexmodelbuildingservice#Status": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BUILDING", - "name": "BUILDING" - }, - { - "value": "READY", - "name": "READY" - }, - { - "value": "READY_BASIC_TESTING", - "name": "READY_BASIC_TESTING" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "NOT_BUILT", - "name": "NOT_BUILT" + "type": "enum", + "members": { + "BUILDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUILDING" } - ] + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY" + } + }, + "READY_BASIC_TESTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY_BASIC_TESTING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "NOT_BUILT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_BUILT" + } + } } }, "com.amazonaws.lexmodelbuildingservice#StatusType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Detected", - "name": "DETECTED" - }, - { - "value": "Missed", - "name": "MISSED" + "type": "enum", + "members": { + "DETECTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Detected" } - ] + }, + "MISSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Missed" + } + } } }, "com.amazonaws.lexmodelbuildingservice#String": { @@ -7334,11 +8348,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lexmodelbuildingservice#TagValue": { "type": "string", @@ -7405,11 +8425,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexmodelbuildingservice#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lexmodelbuildingservice#UserId": { "type": "string", diff --git a/codegen/sdk-codegen/aws-models/lex-models-v2.json b/codegen/sdk-codegen/aws-models/lex-models-v2.json index 74e0ce765d0..9cdde682d53 100644 --- a/codegen/sdk-codegen/aws-models/lex-models-v2.json +++ b/codegen/sdk-codegen/aws-models/lex-models-v2.json @@ -12408,6 +12408,7 @@ "arnNamespace": "lex", "cloudFormationName": "LexModelsV2", "cloudTrailEventSource": "lexmodelsv2.amazonaws.com", + "docId": "models.lex.v2-2020-08-07", "endpointPrefix": "models-v2-lex" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/lex-runtime-service.json b/codegen/sdk-codegen/aws-models/lex-runtime-service.json index 635a195ff03..f292ef82197 100644 --- a/codegen/sdk-codegen/aws-models/lex-runtime-service.json +++ b/codegen/sdk-codegen/aws-models/lex-runtime-service.json @@ -55,6 +55,7 @@ "arnNamespace": "lex", "cloudFormationName": "LexRuntimeService", "cloudTrailEventSource": "lexruntimeservice.amazonaws.com", + "docId": "runtime.lex-2016-11-28", "endpointPrefix": "runtime.lex" }, "aws.auth#sigv4": { @@ -123,52 +124,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -176,13 +181,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -192,251 +206,86 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://runtime.lex-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://runtime-fips.lex.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://runtime-fips.lex.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://runtime.lex-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://runtime.lex-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://runtime.lex.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { @@ -458,7 +307,7 @@ } ], "endpoint": { - "url": "https://runtime.lex.{Region}.amazonaws.com", + "url": "https://runtime-fips.lex.{Region}.amazonaws.com", "properties": {}, "headers": {} }, @@ -483,7 +332,7 @@ } ], "endpoint": { - "url": "https://runtime.lex.{Region}.amazonaws.com", + "url": "https://runtime-fips.lex.{Region}.amazonaws.com", "properties": {}, "headers": {} }, @@ -492,24 +341,140 @@ { "conditions": [], "endpoint": { - "url": "https://runtime.lex.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://runtime.lex-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" } ] + }, + { + "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://runtime.lex.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://runtime.lex.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://runtime.lex.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://runtime.lex.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -524,8 +489,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -537,8 +502,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -550,8 +515,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -563,8 +528,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -576,8 +541,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -589,8 +554,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -602,8 +567,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -615,8 +580,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -628,8 +593,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -641,8 +606,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -654,8 +619,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -667,8 +632,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -680,8 +645,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -693,8 +658,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -706,8 +671,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -719,8 +684,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -732,8 +697,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -745,8 +710,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -758,8 +723,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -771,8 +736,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -784,8 +749,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -797,8 +762,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -810,8 +786,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -823,8 +810,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -836,8 +834,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -849,8 +858,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -862,8 +871,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -875,8 +884,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -887,8 +896,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -899,10 +908,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1062,7 +1077,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[0-9]+|\\$LATEST" + "smithy.api#pattern": "^[0-9]+|\\$LATEST$" } }, "com.amazonaws.lexruntimeservice#Button": { @@ -1106,22 +1121,26 @@ } }, "com.amazonaws.lexruntimeservice#ConfirmationStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "None", - "name": "NONE" - }, - { - "value": "Confirmed", - "name": "CONFIRMED" - }, - { - "value": "Denied", - "name": "DENIED" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "None" + } + }, + "CONFIRMED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Confirmed" + } + }, + "DENIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Denied" } - ] + } } }, "com.amazonaws.lexruntimeservice#ConflictException": { @@ -1138,14 +1157,14 @@ } }, "com.amazonaws.lexruntimeservice#ContentType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "application/vnd.amazonaws.card.generic", - "name": "GENERIC" + "type": "enum", + "members": { + "GENERIC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "application/vnd.amazonaws.card.generic" } - ] + } } }, "com.amazonaws.lexruntimeservice#DeleteSession": { @@ -1209,6 +1228,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimeservice#DeleteSessionResponse": { @@ -1238,6 +1260,9 @@ "smithy.api#documentation": "

The unique identifier for the session.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimeservice#DependencyFailedException": { @@ -1305,61 +1330,79 @@ } }, "com.amazonaws.lexruntimeservice#DialogActionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ElicitIntent", - "name": "ELICIT_INTENT" - }, - { - "value": "ConfirmIntent", - "name": "CONFIRM_INTENT" - }, - { - "value": "ElicitSlot", - "name": "ELICIT_SLOT" - }, - { - "value": "Close", - "name": "CLOSE" - }, - { - "value": "Delegate", - "name": "DELEGATE" + "type": "enum", + "members": { + "ELICIT_INTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ElicitIntent" + } + }, + "CONFIRM_INTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ConfirmIntent" + } + }, + "ELICIT_SLOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ElicitSlot" } - ] + }, + "CLOSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Close" + } + }, + "DELEGATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Delegate" + } + } } }, "com.amazonaws.lexruntimeservice#DialogState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ElicitIntent", - "name": "ELICIT_INTENT" - }, - { - "value": "ConfirmIntent", - "name": "CONFIRM_INTENT" - }, - { - "value": "ElicitSlot", - "name": "ELICIT_SLOT" - }, - { - "value": "Fulfilled", - "name": "FULFILLED" - }, - { - "value": "ReadyForFulfillment", - "name": "READY_FOR_FULFILLMENT" - }, - { - "value": "Failed", - "name": "FAILED" + "type": "enum", + "members": { + "ELICIT_INTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ElicitIntent" + } + }, + "CONFIRM_INTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ConfirmIntent" + } + }, + "ELICIT_SLOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ElicitSlot" + } + }, + "FULFILLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Fulfilled" + } + }, + "READY_FOR_FULFILLMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReadyForFulfillment" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" } - ] + } } }, "com.amazonaws.lexruntimeservice#Double": { @@ -1372,22 +1415,26 @@ "type": "string" }, "com.amazonaws.lexruntimeservice#FulfillmentState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Fulfilled", - "name": "FULFILLED" - }, - { - "value": "Failed", - "name": "FAILED" - }, - { - "value": "ReadyForFulfillment", - "name": "READY_FOR_FULFILLMENT" + "type": "enum", + "members": { + "FULFILLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Fulfilled" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "READY_FOR_FULFILLMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReadyForFulfillment" } - ] + } } }, "com.amazonaws.lexruntimeservice#GenericAttachment": { @@ -1493,6 +1540,9 @@ "smithy.api#httpQuery": "checkpointLabelFilter" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimeservice#GetSessionResponse": { @@ -1528,6 +1578,9 @@ "smithy.api#documentation": "

A list of active contexts for the session. A context can be set when\n an intent is fulfilled or by calling the PostContent,\n PostText, or PutSession operation.

\n

You can use a context to control the intents that can follow up an\n intent, or to modify the operation of your application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimeservice#HttpContentType": { @@ -1621,7 +1674,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[a-zA-Z0-9-]+" + "smithy.api#pattern": "^[a-zA-Z0-9-]+$" } }, "com.amazonaws.lexruntimeservice#IntentSummaryList": { @@ -1682,26 +1735,32 @@ } }, "com.amazonaws.lexruntimeservice#MessageFormatType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PlainText", - "name": "PLAIN_TEXT" - }, - { - "value": "CustomPayload", - "name": "CUSTOM_PAYLOAD" - }, - { - "value": "SSML", - "name": "SSML" - }, - { - "value": "Composite", - "name": "COMPOSITE" + "type": "enum", + "members": { + "PLAIN_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PlainText" + } + }, + "CUSTOM_PAYLOAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CustomPayload" } - ] + }, + "SSML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SSML" + } + }, + "COMPOSITE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Composite" + } + } } }, "com.amazonaws.lexruntimeservice#NotAcceptableException": { @@ -1866,6 +1925,9 @@ "smithy.api#httpHeader": "x-amz-lex-active-contexts" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimeservice#PostContentResponse": { @@ -2004,6 +2066,9 @@ "smithy.api#httpHeader": "x-amz-lex-active-contexts" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimeservice#PostText": { @@ -2101,6 +2166,9 @@ "smithy.api#documentation": "

A list of contexts active for the request. A context can be activated\n when a previous intent is fulfilled, or by including the context in the\n request,

\n

If you don't specify a list of contexts, Amazon Lex will use the current\n list of contexts for the session. If you specify an empty list, all\n contexts for the session are cleared.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimeservice#PostTextResponse": { @@ -2190,6 +2258,9 @@ "smithy.api#documentation": "

A list of active contexts for the session. A context can be set when\n an intent is fulfilled or by calling the PostContent,\n PostText, or PutSession operation.

\n

You can use a context to control the intents that can follow up an\n intent, or to modify the operation of your application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimeservice#PredictedIntent": { @@ -2319,6 +2390,9 @@ "smithy.api#documentation": "

A list of contexts active for the request. A context can be activated\n when a previous intent is fulfilled, or by including the context in the\n request,

\n

If you don't specify a list of contexts, Amazon Lex will use the current\n list of contexts for the session. If you specify an empty list, all\n contexts for the session are cleared.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimeservice#PutSessionResponse": { @@ -2412,6 +2486,9 @@ "smithy.api#httpHeader": "x-amz-lex-active-contexts" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimeservice#RequestTimeoutException": { @@ -2578,7 +2655,7 @@ "min": 2, "max": 100 }, - "smithy.api#pattern": "[0-9a-zA-Z._:-]+" + "smithy.api#pattern": "^[0-9a-zA-Z._:-]+$" } }, "com.amazonaws.lexruntimeservice#genericAttachmentList": { diff --git a/codegen/sdk-codegen/aws-models/lex-runtime-v2.json b/codegen/sdk-codegen/aws-models/lex-runtime-v2.json index 3ed86ff6287..c3835852a55 100644 --- a/codegen/sdk-codegen/aws-models/lex-runtime-v2.json +++ b/codegen/sdk-codegen/aws-models/lex-runtime-v2.json @@ -58,6 +58,7 @@ "arnNamespace": "lex", "cloudFormationName": "LexRuntimeV2", "cloudTrailEventSource": "lexruntimev2.amazonaws.com", + "docId": "runtime.lex.v2-2020-08-07", "endpointPrefix": "runtime-v2-lex" }, "aws.auth#sigv4": { @@ -79,7 +80,7 @@ "parameters": { "Region": { "builtIn": "AWS::Region", - "required": true, + "required": false, "documentation": "The AWS region used to dispatch the request.", "type": "String" }, @@ -108,13 +109,12 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "isSet", "argv": [ { - "ref": "Region" + "ref": "Endpoint" } - ], - "assign": "PartitionResult" + ] } ], "type": "tree", @@ -122,64 +122,17 @@ { "conditions": [ { - "fn": "isSet", + "fn": "booleanEquals", "argv": [ { - "ref": "Endpoint" - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" + "ref": "UseFIPS" }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + true ] } - ] + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" }, { "conditions": [ @@ -187,19 +140,51 @@ "fn": "booleanEquals", "argv": [ { - "ref": "UseFIPS" + "ref": "UseDualStack" }, true ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ { - "fn": "booleanEquals", + "ref": "Region" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", "argv": [ { - "ref": "UseDualStack" - }, - true - ] + "ref": "Region" + } + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -209,90 +194,109 @@ { "fn": "booleanEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "UseFIPS" + }, + true ] }, { "fn": "booleanEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } + "ref": "UseDualStack" + }, + true ] } ], "type": "tree", "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://runtime-v2-lex-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, { "conditions": [], - "endpoint": { - "url": "https://runtime-v2-lex-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "UseFIPS" + }, + true ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], "type": "tree", "rules": [ { @@ -305,657 +309,486 @@ "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" } ] }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } + "ref": "UseDualStack" + }, + true ] } ], "type": "tree", "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://runtime-v2-lex.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, { "conditions": [], - "endpoint": { - "url": "https://runtime-v2-lex.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://runtime-v2-lex.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "endpoint": { - "url": "https://runtime-v2-lex.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region ca-central-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.ca-central-1.api.aws" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": true, - "Region": "ca-central-1" - } - }, - { - "documentation": "For region ca-central-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.ca-central-1.amazonaws.com" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": false, - "Region": "ca-central-1" - } - }, - { - "documentation": "For region ca-central-1 with FIPS disabled and DualStack enabled", + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.ca-central-1.api.aws" + "url": "https://runtime-v2-lex.af-south-1.amazonaws.com" } }, "params": { + "Region": "af-south-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "ca-central-1" + "UseDualStack": false } }, { - "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.ca-central-1.amazonaws.com" + "url": "https://runtime-v2-lex.ap-northeast-1.amazonaws.com" } }, "params": { + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ca-central-1" - } - }, - { - "documentation": "For region eu-central-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.eu-central-1.api.aws" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": true, - "Region": "eu-central-1" + "UseDualStack": false } }, { - "documentation": "For region eu-central-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.eu-central-1.amazonaws.com" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": false, - "Region": "eu-central-1" - } - }, - { - "documentation": "For region eu-central-1 with FIPS disabled and DualStack enabled", + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.eu-central-1.api.aws" + "url": "https://runtime-v2-lex.ap-northeast-2.amazonaws.com" } }, "params": { + "Region": "ap-northeast-2", "UseFIPS": false, - "UseDualStack": true, - "Region": "eu-central-1" + "UseDualStack": false } }, { - "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.eu-central-1.amazonaws.com" + "url": "https://runtime-v2-lex.ap-southeast-1.amazonaws.com" } }, "params": { + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-central-1" - } - }, - { - "documentation": "For region us-west-2 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.us-west-2.api.aws" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": true, - "Region": "us-west-2" - } - }, - { - "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.us-west-2.amazonaws.com" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { - "documentation": "For region us-west-2 with FIPS disabled and DualStack enabled", + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.us-west-2.api.aws" + "url": "https://runtime-v2-lex.ap-southeast-2.amazonaws.com" } }, "params": { + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-west-2" + "UseDualStack": false } }, { - "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.us-west-2.amazonaws.com" + "url": "https://runtime-v2-lex.ca-central-1.amazonaws.com" } }, "params": { + "Region": "ca-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { - "documentation": "For region af-south-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.af-south-1.api.aws" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": true, - "Region": "af-south-1" - } - }, - { - "documentation": "For region af-south-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.af-south-1.amazonaws.com" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": false, - "Region": "af-south-1" - } - }, - { - "documentation": "For region af-south-1 with FIPS disabled and DualStack enabled", + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.af-south-1.api.aws" + "url": "https://runtime-v2-lex.eu-central-1.amazonaws.com" } }, "params": { + "Region": "eu-central-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "af-south-1" + "UseDualStack": false } }, { - "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.af-south-1.amazonaws.com" + "url": "https://runtime-v2-lex.eu-west-1.amazonaws.com" } }, "params": { + "Region": "eu-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "af-south-1" + "UseDualStack": false } }, { - "documentation": "For region eu-west-2 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.eu-west-2.api.aws" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": true, - "Region": "eu-west-2" - } - }, - { - "documentation": "For region eu-west-2 with FIPS enabled and DualStack disabled", + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.eu-west-2.amazonaws.com" + "url": "https://runtime-v2-lex.eu-west-2.amazonaws.com" } }, "params": { - "UseFIPS": true, - "UseDualStack": false, - "Region": "eu-west-2" + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.eu-west-2.api.aws" + "url": "https://runtime-v2-lex.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "eu-west-2" + "UseDualStack": false } }, { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.eu-west-2.amazonaws.com" + "url": "https://runtime-v2-lex.us-west-2.amazonaws.com" } }, "params": { + "Region": "us-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-2" + "UseDualStack": false } }, { - "documentation": "For region eu-west-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.eu-west-1.api.aws" + "url": "https://runtime-v2-lex-fips.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "eu-west-1" + "UseDualStack": true } }, { - "documentation": "For region eu-west-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.eu-west-1.amazonaws.com" + "url": "https://runtime-v2-lex-fips.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": false } }, { - "documentation": "For region eu-west-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex.eu-west-1.api.aws" - } - }, - "params": { - "UseFIPS": false, - "UseDualStack": true, - "Region": "eu-west-1" - } - }, - { - "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.eu-west-1.amazonaws.com" + "url": "https://runtime-v2-lex.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": true } }, { - "documentation": "For region ap-northeast-2 with FIPS enabled and DualStack enabled", + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.ap-northeast-2.api.aws" + "url": "https://runtime-v2-lex-fips.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "ap-northeast-2" + "UseDualStack": true } }, { - "documentation": "For region ap-northeast-2 with FIPS enabled and DualStack disabled", + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.ap-northeast-2.amazonaws.com" + "url": "https://runtime-v2-lex-fips.cn-north-1.amazonaws.com.cn" } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "ap-northeast-2" + "UseDualStack": false } }, { - "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack enabled", + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.ap-northeast-2.api.aws" + "url": "https://runtime-v2-lex.cn-north-1.api.amazonwebservices.com.cn" } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "ap-northeast-2" + "UseDualStack": true } }, { - "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.ap-northeast-2.amazonaws.com" + "url": "https://runtime-v2-lex.cn-north-1.amazonaws.com.cn" } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-2" + "UseDualStack": false } }, { - "documentation": "For region ap-northeast-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.ap-northeast-1.api.aws" + "url": "https://runtime-v2-lex-fips.us-gov-east-1.api.aws" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "ap-northeast-1" + "UseDualStack": true } }, { - "documentation": "For region ap-northeast-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.ap-northeast-1.amazonaws.com" + "url": "https://runtime-v2-lex-fips.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { - "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.ap-northeast-1.api.aws" + "url": "https://runtime-v2-lex.us-gov-east-1.api.aws" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "ap-northeast-1" + "UseDualStack": true } }, { - "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.ap-northeast-1.amazonaws.com" + "url": "https://runtime-v2-lex.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { - "documentation": "For region ap-southeast-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.ap-southeast-1.api.aws" - } + "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, - "Region": "ap-southeast-1" + "UseDualStack": true } }, { - "documentation": "For region ap-southeast-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.ap-southeast-1.amazonaws.com" + "url": "https://runtime-v2-lex-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { - "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://runtime-v2-lex.ap-southeast-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "ap-southeast-1" + "UseDualStack": true } }, { - "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.ap-southeast-1.amazonaws.com" + "url": "https://runtime-v2-lex.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { - "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack enabled", + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.ap-southeast-2.api.aws" - } + "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, - "Region": "ap-southeast-2" + "UseDualStack": true } }, { - "documentation": "For region ap-southeast-2 with FIPS enabled and DualStack disabled", + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.ap-southeast-2.amazonaws.com" + "url": "https://runtime-v2-lex-fips.us-isob-east-1.sc2s.sgov.gov" } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack enabled", + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://runtime-v2-lex.ap-southeast-2.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "ap-southeast-2" + "UseDualStack": true } }, { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex.ap-southeast-2.amazonaws.com" + "url": "https://runtime-v2-lex.us-isob-east-1.sc2s.sgov.gov" } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { - "url": "https://runtime-v2-lex-fips.us-east-1.api.aws" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex-fips.us-east-1.amazonaws.com" - } - }, - "params": { - "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex.us-east-1.api.aws" - } - }, - "params": { - "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://runtime-v2-lex.us-east-1.amazonaws.com" + "url": "https://example.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1" + "Endpoint": "https://example.com" } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" @@ -964,7 +797,6 @@ "params": { "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -974,9 +806,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -986,11 +818,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1525,6 +1363,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimev2#DeleteSessionResponse": { @@ -1554,6 +1395,9 @@ "smithy.api#documentation": "

The identifier of the deleted session.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimev2#DependencyFailedException": { @@ -1779,6 +1623,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimev2#GetSessionResponse": { @@ -1808,6 +1655,9 @@ "smithy.api#documentation": "

Represents the current state of the dialog between the user and the\n bot.

\n

You can use this to determine the progress of the conversation and\n what the next action might be.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimev2#HeartbeatEvent": { @@ -2329,6 +2179,9 @@ "smithy.api#httpHeader": "ResponseContentType" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimev2#PutSessionResponse": { @@ -2377,6 +2230,9 @@ "smithy.api#httpPayload": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimev2#RecognizeText": { @@ -2476,6 +2332,9 @@ "smithy.api#documentation": "

Request-specific information passed between the client application\n and Amazon Lex V2

\n

The namespace x-amz-lex: is reserved for special\n attributes. Don't create any request attributes with the prefix\n x-amz-lex:.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimev2#RecognizeTextResponse": { @@ -2517,6 +2376,9 @@ "smithy.api#documentation": "

The bot member that recognized the text.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimev2#RecognizeUtterance": { @@ -2638,6 +2500,9 @@ "smithy.api#httpPayload": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimev2#RecognizeUtteranceResponse": { @@ -2714,6 +2579,9 @@ "smithy.api#httpHeader": "x-amz-lex-recognized-bot-member" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimev2#RecognizedBotMember": { @@ -3128,6 +2996,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lexruntimev2#StartConversationRequestEventStream": { @@ -3185,6 +3056,9 @@ "smithy.api#httpPayload": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lexruntimev2#StartConversationResponseEventStream": { diff --git a/codegen/sdk-codegen/aws-models/license-manager-linux-subscriptions.json b/codegen/sdk-codegen/aws-models/license-manager-linux-subscriptions.json index f53bda0383a..30c6469b382 100644 --- a/codegen/sdk-codegen/aws-models/license-manager-linux-subscriptions.json +++ b/codegen/sdk-codegen/aws-models/license-manager-linux-subscriptions.json @@ -598,55 +598,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://license-manager-linux-subscriptions-fips.us-gov-east-1.api.aws" + "url": "https://license-manager-linux-subscriptions-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://license-manager-linux-subscriptions-fips.us-gov-east-1.amazonaws.com" + "url": "https://license-manager-linux-subscriptions-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://license-manager-linux-subscriptions.us-gov-east-1.api.aws" + "url": "https://license-manager-linux-subscriptions.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://license-manager-linux-subscriptions.us-gov-east-1.amazonaws.com" + "url": "https://license-manager-linux-subscriptions.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -657,9 +657,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -670,9 +670,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -683,9 +683,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -696,109 +696,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://license-manager-linux-subscriptions-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://license-manager-linux-subscriptions-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://license-manager-linux-subscriptions-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://license-manager-linux-subscriptions.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://license-manager-linux-subscriptions.us-iso-east-1.c2s.ic.gov" + "url": "https://license-manager-linux-subscriptions.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://license-manager-linux-subscriptions-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://license-manager-linux-subscriptions-fips.us-east-1.amazonaws.com" + "url": "https://license-manager-linux-subscriptions-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://license-manager-linux-subscriptions.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://license-manager-linux-subscriptions.us-east-1.amazonaws.com" + "url": "https://license-manager-linux-subscriptions.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -807,9 +807,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -820,9 +820,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -831,9 +831,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -844,22 +844,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -869,9 +882,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -881,11 +894,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1345,4 +1364,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/license-manager-user-subscriptions.json b/codegen/sdk-codegen/aws-models/license-manager-user-subscriptions.json index 195cd6f73fb..db82722fba1 100644 --- a/codegen/sdk-codegen/aws-models/license-manager-user-subscriptions.json +++ b/codegen/sdk-codegen/aws-models/license-manager-user-subscriptions.json @@ -636,52 +636,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -689,13 +693,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -705,224 +718,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://license-manager-user-subscriptions-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://license-manager-user-subscriptions-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://license-manager-user-subscriptions-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://license-manager-user-subscriptions.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://license-manager-user-subscriptions.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://license-manager-user-subscriptions.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://license-manager-user-subscriptions.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -937,8 +901,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -950,8 +914,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -963,8 +927,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -976,8 +940,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -989,8 +953,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1002,8 +966,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1015,8 +979,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1028,8 +992,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1041,8 +1005,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1054,8 +1018,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1067,8 +1031,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1080,8 +1044,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1093,8 +1068,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1106,8 +1092,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1119,8 +1116,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1132,8 +1140,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1145,8 +1153,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1158,8 +1166,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1170,8 +1178,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1182,10 +1190,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2070,4 +2084,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/license-manager.json b/codegen/sdk-codegen/aws-models/license-manager.json index 7633da76a1a..80ff6c46186 100644 --- a/codegen/sdk-codegen/aws-models/license-manager.json +++ b/codegen/sdk-codegen/aws-models/license-manager.json @@ -261,52 +261,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -314,13 +318,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -330,224 +343,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://license-manager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://license-manager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://license-manager-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://license-manager-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://license-manager.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://license-manager.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://license-manager.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://license-manager.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -561,9 +525,9 @@ } }, "params": { + "Region": "af-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "af-south-1" + "UseDualStack": false } }, { @@ -574,9 +538,9 @@ } }, "params": { + "Region": "ap-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-east-1" + "UseDualStack": false } }, { @@ -587,9 +551,9 @@ } }, "params": { + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { @@ -600,9 +564,9 @@ } }, "params": { + "Region": "ap-northeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-2" + "UseDualStack": false } }, { @@ -613,9 +577,9 @@ } }, "params": { + "Region": "ap-northeast-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-3" + "UseDualStack": false } }, { @@ -626,9 +590,9 @@ } }, "params": { + "Region": "ap-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-south-1" + "UseDualStack": false } }, { @@ -639,9 +603,9 @@ } }, "params": { + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { @@ -652,9 +616,9 @@ } }, "params": { + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { @@ -665,9 +629,9 @@ } }, "params": { + "Region": "ap-southeast-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-3" + "UseDualStack": false } }, { @@ -678,9 +642,9 @@ } }, "params": { + "Region": "ca-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ca-central-1" + "UseDualStack": false } }, { @@ -691,9 +655,9 @@ } }, "params": { + "Region": "eu-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-central-1" + "UseDualStack": false } }, { @@ -704,9 +668,9 @@ } }, "params": { + "Region": "eu-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-north-1" + "UseDualStack": false } }, { @@ -717,9 +681,9 @@ } }, "params": { + "Region": "eu-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-south-1" + "UseDualStack": false } }, { @@ -730,9 +694,9 @@ } }, "params": { + "Region": "eu-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": false } }, { @@ -743,9 +707,9 @@ } }, "params": { + "Region": "eu-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-2" + "UseDualStack": false } }, { @@ -756,9 +720,9 @@ } }, "params": { + "Region": "eu-west-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-3" + "UseDualStack": false } }, { @@ -769,9 +733,9 @@ } }, "params": { + "Region": "me-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "me-south-1" + "UseDualStack": false } }, { @@ -782,9 +746,9 @@ } }, "params": { + "Region": "sa-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "sa-east-1" + "UseDualStack": false } }, { @@ -795,9 +759,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -808,9 +772,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -821,9 +785,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -834,9 +798,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -847,9 +811,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -860,9 +824,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -873,9 +837,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -886,9 +850,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -899,9 +863,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -912,9 +876,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -925,9 +889,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -938,9 +902,9 @@ } }, "params": { + "Region": "cn-northwest-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-northwest-1" + "UseDualStack": false } }, { @@ -951,9 +915,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -964,9 +928,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -977,9 +941,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -990,9 +954,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -1003,9 +967,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -1016,9 +980,9 @@ } }, "params": { + "Region": "us-gov-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-west-1" + "UseDualStack": false } }, { @@ -1029,9 +993,9 @@ } }, "params": { + "Region": "us-gov-west-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-west-1" + "UseDualStack": false } }, { @@ -1042,9 +1006,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -1055,9 +1019,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -1068,9 +1032,9 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -1079,9 +1043,9 @@ "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, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -1092,9 +1056,9 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -1103,9 +1067,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -1116,9 +1080,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1127,9 +1091,9 @@ "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, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1140,9 +1104,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1151,9 +1115,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1164,9 +1128,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1189,9 +1153,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1201,9 +1165,9 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, diff --git a/codegen/sdk-codegen/aws-models/lightsail.json b/codegen/sdk-codegen/aws-models/lightsail.json index 6aa25950b36..e5dd7ea8d33 100644 --- a/codegen/sdk-codegen/aws-models/lightsail.json +++ b/codegen/sdk-codegen/aws-models/lightsail.json @@ -15658,52 +15658,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -15711,13 +15715,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -15727,224 +15740,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://lightsail-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://lightsail-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://lightsail-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://lightsail-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://lightsail.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://lightsail.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://lightsail.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://lightsail.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/location.json b/codegen/sdk-codegen/aws-models/location.json index 8cfcddac72c..3a53e67e88d 100644 --- a/codegen/sdk-codegen/aws-models/location.json +++ b/codegen/sdk-codegen/aws-models/location.json @@ -5903,52 +5903,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -5956,13 +5960,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -5972,224 +5985,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://geo-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://geo-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://geo.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://geo.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://geo.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://geo.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/lookoutmetrics.json b/codegen/sdk-codegen/aws-models/lookoutmetrics.json index 6735296ddc3..32b92028eae 100644 --- a/codegen/sdk-codegen/aws-models/lookoutmetrics.json +++ b/codegen/sdk-codegen/aws-models/lookoutmetrics.json @@ -112,25 +112,33 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#ActivateAnomalyDetectorResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutmetrics#AggregationFunction": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AVG", - "name": "AVG" - }, - { - "value": "SUM", - "name": "SUM" + "type": "enum", + "members": { + "AVG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AVG" + } + }, + "SUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUM" } - ] + } } }, "com.amazonaws.lookoutmetrics#Alert": { @@ -249,18 +257,20 @@ } }, "com.amazonaws.lookoutmetrics#AlertStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "INACTIVE", - "name": "INACTIVE" + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INACTIVE" } - ] + } } }, "com.amazonaws.lookoutmetrics#AlertSummary": { @@ -333,45 +343,55 @@ } }, "com.amazonaws.lookoutmetrics#AlertType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SNS", - "name": "SNS" - }, - { - "value": "LAMBDA", - "name": "LAMBDA" + "type": "enum", + "members": { + "SNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNS" + } + }, + "LAMBDA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LAMBDA" } - ] + } } }, "com.amazonaws.lookoutmetrics#AnomalyDetectionTaskStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "PENDING" - }, - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "FAILED_TO_SCHEDULE", - "name": "FAILED_TO_SCHEDULE" + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + }, + "FAILED_TO_SCHEDULE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED_TO_SCHEDULE" + } + } } }, "com.amazonaws.lookoutmetrics#AnomalyDetectionTaskStatusMessage": { @@ -449,26 +469,32 @@ } }, "com.amazonaws.lookoutmetrics#AnomalyDetectorFailureType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVATION_FAILURE", - "name": "ACTIVATION_FAILURE" - }, - { - "value": "BACK_TEST_ACTIVATION_FAILURE", - "name": "BACK_TEST_ACTIVATION_FAILURE" - }, - { - "value": "DELETION_FAILURE", - "name": "DELETION_FAILURE" - }, - { - "value": "DEACTIVATION_FAILURE", - "name": "DEACTIVATION_FAILURE" + "type": "enum", + "members": { + "ACTIVATION_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVATION_FAILURE" + } + }, + "BACK_TEST_ACTIVATION_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BACK_TEST_ACTIVATION_FAILURE" + } + }, + "DELETION_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETION_FAILURE" + } + }, + "DEACTIVATION_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEACTIVATION_FAILURE" } - ] + } } }, "com.amazonaws.lookoutmetrics#AnomalyDetectorName": { @@ -482,54 +508,74 @@ } }, "com.amazonaws.lookoutmetrics#AnomalyDetectorStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "ACTIVATING", - "name": "ACTIVATING" - }, - { - "value": "DELETING", - "name": "DELETING" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "INACTIVE", - "name": "INACTIVE" - }, - { - "value": "LEARNING", - "name": "LEARNING" - }, - { - "value": "BACK_TEST_ACTIVATING", - "name": "BACK_TEST_ACTIVATING" - }, - { - "value": "BACK_TEST_ACTIVE", - "name": "BACK_TEST_ACTIVE" - }, - { - "value": "BACK_TEST_COMPLETE", - "name": "BACK_TEST_COMPLETE" - }, - { - "value": "DEACTIVATED", - "name": "DEACTIVATED" - }, - { - "value": "DEACTIVATING", - "name": "DEACTIVATING" + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "ACTIVATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVATING" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INACTIVE" + } + }, + "LEARNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LEARNING" + } + }, + "BACK_TEST_ACTIVATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BACK_TEST_ACTIVATING" + } + }, + "BACK_TEST_ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BACK_TEST_ACTIVE" + } + }, + "BACK_TEST_COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BACK_TEST_COMPLETE" + } + }, + "DEACTIVATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEACTIVATED" + } + }, + "DEACTIVATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEACTIVATING" } - ] + } } }, "com.amazonaws.lookoutmetrics#AnomalyDetectorSummary": { @@ -1005,11 +1051,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#BackTestAnomalyDetectorResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutmetrics#BackTestConfiguration": { "type": "structure", @@ -1039,18 +1091,20 @@ "type": "boolean" }, "com.amazonaws.lookoutmetrics#CSVFileCompression": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "GZIP", - "name": "GZIP" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + }, + "GZIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GZIP" } - ] + } } }, "com.amazonaws.lookoutmetrics#Charset": { @@ -1094,22 +1148,26 @@ } }, "com.amazonaws.lookoutmetrics#Confidence": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "HIGH", - "name": "HIGH" - }, - { - "value": "LOW", - "name": "LOW" - }, - { - "value": "NONE", - "name": "NONE" + "type": "enum", + "members": { + "HIGH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HIGH" + } + }, + "LOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOW" } - ] + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + } } }, "com.amazonaws.lookoutmetrics#ConflictException": { @@ -1243,6 +1301,9 @@ "smithy.api#documentation": "

The configuration of the alert filters, containing MetricList and DimensionFilterList.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#CreateAlertResponse": { @@ -1254,6 +1315,9 @@ "smithy.api#documentation": "

The ARN of the alert.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#CreateAnomalyDetector": { @@ -1328,6 +1392,9 @@ "smithy.api#documentation": "

A list of tags to apply to the anomaly detector.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#CreateAnomalyDetectorResponse": { @@ -1339,6 +1406,9 @@ "smithy.api#documentation": "

The ARN of the detector.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#CreateMetricSet": { @@ -1461,6 +1531,9 @@ "smithy.api#documentation": "

A list of filters that specify which data is kept for anomaly detection.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#CreateMetricSetResponse": { @@ -1472,6 +1545,9 @@ "smithy.api#documentation": "

The ARN of the dataset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#CsvFormatDescriptor": { @@ -1570,50 +1646,68 @@ } }, "com.amazonaws.lookoutmetrics#DataQualityMetricType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "COLUMN_COMPLETENESS", - "name": "COLUMN_COMPLETENESS" - }, - { - "value": "DIMENSION_UNIQUENESS", - "name": "DIMENSION_UNIQUENESS" - }, - { - "value": "TIME_SERIES_COUNT", - "name": "TIME_SERIES_COUNT" - }, - { - "value": "ROWS_PROCESSED", - "name": "ROWS_PROCESSED" - }, - { - "value": "ROWS_PARTIAL_COMPLIANCE", - "name": "ROWS_PARTIAL_COMPLIANCE" - }, - { - "value": "INVALID_ROWS_COMPLIANCE", - "name": "INVALID_ROWS_COMPLIANCE" - }, - { - "value": "BACKTEST_TRAINING_DATA_START_TIME_STAMP", - "name": "BACKTEST_TRAINING_DATA_START_TIME_STAMP" - }, - { - "value": "BACKTEST_TRAINING_DATA_END_TIME_STAMP", - "name": "BACKTEST_TRAINING_DATA_END_TIME_STAMP" - }, - { - "value": "BACKTEST_INFERENCE_DATA_START_TIME_STAMP", - "name": "BACKTEST_INFERENCE_DATA_START_TIME_STAMP" - }, - { - "value": "BACKTEST_INFERENCE_DATA_END_TIME_STAMP", - "name": "BACKTEST_INFERENCE_DATA_END_TIME_STAMP" + "type": "enum", + "members": { + "COLUMN_COMPLETENESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COLUMN_COMPLETENESS" + } + }, + "DIMENSION_UNIQUENESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DIMENSION_UNIQUENESS" + } + }, + "TIME_SERIES_COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIME_SERIES_COUNT" + } + }, + "ROWS_PROCESSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROWS_PROCESSED" + } + }, + "ROWS_PARTIAL_COMPLIANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROWS_PARTIAL_COMPLIANCE" + } + }, + "INVALID_ROWS_COMPLIANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_ROWS_COMPLIANCE" + } + }, + "BACKTEST_TRAINING_DATA_START_TIME_STAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BACKTEST_TRAINING_DATA_START_TIME_STAMP" + } + }, + "BACKTEST_TRAINING_DATA_END_TIME_STAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BACKTEST_TRAINING_DATA_END_TIME_STAMP" + } + }, + "BACKTEST_INFERENCE_DATA_START_TIME_STAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BACKTEST_INFERENCE_DATA_START_TIME_STAMP" + } + }, + "BACKTEST_INFERENCE_DATA_END_TIME_STAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BACKTEST_INFERENCE_DATA_END_TIME_STAMP" } - ] + } } }, "com.amazonaws.lookoutmetrics#DatabaseHost": { @@ -1693,11 +1787,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#DeactivateAnomalyDetectorResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutmetrics#DeleteAlert": { "type": "operation", @@ -1743,11 +1843,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#DeleteAlertResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutmetrics#DeleteAnomalyDetector": { "type": "operation", @@ -1796,11 +1902,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#DeleteAnomalyDetectorResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutmetrics#Delimiter": { "type": "string", @@ -1856,6 +1968,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#DescribeAlertResponse": { @@ -1867,6 +1982,9 @@ "smithy.api#documentation": "

Contains information about an alert.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#DescribeAnomalyDetectionExecutions": { @@ -1937,6 +2055,9 @@ "smithy.api#documentation": "

Specify the pagination token that's returned by a previous request to retrieve the next page of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#DescribeAnomalyDetectionExecutionsResponse": { @@ -1954,6 +2075,9 @@ "smithy.api#documentation": "

The pagination token that's included if more results are available.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#DescribeAnomalyDetector": { @@ -2000,6 +2124,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#DescribeAnomalyDetectorResponse": { @@ -2065,6 +2192,9 @@ "smithy.api#documentation": "

The process that caused the detector to fail.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#DescribeMetricSet": { @@ -2111,6 +2241,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#DescribeMetricSetResponse": { @@ -2201,6 +2334,9 @@ "smithy.api#documentation": "

The dimensions and their values that were used to filter the dataset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#DetectMetricSetConfig": { @@ -2254,6 +2390,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#DetectMetricSetConfigResponse": { @@ -2265,6 +2404,9 @@ "smithy.api#documentation": "

The inferred dataset configuration for the datasource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#DetectedCsvFormatDescriptor": { @@ -2668,14 +2810,14 @@ } }, "com.amazonaws.lookoutmetrics#FilterOperation": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EQUALS", - "name": "EQUALS" + "type": "enum", + "members": { + "EQUALS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EQUALS" } - ] + } } }, "com.amazonaws.lookoutmetrics#FlowName": { @@ -2689,26 +2831,32 @@ } }, "com.amazonaws.lookoutmetrics#Frequency": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "P1D", - "name": "P1D" - }, - { - "value": "PT1H", - "name": "PT1H" - }, - { - "value": "PT10M", - "name": "PT10M" - }, - { - "value": "PT5M", - "name": "PT5M" + "type": "enum", + "members": { + "P1D": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "P1D" + } + }, + "PT1H": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PT1H" } - ] + }, + "PT10M": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PT10M" + } + }, + "PT5M": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PT5M" + } + } } }, "com.amazonaws.lookoutmetrics#GetAnomalyGroup": { @@ -2762,6 +2910,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#GetAnomalyGroupResponse": { @@ -2773,6 +2924,9 @@ "smithy.api#documentation": "

Details about the anomaly group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#GetDataQualityMetrics": { @@ -2825,6 +2979,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a specific data quality metric set.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#GetDataQualityMetricsResponse": { @@ -2836,6 +2993,9 @@ "smithy.api#documentation": "

A list of the data quality metrics for the AnomalyDetectorArn that you requested.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#GetFeedback": { @@ -2907,7 +3067,10 @@ "smithy.api#documentation": "

Specify the pagination token that's returned by a previous request to retrieve the next page of results.

" } } - } + }, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.lookoutmetrics#GetFeedbackResponse": { "type": "structure", @@ -2924,6 +3087,9 @@ "smithy.api#documentation": "

The pagination token that's included if more results are available.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#GetSampleData": { @@ -2969,6 +3135,9 @@ "smithy.api#documentation": "

A datasource bucket in Amazon S3.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#GetSampleDataResponse": { @@ -2986,6 +3155,9 @@ "smithy.api#documentation": "

A list of records.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#HeaderList": { @@ -3060,7 +3232,7 @@ } }, "traits": { - "smithy.api#documentation": "

Aggregated details about the measures contributing to the anomaly group, and the measures\n potentially impacted by the anomaly group.

\n

" + "smithy.api#documentation": "

Aggregated details about the measures contributing to the anomaly group, and the measures\n potentially impacted by the anomaly group.

\n

" } }, "com.amazonaws.lookoutmetrics#InterMetricImpactList": { @@ -3113,18 +3285,20 @@ } }, "com.amazonaws.lookoutmetrics#JsonFileCompression": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "GZIP", - "name": "GZIP" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + }, + "GZIP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GZIP" } - ] + } } }, "com.amazonaws.lookoutmetrics#JsonFormatDescriptor": { @@ -3240,6 +3414,9 @@ "smithy.api#documentation": "

The maximum number of results that will be displayed by the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#ListAlertsResponse": { @@ -3257,6 +3434,9 @@ "smithy.api#documentation": "

If the response is truncated, the service returns this token. To retrieve the next set of results, use this\n token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#ListAnomalyDetectors": { @@ -3314,6 +3494,9 @@ "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a NextToken. To\n retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#ListAnomalyDetectorsResponse": { @@ -3331,6 +3514,9 @@ "smithy.api#documentation": "

If the response is truncated, the service returns this token. To retrieve the next set of results, use the\n token in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#ListAnomalyGroupRelatedMetrics": { @@ -3408,6 +3594,9 @@ "smithy.api#documentation": "

Specify the pagination token that's returned by a previous request to retrieve the next\n page of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#ListAnomalyGroupRelatedMetricsResponse": { @@ -3425,6 +3614,9 @@ "smithy.api#documentation": "

The pagination token that's included if more results are available.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#ListAnomalyGroupSummaries": { @@ -3497,6 +3689,9 @@ "smithy.api#documentation": "

Specify the pagination token that's returned by a previous request to retrieve the next page of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#ListAnomalyGroupSummariesResponse": { @@ -3520,6 +3715,9 @@ "smithy.api#documentation": "

The pagination token that's included if more results are available.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#ListAnomalyGroupTimeSeries": { @@ -3598,6 +3796,9 @@ "smithy.api#documentation": "

Specify the pagination token that's returned by a previous request to retrieve the next page of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#ListAnomalyGroupTimeSeriesResponse": { @@ -3633,6 +3834,9 @@ "smithy.api#documentation": "

A list of anomalous metrics.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#ListMetricSets": { @@ -3696,6 +3900,9 @@ "smithy.api#documentation": "

If the result of the previous request was truncated, the response includes a\n NextToken. To retrieve the next set of results, use the token in the next\n request. Tokens expire after 24 hours.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#ListMetricSetsResponse": { @@ -3713,6 +3920,9 @@ "smithy.api#documentation": "

If the response is truncated, the list call returns this token. To retrieve the next set\n of results, use the token in the next list request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#ListTagsForResource": { @@ -3755,6 +3965,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#ListTagsForResourceResponse": { @@ -3767,6 +3980,9 @@ "smithy.api#jsonName": "Tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#LookoutMetrics": { @@ -3938,52 +4154,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3991,13 +4211,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -4007,224 +4236,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://lookoutmetrics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://lookoutmetrics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://lookoutmetrics-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://lookoutmetrics-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://lookoutmetrics.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://lookoutmetrics.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://lookoutmetrics.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://lookoutmetrics.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -4239,8 +4419,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4252,8 +4432,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4265,8 +4445,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4278,8 +4458,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4291,8 +4471,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4304,8 +4484,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4317,8 +4497,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4330,8 +4510,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4343,8 +4523,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4356,8 +4536,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4369,8 +4549,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4382,8 +4562,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4395,8 +4575,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4408,8 +4588,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4421,8 +4601,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4434,8 +4614,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4447,8 +4627,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4460,8 +4640,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4473,8 +4653,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4486,8 +4666,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -4499,8 +4690,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -4512,8 +4714,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -4525,8 +4738,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -4538,8 +4762,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4551,8 +4775,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4564,8 +4788,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4576,8 +4800,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4588,10 +4812,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -4992,11 +5222,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#PutFeedbackResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutmetrics#QuotaCode": { "type": "string" @@ -5176,18 +5412,20 @@ } }, "com.amazonaws.lookoutmetrics#RelationshipType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CAUSE_OF_INPUT_ANOMALY_GROUP", - "name": "CAUSE_OF_INPUT_ANOMALY_GROUP" - }, - { - "value": "EFFECT_OF_INPUT_ANOMALY_GROUP", - "name": "EFFECT_OF_INPUT_ANOMALY_GROUP" + "type": "enum", + "members": { + "CAUSE_OF_INPUT_ANOMALY_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CAUSE_OF_INPUT_ANOMALY_GROUP" } - ] + }, + "EFFECT_OF_INPUT_ANOMALY_GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EFFECT_OF_INPUT_ANOMALY_GROUP" + } + } } }, "com.amazonaws.lookoutmetrics#ResourceId": { @@ -5408,22 +5646,26 @@ } }, "com.amazonaws.lookoutmetrics#SnsFormat": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "LONG_TEXT", - "name": "LONG_TEXT" - }, - { - "value": "SHORT_TEXT", - "name": "SHORT_TEXT" - }, - { - "value": "JSON", - "name": "JSON" + "type": "enum", + "members": { + "LONG_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LONG_TEXT" + } + }, + "SHORT_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHORT_TEXT" + } + }, + "JSON": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JSON" } - ] + } } }, "com.amazonaws.lookoutmetrics#StringAttributeValue": { @@ -5545,11 +5787,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutmetrics#TagValue": { "type": "string", @@ -5777,11 +6025,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutmetrics#UpdateAlert": { "type": "operation", @@ -5852,6 +6106,9 @@ "smithy.api#documentation": "

The configuration of the alert filters, containing MetricList and DimensionFilterList.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#UpdateAlertResponse": { @@ -5863,6 +6120,9 @@ "smithy.api#documentation": "

The ARN of the updated alert.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#UpdateAnomalyDetector": { @@ -5927,6 +6187,9 @@ "smithy.api#documentation": "

Contains information about the configuration to which the detector will be updated.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#UpdateAnomalyDetectorResponse": { @@ -5938,6 +6201,9 @@ "smithy.api#documentation": "

The ARN of the updated detector.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#UpdateMetricSet": { @@ -6033,6 +6299,9 @@ "smithy.api#documentation": "

Describes a list of filters for choosing specific dimensions and specific values. Each\n filter consists of the dimension and one of its values that you want to include. When\n multiple dimensions or values are specified, the dimensions are joined with an AND operation\n and the values are joined with an OR operation.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutmetrics#UpdateMetricSetResponse": { @@ -6044,6 +6313,9 @@ "smithy.api#documentation": "

The ARN of the dataset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutmetrics#ValidationException": { @@ -6103,26 +6375,32 @@ } }, "com.amazonaws.lookoutmetrics#ValidationExceptionReason": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "UNKNOWN_OPERATION", - "name": "UNKNOWN_OPERATION" - }, - { - "value": "CANNOT_PARSE", - "name": "CANNOT_PARSE" - }, - { - "value": "FIELD_VALIDATION_FAILED", - "name": "FIELD_VALIDATION_FAILED" - }, - { - "value": "OTHER", - "name": "OTHER" + "type": "enum", + "members": { + "UNKNOWN_OPERATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN_OPERATION" + } + }, + "CANNOT_PARSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANNOT_PARSE" + } + }, + "FIELD_VALIDATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FIELD_VALIDATION_FAILED" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OTHER" } - ] + } } }, "com.amazonaws.lookoutmetrics#VpcConfiguration": { diff --git a/codegen/sdk-codegen/aws-models/lookoutvision.json b/codegen/sdk-codegen/aws-models/lookoutvision.json index d43f04eafce..320b6532103 100644 --- a/codegen/sdk-codegen/aws-models/lookoutvision.json +++ b/codegen/sdk-codegen/aws-models/lookoutvision.json @@ -244,7 +244,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new dataset in an Amazon Lookout for Vision project. CreateDataset can create a \n training or a test dataset from a valid dataset source (DatasetSource).

\n

If you want a single dataset project, specify train for the value of \n DatasetType.

\n

To have a project with separate training and test datasets, call CreateDataset twice.\n On the first call, specify train for the value of \n DatasetType. On the second call, specify test for the value of \n DatasetType.

\n

This operation requires permissions to perform the\n lookoutvision:CreateDataset operation.

", + "smithy.api#documentation": "

Creates a new dataset in an Amazon Lookout for Vision project. CreateDataset can create a \n training or a test dataset from a valid dataset source (DatasetSource).

\n

If you want a single dataset project, specify train for the value of \n DatasetType.

\n

To have a project with separate training and test datasets, call CreateDataset twice.\n On the first call, specify train for the value of \n DatasetType. On the second call, specify test for the value of \n DatasetType.

\n

This operation requires permissions to perform the\n lookoutvision:CreateDataset operation.

", "smithy.api#http": { "method": "POST", "uri": "/2020-11-20/projects/{ProjectName}/datasets", @@ -284,6 +284,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#CreateDatasetResponse": { @@ -295,6 +298,9 @@ "smithy.api#documentation": "

Information about the dataset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#CreateModel": { @@ -357,7 +363,7 @@ "ClientToken": { "target": "com.amazonaws.lookoutvision#ClientToken", "traits": { - "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to CreateModel\n completes only once. You choose the value to pass. For example, An issue\n might prevent you from getting a response from CreateModel.\n In this case, safely retry your call\n to CreateModel by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from starting multiple training jobs. You'll need to\n provide your own value for other use cases.

\n

An error occurs if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to CreateModel. An idempotency\n token is active for 8 hours.

", + "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to CreateModel\n completes only once. You choose the value to pass. For example, An issue\n might prevent you from getting a response from CreateModel.\n In this case, safely retry your call\n to CreateModel by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from starting multiple training jobs. You'll need to\n provide your own value for other use cases.

\n

An error occurs if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to CreateModel. An idempotency\n token is active for 8 hours.

", "smithy.api#httpHeader": "X-Amzn-Client-Token", "smithy.api#idempotencyToken": {} } @@ -381,6 +387,9 @@ "smithy.api#documentation": "

A set of tags (key-value pairs) that you want to attach to the model.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#CreateModelResponse": { @@ -392,6 +401,9 @@ "smithy.api#documentation": "

The response from a call to CreateModel.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#CreateProject": { @@ -447,11 +459,14 @@ "ClientToken": { "target": "com.amazonaws.lookoutvision#ClientToken", "traits": { - "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to CreateProject\n completes only once. You choose the value to pass. For example, An issue might prevent you from \n getting a response from CreateProject.\n In this case, safely retry your call\n to CreateProject by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from making multiple project creation requests. You'll need to\n provide your own value for other use cases.

\n

An error occurs\n if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to CreateProject. An idempotency\n token is active for 8 hours.

", + "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to CreateProject\n completes only once. You choose the value to pass. For example, An issue might prevent you from \n getting a response from CreateProject.\n In this case, safely retry your call\n to CreateProject by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from making multiple project creation requests. You'll need to\n provide your own value for other use cases.

\n

An error occurs\n if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to CreateProject. An idempotency\n token is active for 8 hours.

", "smithy.api#httpHeader": "X-Amzn-Client-Token", "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#CreateProjectResponse": { @@ -463,6 +478,9 @@ "smithy.api#documentation": "

Information about the project.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#DatasetChanges": { @@ -778,16 +796,22 @@ "ClientToken": { "target": "com.amazonaws.lookoutvision#ClientToken", "traits": { - "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to DeleteDataset\n completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response from DeleteDataset.\n In this case, safely retry your call\n to DeleteDataset by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from making multiple deletetion requests. You'll need to\n provide your own value for other use cases.

\n

An error occurs if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to DeleteDataset. An idempotency\n token is active for 8 hours.

", + "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to DeleteDataset\n completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response from DeleteDataset.\n In this case, safely retry your call\n to DeleteDataset by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from making multiple deletetion requests. You'll need to\n provide your own value for other use cases.

\n

An error occurs if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to DeleteDataset. An idempotency\n token is active for 8 hours.

", "smithy.api#httpHeader": "X-Amzn-Client-Token", "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#DeleteDatasetResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutvision#DeleteModel": { "type": "operation", @@ -848,11 +872,14 @@ "ClientToken": { "target": "com.amazonaws.lookoutvision#ClientToken", "traits": { - "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to DeleteModel\n completes only once. You choose the value to pass. For example, an issue might prevent\n you from getting a response from DeleteModel.\n In this case, safely retry your call\n to DeleteModel by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from making multiple model deletion requests. You'll need to\n provide your own value for other use cases.

\n \n

An error occurs if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to DeleteModel. An idempotency\n token is active for 8 hours.

", + "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to DeleteModel\n completes only once. You choose the value to pass. For example, an issue might prevent\n you from getting a response from DeleteModel.\n In this case, safely retry your call\n to DeleteModel by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from making multiple model deletion requests. You'll need to\n provide your own value for other use cases.

\n

An error occurs if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to DeleteModel. An idempotency\n token is active for 8 hours.

", "smithy.api#httpHeader": "X-Amzn-Client-Token", "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#DeleteModelResponse": { @@ -864,6 +891,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the model that was deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#DeleteProject": { @@ -922,6 +952,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#DeleteProjectResponse": { @@ -933,6 +966,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the project that was deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#DescribeDataset": { @@ -991,6 +1027,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#DescribeDatasetResponse": { @@ -1002,6 +1041,9 @@ "smithy.api#documentation": "

The description of the requested dataset.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#DescribeModel": { @@ -1067,7 +1109,7 @@ } ], "traits": { - "smithy.api#documentation": "

Describes an Amazon Lookout for Vision model packaging job.\n

\n

This operation requires permissions to perform the\n lookoutvision:DescribeModelPackagingJob operation.

\n \n

For more information, see \n Using your Amazon Lookout for Vision model on an edge device in the Amazon Lookout for Vision Developer Guide.

", + "smithy.api#documentation": "

Describes an Amazon Lookout for Vision model packaging job.\n

\n

This operation requires permissions to perform the\n lookoutvision:DescribeModelPackagingJob operation.

\n

For more information, see \n Using your Amazon Lookout for Vision model on an edge device in the Amazon Lookout for Vision Developer Guide.

", "smithy.api#http": { "method": "GET", "uri": "/2020-11-20/projects/{ProjectName}/modelpackagingjobs/{JobName}", @@ -1094,6 +1136,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#DescribeModelPackagingJobResponse": { @@ -1105,6 +1150,9 @@ "smithy.api#documentation": "

The description of the model packaging job.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#DescribeModelRequest": { @@ -1126,6 +1174,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#DescribeModelResponse": { @@ -1137,6 +1188,9 @@ "smithy.api#documentation": "

Contains the description of the model.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#DescribeProject": { @@ -1187,6 +1241,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#DescribeProjectResponse": { @@ -1198,6 +1255,9 @@ "smithy.api#documentation": "

The description of the project.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#DetectAnomalies": { @@ -1229,7 +1289,7 @@ } ], "traits": { - "smithy.api#documentation": "

Detects anomalies in an image that you supply.

\n

The response from DetectAnomalies includes a boolean prediction\n that the image contains one or more anomalies and a confidence value for the prediction.\n If the model is an image segmentation model, the response also includes segmentation\n information for each type of anomaly found in the image.

\n \n

Before calling DetectAnomalies, you must first start your model with the StartModel operation.\n You are charged for the amount of time, in minutes, that a model runs and for the number of anomaly detection units that your\n model uses. If you are not using a model, use the StopModel operation to stop your model.

\n
\n \n

For more information, see Detecting anomalies in an image in the Amazon Lookout for Vision developer guide.

\n \n

This operation requires permissions to perform the\n lookoutvision:DetectAnomalies operation.

", + "smithy.api#documentation": "

Detects anomalies in an image that you supply.

\n

The response from DetectAnomalies includes a boolean prediction\n that the image contains one or more anomalies and a confidence value for the prediction.\n If the model is an image segmentation model, the response also includes segmentation\n information for each type of anomaly found in the image.

\n \n

Before calling DetectAnomalies, you must first start your model with the StartModel operation.\n You are charged for the amount of time, in minutes, that a model runs and for the number of anomaly detection units that your\n model uses. If you are not using a model, use the StopModel operation to stop your model.

\n
\n

For more information, see Detecting anomalies in an image in the Amazon Lookout for Vision developer guide.

\n

This operation requires permissions to perform the\n lookoutvision:DetectAnomalies operation.

", "smithy.api#http": { "method": "POST", "uri": "/2020-11-20/projects/{ProjectName}/models/{ModelVersion}/detect", @@ -1272,6 +1332,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#DetectAnomaliesResponse": { @@ -1283,6 +1346,9 @@ "smithy.api#documentation": "

The results of the DetectAnomalies operation.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#DetectAnomalyResult": { @@ -1336,7 +1402,7 @@ "CompilerOptions": { "target": "com.amazonaws.lookoutvision#CompilerOptions", "traits": { - "smithy.api#documentation": "

Additional compiler options for the Greengrass component. Currently, \n only NVIDIA Graphics Processing Units (GPU) and CPU accelerators are supported. \n If you specify TargetDevice, don't specify CompilerOptions.

\n \n \n

For more information, see \n Compiler options in the Amazon Lookout for Vision Developer Guide.

" + "smithy.api#documentation": "

Additional compiler options for the Greengrass component. Currently, \n only NVIDIA Graphics Processing Units (GPU) and CPU accelerators are supported. \n If you specify TargetDevice, don't specify CompilerOptions.

\n

For more information, see \n Compiler options in the Amazon Lookout for Vision Developer Guide.

" } }, "TargetDevice": { @@ -1621,6 +1687,9 @@ "smithy.api#httpQuery": "sourceRefContains" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#ListDatasetEntriesResponse": { @@ -1638,6 +1707,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Lookout for Vision returns this token\n that you can use in the subsequent request to retrieve the next set ofdataset entries.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#ListModelPackagingJobs": { @@ -1666,7 +1738,7 @@ } ], "traits": { - "smithy.api#documentation": "

\nLists the model packaging jobs created for an Amazon Lookout for Vision project.\n

\n

This operation requires permissions to perform the\n lookoutvision:ListModelPackagingJobs operation.\n

\n \n

For more information, see \n Using your Amazon Lookout for Vision model on an edge device in the Amazon Lookout for Vision Developer Guide.

", + "smithy.api#documentation": "

\nLists the model packaging jobs created for an Amazon Lookout for Vision project.\n

\n

This operation requires permissions to perform the\n lookoutvision:ListModelPackagingJobs operation.\n

\n

For more information, see \n Using your Amazon Lookout for Vision model on an edge device in the Amazon Lookout for Vision Developer Guide.

", "smithy.api#http": { "method": "GET", "uri": "/2020-11-20/projects/{ProjectName}/modelpackagingjobs", @@ -1705,6 +1777,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#ListModelPackagingJobsResponse": { @@ -1722,6 +1797,9 @@ "smithy.api#documentation": "

If the previous response was incomplete (because there is more\n results to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination \n token to retrieve the next set of results.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#ListModels": { @@ -1792,6 +1870,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#ListModelsResponse": { @@ -1809,6 +1890,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Lookout for Vision returns this token\n that you can use in the subsequent request to retrieve the next set of models.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#ListProjects": { @@ -1871,6 +1955,9 @@ "smithy.api#httpQuery": "maxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#ListProjectsResponse": { @@ -1888,6 +1975,9 @@ "smithy.api#documentation": "

If the response is truncated, Amazon Lookout for Vision returns this token\n that you can use in the subsequent request to retrieve the next set of projects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#ListTagsForResource": { @@ -1938,6 +2028,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#ListTagsForResourceResponse": { @@ -1949,6 +2042,9 @@ "smithy.api#documentation": "

A map of tag keys and values attached to the specified model.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#LookoutVisionService": { @@ -2096,52 +2192,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2149,13 +2249,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2165,224 +2274,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://lookoutvision-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://lookoutvision-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://lookoutvision-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://lookoutvision-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://lookoutvision.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://lookoutvision.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://lookoutvision.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://lookoutvision.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2397,8 +2457,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2410,8 +2470,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2423,8 +2483,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2436,8 +2496,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2449,8 +2509,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2462,8 +2522,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2475,8 +2535,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2488,8 +2548,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2501,8 +2561,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2514,8 +2574,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2527,8 +2587,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2540,8 +2600,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2553,8 +2613,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2566,8 +2626,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2579,8 +2639,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2592,8 +2652,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2605,8 +2665,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2618,8 +2678,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2631,8 +2702,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2644,8 +2726,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2657,8 +2750,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2670,8 +2774,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2683,8 +2787,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2696,8 +2800,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2708,8 +2812,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2720,10 +2824,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3676,7 +3786,7 @@ } ], "traits": { - "smithy.api#documentation": "

Starts an Amazon Lookout for Vision model packaging job. A model packaging job creates an AWS IoT Greengrass component for\n a Lookout for Vision model. You can use the component to deploy your model to an edge device managed by Greengrass.\n

\n \n

Use the DescribeModelPackagingJob API to determine the current status of the job.\n \n The model packaging job is complete if the value of Status is SUCCEEDED.

\n

To deploy the component\n to the target device, use the component name and component version\n with the AWS IoT Greengrass CreateDeployment API.

\n\n

This operation requires the following permissions:

\n
    \n
  • \n

    \n lookoutvision:StartModelPackagingJob\n

    \n
  • \n
  • \n

    \n s3:PutObject\n

    \n
  • \n
  • \n

    \n s3:GetBucketLocation\n

    \n
  • \n
  • \n

    \n kms:GenerateDataKey\n

    \n
  • \n
  • \n

    \n greengrass:CreateComponentVersion\n

    \n
  • \n
  • \n

    \n greengrass:DescribeComponent\n

    \n
  • \n
  • \n

    (Optional) greengrass:TagResource. Only required if you want to tag the component.

    \n
  • \n
\n \n \n

For more information, see \n Using your Amazon Lookout for Vision model on an edge device in the Amazon Lookout for Vision Developer Guide.

", + "smithy.api#documentation": "

Starts an Amazon Lookout for Vision model packaging job. A model packaging job creates an AWS IoT Greengrass component for\n a Lookout for Vision model. You can use the component to deploy your model to an edge device managed by Greengrass.\n

\n

Use the DescribeModelPackagingJob API to determine the current status of the job.\n \n The model packaging job is complete if the value of Status is SUCCEEDED.

\n

To deploy the component\n to the target device, use the component name and component version\n with the AWS IoT Greengrass CreateDeployment API.

\n

This operation requires the following permissions:

\n
    \n
  • \n

    \n lookoutvision:StartModelPackagingJob\n

    \n
  • \n
  • \n

    \n s3:PutObject\n

    \n
  • \n
  • \n

    \n s3:GetBucketLocation\n

    \n
  • \n
  • \n

    \n kms:GenerateDataKey\n

    \n
  • \n
  • \n

    \n greengrass:CreateComponentVersion\n

    \n
  • \n
  • \n

    \n greengrass:DescribeComponent\n

    \n
  • \n
  • \n

    (Optional) greengrass:TagResource. Only required if you want to tag the component.

    \n
  • \n
\n

For more information, see \n Using your Amazon Lookout for Vision model on an edge device in the Amazon Lookout for Vision Developer Guide.

", "smithy.api#http": { "method": "POST", "uri": "/2020-11-20/projects/{ProjectName}/modelpackagingjobs", @@ -3729,6 +3839,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#StartModelPackagingJobResponse": { @@ -3740,6 +3853,9 @@ "smithy.api#documentation": "

The job name for the model packaging job. If you don't supply a job name in the JobName input parameter,\n the service creates a job name for you.\n\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#StartModelRequest": { @@ -3771,7 +3887,7 @@ "ClientToken": { "target": "com.amazonaws.lookoutvision#ClientToken", "traits": { - "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to StartModel\n completes only once. You choose the value to pass. For example, An issue might prevent \n you from getting a response from StartModel.\n In this case, safely retry your call\n to StartModel by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from making multiple start requests. You'll need to\n provide your own value for other use cases.

\n \n

An error occurs if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to StartModel. An idempotency\n token is active for 8 hours.\n

", + "smithy.api#documentation": "

ClientToken is an idempotency token that ensures a call to StartModel\n completes only once. You choose the value to pass. For example, An issue might prevent \n you from getting a response from StartModel.\n In this case, safely retry your call\n to StartModel by using the same ClientToken parameter value.

\n

If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. \n This prevents retries after a network error from making multiple start requests. You'll need to\n provide your own value for other use cases.

\n

An error occurs if the other input parameters are not the same as in the first request. Using a different \n value for ClientToken is considered a new call to StartModel. An idempotency\n token is active for 8 hours.\n

", "smithy.api#httpHeader": "X-Amzn-Client-Token", "smithy.api#idempotencyToken": {} } @@ -3782,6 +3898,9 @@ "smithy.api#documentation": "

The maximum number of inference units to use for auto-scaling the model. If you don't\n specify a value, Amazon Lookout for Vision doesn't auto-scale the model.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#StartModelResponse": { @@ -3793,6 +3912,9 @@ "smithy.api#documentation": "

The current running status of the model.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#StopModel": { @@ -3859,6 +3981,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#StopModelResponse": { @@ -3870,6 +3995,9 @@ "smithy.api#documentation": "

The status of the model.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#Stream": { @@ -4002,11 +4130,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutvision#TagValue": { "type": "string", @@ -4188,11 +4322,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.lookoutvision#UpdateDatasetEntries": { "type": "operation", @@ -4223,7 +4363,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds or updates one or more JSON Line entries in a dataset. A JSON Line includes information about an image\n used for training or testing an Amazon Lookout for Vision model.

\n

To update an existing JSON Line, use the source-ref field to identify the JSON Line. The JSON line\n that you supply replaces the existing JSON line. Any existing annotations that are not in the new JSON line are removed from the dataset.\n

\n \n \n

For more information, see \n Defining JSON lines for anomaly classification in the Amazon Lookout for Vision Developer Guide.

\n \n \n

The images you reference in the source-ref field of a JSON line, must be \n in the same S3 bucket as the existing images in the dataset.

\n
\n \n

Updating a dataset might take a while to complete. To check the current status, call DescribeDataset and\n check the Status field in the response.

\n

This operation requires permissions to perform the\n lookoutvision:UpdateDatasetEntries operation.

", + "smithy.api#documentation": "

Adds or updates one or more JSON Line entries in a dataset. A JSON Line includes information about an image\n used for training or testing an Amazon Lookout for Vision model.

\n

To update an existing JSON Line, use the source-ref field to identify the JSON Line. The JSON line\n that you supply replaces the existing JSON line. Any existing annotations that are not in the new JSON line are removed from the dataset.\n

\n

For more information, see \n Defining JSON lines for anomaly classification in the Amazon Lookout for Vision Developer Guide.

\n \n

The images you reference in the source-ref field of a JSON line, must be \n in the same S3 bucket as the existing images in the dataset.

\n
\n

Updating a dataset might take a while to complete. To check the current status, call DescribeDataset and\n check the Status field in the response.

\n

This operation requires permissions to perform the\n lookoutvision:UpdateDatasetEntries operation.

", "smithy.api#http": { "method": "PATCH", "uri": "/2020-11-20/projects/{ProjectName}/datasets/{DatasetType}/entries", @@ -4265,6 +4405,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.lookoutvision#UpdateDatasetEntriesResponse": { @@ -4276,6 +4419,9 @@ "smithy.api#documentation": "

The status of the dataset update.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.lookoutvision#ValidationException": { diff --git a/codegen/sdk-codegen/aws-models/m2.json b/codegen/sdk-codegen/aws-models/m2.json index fe5f88c9d0d..56674c35a43 100644 --- a/codegen/sdk-codegen/aws-models/m2.json +++ b/codegen/sdk-codegen/aws-models/m2.json @@ -513,52 +513,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -566,13 +570,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -582,224 +595,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://m2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://m2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://m2-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://m2-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://m2.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://m2.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://m2.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://m2.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/machine-learning.json b/codegen/sdk-codegen/aws-models/machine-learning.json index 20f8fb8e701..9a751001301 100644 --- a/codegen/sdk-codegen/aws-models/machine-learning.json +++ b/codegen/sdk-codegen/aws-models/machine-learning.json @@ -82,6 +82,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#AddTagsOutput": { @@ -101,19 +104,22 @@ } }, "traits": { - "smithy.api#documentation": "

Amazon ML returns the following elements.

" + "smithy.api#documentation": "

Amazon ML returns the following elements.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#Algorithm": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The function used to train an MLModel. Training choices supported by Amazon ML include the following:

\n
    \n
  • \n

    \n SGD - Stochastic Gradient Descent.

    \n
  • \n
  • \n

    \n RandomForest - Random forest of decision trees.

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "sgd", - "name": "SGD" + "type": "enum", + "members": { + "SGD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sgd" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

The function used to train an MLModel. Training choices supported by Amazon ML include the following:

\n
    \n
  • \n

    \n SGD - Stochastic Gradient Descent.

    \n
  • \n
  • \n

    \n RandomForest - Random forest of decision trees.

    \n
  • \n
" } }, "com.amazonaws.machinelearning#AmazonML_20141212": { @@ -211,6 +217,7 @@ "arnNamespace": "machinelearning", "cloudFormationName": "MachineLearning", "cloudTrailEventSource": "machinelearning.amazonaws.com", + "docId": "machinelearning-2014-12-12", "endpointPrefix": "machinelearning" }, "aws.auth#sigv4": { @@ -282,52 +289,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -335,13 +346,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -351,224 +371,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://machinelearning-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://machinelearning-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://machinelearning-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://machinelearning-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://machinelearning.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://machinelearning.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://machinelearning.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://machinelearning.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -583,8 +554,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -596,8 +567,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -609,8 +580,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -622,8 +593,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -635,8 +606,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -648,8 +619,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -661,8 +632,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -674,8 +645,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -687,8 +658,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -700,8 +671,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -713,8 +684,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -726,8 +697,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -739,8 +710,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -752,8 +734,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -765,8 +758,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -778,8 +782,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -791,8 +806,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -804,8 +819,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -817,8 +832,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -829,8 +844,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -841,10 +856,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -855,7 +876,7 @@ "type": "string", "traits": { "smithy.api#documentation": "

An Amazon Web Service (AWS) user account identifier. The account identifier can be an AWS root account or an AWS Identity and Access Management (IAM) user.

", - "smithy.api#pattern": "arn:aws:iam::[0-9]+:((user/.+)|(root))" + "smithy.api#pattern": "^arn:aws:iam::[0-9]+:((user/.+)|(root))$" } }, "com.amazonaws.machinelearning#BatchPrediction": { @@ -948,43 +969,59 @@ } }, "com.amazonaws.machinelearning#BatchPredictionFilterVariable": { - "type": "string", - "traits": { - "smithy.api#documentation": "

A list of the variables to use in searching or filtering BatchPrediction.

\n
    \n
  • \n

    \n CreatedAt - Sets the search criteria to BatchPrediction creation date.

    \n
  • \n
  • \n

    \n Status - Sets the search criteria to BatchPrediction status.

    \n
  • \n
  • \n

    \n Name - Sets the search criteria to the contents of BatchPrediction \n Name.

    \n
  • \n
  • \n

    \n IAMUser - Sets the search criteria to the user account that invoked the BatchPrediction creation.

    \n
  • \n
  • \n

    \n MLModelId - Sets the search criteria to the MLModel used in the BatchPrediction.

    \n
  • \n
  • \n

    \n DataSourceId - Sets the search criteria to the DataSource used in the BatchPrediction.

    \n
  • \n
  • \n

    \n DataURI - Sets the search criteria to the data file(s) used in the BatchPrediction. The URL can \n identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "CreatedAt", - "name": "CREATED_AT" - }, - { - "value": "LastUpdatedAt", - "name": "LAST_UPDATED_AT" - }, - { - "value": "Status", - "name": "STATUS" - }, - { - "value": "Name", - "name": "NAME" - }, - { - "value": "IAMUser", - "name": "IAM_USER" - }, - { - "value": "MLModelId", - "name": "ML_MODEL_ID" - }, - { - "value": "DataSourceId", - "name": "DATASOURCE_ID" - }, - { - "value": "DataURI", - "name": "DATA_URI" + "type": "enum", + "members": { + "CREATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreatedAt" + } + }, + "LAST_UPDATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LastUpdatedAt" + } + }, + "STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Status" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Name" + } + }, + "IAM_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IAMUser" + } + }, + "ML_MODEL_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MLModelId" + } + }, + "DATASOURCE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DataSourceId" + } + }, + "DATA_URI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DataURI" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

A list of the variables to use in searching or filtering BatchPrediction.

\n
    \n
  • \n

    \n CreatedAt - Sets the search criteria to BatchPrediction creation date.

    \n
  • \n
  • \n

    \n Status - Sets the search criteria to BatchPrediction status.

    \n
  • \n
  • \n

    \n Name - Sets the search criteria to the contents of BatchPrediction \n Name.

    \n
  • \n
  • \n

    \n IAMUser - Sets the search criteria to the user account that invoked the BatchPrediction creation.

    \n
  • \n
  • \n

    \n MLModelId - Sets the search criteria to the MLModel used in the BatchPrediction.

    \n
  • \n
  • \n

    \n DataSourceId - Sets the search criteria to the DataSource used in the BatchPrediction.

    \n
  • \n
  • \n

    \n DataURI - Sets the search criteria to the data file(s) used in the BatchPrediction. The URL can \n identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

    \n
  • \n
" } }, "com.amazonaws.machinelearning#BatchPredictions": { @@ -1001,7 +1038,7 @@ "min": 0, "max": 1024 }, - "smithy.api#pattern": ".*\\S.*|^$" + "smithy.api#pattern": "\\S.*|^$" } }, "com.amazonaws.machinelearning#ComputeStatistics": { @@ -1070,6 +1107,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#CreateBatchPredictionOutput": { @@ -1083,7 +1123,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateBatchPrediction operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateBatchPrediction operation is asynchronous. You can poll for status updates by using the >GetBatchPrediction \n operation and checking the Status parameter of the result.\n

" + "smithy.api#documentation": "

Represents the output of a CreateBatchPrediction operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateBatchPrediction operation is asynchronous. You can poll for status updates by using the >GetBatchPrediction \n operation and checking the Status parameter of the result.\n

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#CreateDataSourceFromRDS": { @@ -1146,6 +1187,9 @@ "smithy.api#documentation": "

The compute statistics for a DataSource. The statistics are generated from the observation data referenced by \n a DataSource. Amazon ML uses the statistics internally during MLModel training.\n This parameter must be set to true if the DataSource needs to be used for MLModel training.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#CreateDataSourceFromRDSOutput": { @@ -1159,7 +1203,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateDataSourceFromRDS operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateDataSourceFromRDS> operation is asynchronous. You can poll for updates by using\n the GetBatchPrediction operation and checking the Status parameter. You can \n inspect the Message when Status shows up as FAILED. You can\n also check the progress of the copy operation by going to the DataPipeline console and looking up\n the pipeline using the pipelineId from the describe call.

" + "smithy.api#documentation": "

Represents the output of a CreateDataSourceFromRDS operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateDataSourceFromRDS> operation is asynchronous. You can poll for updates by using\n the GetBatchPrediction operation and checking the Status parameter. You can \n inspect the Message when Status shows up as FAILED. You can\n also check the progress of the copy operation by going to the DataPipeline console and looking up\n the pipeline using the pipelineId from the describe call.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#CreateDataSourceFromRedshift": { @@ -1222,6 +1267,9 @@ "smithy.api#documentation": "

The compute statistics for a DataSource. The statistics are generated from the observation data referenced by \n a DataSource. Amazon ML uses the statistics internally during MLModel training.\n This parameter must be set to true if the DataSource needs to\n be used for MLModel training.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#CreateDataSourceFromRedshiftOutput": { @@ -1235,7 +1283,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateDataSourceFromRedshift operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateDataSourceFromRedshift operation is asynchronous. You can poll for updates by using\n the GetBatchPrediction operation and checking the Status parameter.

" + "smithy.api#documentation": "

Represents the output of a CreateDataSourceFromRedshift operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateDataSourceFromRedshift operation is asynchronous. You can poll for updates by using\n the GetBatchPrediction operation and checking the Status parameter.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#CreateDataSourceFromS3": { @@ -1291,6 +1340,9 @@ "smithy.api#documentation": "

The compute statistics for a DataSource. The statistics are generated from the observation data referenced by \n a DataSource. Amazon ML uses the statistics internally during MLModel training.\n This parameter must be set to true if the DataSource needs to be used for MLModel training.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#CreateDataSourceFromS3Output": { @@ -1304,7 +1356,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateDataSourceFromS3 operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateDataSourceFromS3 operation is asynchronous. You can poll for updates by using\n the GetBatchPrediction operation and checking the Status parameter.

" + "smithy.api#documentation": "

Represents the output of a CreateDataSourceFromS3 operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateDataSourceFromS3 operation is asynchronous. You can poll for updates by using\n the GetBatchPrediction operation and checking the Status parameter.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#CreateEvaluation": { @@ -1360,6 +1413,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#CreateEvaluationOutput": { @@ -1373,7 +1429,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateEvaluation operation, and is an acknowledgement that Amazon ML received the request.

\n

\n CreateEvaluation operation is asynchronous. You can poll for status updates\n by using the GetEvcaluation operation \n and checking the Status parameter.\n

" + "smithy.api#documentation": "

Represents the output of a CreateEvaluation operation, and is an acknowledgement that Amazon ML received the request.

\n

\n CreateEvaluation operation is asynchronous. You can poll for status updates\n by using the GetEvcaluation operation \n and checking the Status parameter.\n

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#CreateMLModel": { @@ -1447,6 +1504,9 @@ "smithy.api#documentation": "

The Amazon Simple Storage Service (Amazon S3) location and file name that contains the MLModel recipe. You must specify either the recipe or its URI. If you don't specify a recipe or its URI, Amazon ML creates a default.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#CreateMLModelOutput": { @@ -1460,7 +1520,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a CreateMLModel operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateMLModel operation is asynchronous. You can poll for status updates by using the \n GetMLModel operation and checking the Status parameter.\n

" + "smithy.api#documentation": "

Represents the output of a CreateMLModel operation, and is an acknowledgement that Amazon ML received the request.

\n

The CreateMLModel operation is asynchronous. You can poll for status updates by using the \n GetMLModel operation and checking the Status parameter.\n

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#CreateRealtimeEndpoint": { @@ -1496,6 +1557,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#CreateRealtimeEndpointOutput": { @@ -1515,7 +1579,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of an CreateRealtimeEndpoint operation.

\n

The result contains the MLModelId and the endpoint information for the MLModel.

\n

\n Note: The endpoint information includes the URI of the MLModel; that is, the location to send online prediction requests for the specified MLModel.

" + "smithy.api#documentation": "

Represents the output of an CreateRealtimeEndpoint operation.

\n

The result contains the MLModelId and the endpoint information for the MLModel.

\n

\n Note: The endpoint information includes the URI of the MLModel; that is, the location to send online prediction requests for the specified MLModel.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DataRearrangement": { @@ -1631,35 +1696,47 @@ } }, "com.amazonaws.machinelearning#DataSourceFilterVariable": { - "type": "string", - "traits": { - "smithy.api#documentation": "

A list of the variables to use in searching or filtering DataSource.

\n
    \n
  • \n

    \n CreatedAt - Sets the search criteria to DataSource creation date.

    \n
  • \n
  • \n

    \n Status - Sets the search criteria to DataSource status.

    \n
  • \n
  • \n

    \n Name - Sets the search criteria to the contents of DataSource \n Name.

    \n
  • \n
  • \n

    \n DataUri - Sets the search criteria to the URI of data files used to create the DataSource. The URI can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

    \n
  • \n
  • \n

    \n IAMUser - Sets the search criteria to the user account that invoked the DataSource creation.

    \n
  • \n
\n \n

\n Note: \n The variable names should match the variable names in the DataSource.

", - "smithy.api#enum": [ - { - "value": "CreatedAt", - "name": "CREATED_AT" - }, - { - "value": "LastUpdatedAt", - "name": "LAST_UPDATED_AT" - }, - { - "value": "Status", - "name": "STATUS" - }, - { - "value": "Name", - "name": "NAME" - }, - { - "value": "DataLocationS3", - "name": "DATA_URI" - }, - { - "value": "IAMUser", - "name": "IAM_USER" + "type": "enum", + "members": { + "CREATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreatedAt" + } + }, + "LAST_UPDATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LastUpdatedAt" + } + }, + "STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Status" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Name" + } + }, + "DATA_URI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DataLocationS3" } - ] + }, + "IAM_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IAMUser" + } + } + }, + "traits": { + "smithy.api#documentation": "

A list of the variables to use in searching or filtering DataSource.

\n
    \n
  • \n

    \n CreatedAt - Sets the search criteria to DataSource creation date.

    \n
  • \n
  • \n

    \n Status - Sets the search criteria to DataSource status.

    \n
  • \n
  • \n

    \n Name - Sets the search criteria to the contents of DataSource \n Name.

    \n
  • \n
  • \n

    \n DataUri - Sets the search criteria to the URI of data files used to create the DataSource. The URI can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

    \n
  • \n
  • \n

    \n IAMUser - Sets the search criteria to the user account that invoked the DataSource creation.

    \n
  • \n
\n \n

\n Note: \n The variable names should match the variable names in the DataSource.

" } }, "com.amazonaws.machinelearning#DataSources": { @@ -1701,6 +1778,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DeleteBatchPredictionOutput": { @@ -1714,7 +1794,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DeleteBatchPrediction operation.

\n

You can use the GetBatchPrediction operation and check the value of the Status parameter to see whether a \n BatchPrediction is marked as DELETED.

" + "smithy.api#documentation": "

Represents the output of a DeleteBatchPrediction operation.

\n

You can use the GetBatchPrediction operation and check the value of the Status parameter to see whether a \n BatchPrediction is marked as DELETED.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DeleteDataSource": { @@ -1750,6 +1831,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DeleteDataSourceOutput": { @@ -1763,7 +1847,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DeleteDataSource operation.

" + "smithy.api#documentation": "

Represents the output of a DeleteDataSource operation.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DeleteEvaluation": { @@ -1799,6 +1884,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DeleteEvaluationOutput": { @@ -1812,7 +1900,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DeleteEvaluation operation. The output indicates that Amazon Machine Learning (Amazon ML) received the request.

\n

You can use the GetEvaluation operation and check the value of the Status parameter to see whether an \n Evaluation is marked as DELETED.

" + "smithy.api#documentation": "

Represents the output of a DeleteEvaluation operation. The output indicates that Amazon Machine Learning (Amazon ML) received the request.

\n

You can use the GetEvaluation operation and check the value of the Status parameter to see whether an \n Evaluation is marked as DELETED.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DeleteMLModel": { @@ -1848,6 +1937,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DeleteMLModelOutput": { @@ -1861,7 +1953,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DeleteMLModel operation.

\n

You can use the GetMLModel operation and check the value of the Status parameter to see whether an \n MLModel is marked as DELETED.

" + "smithy.api#documentation": "

Represents the output of a DeleteMLModel operation.

\n

You can use the GetMLModel operation and check the value of the Status parameter to see whether an \n MLModel is marked as DELETED.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DeleteRealtimeEndpoint": { @@ -1897,6 +1990,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DeleteRealtimeEndpointOutput": { @@ -1916,7 +2012,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of an DeleteRealtimeEndpoint operation.

\n

The result contains the MLModelId and the endpoint information for the MLModel.

" + "smithy.api#documentation": "

Represents the output of an DeleteRealtimeEndpoint operation.

\n

The result contains the MLModelId and the endpoint information for the MLModel.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DeleteTags": { @@ -1969,6 +2066,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DeleteTagsOutput": { @@ -1988,7 +2088,8 @@ } }, "traits": { - "smithy.api#documentation": "

Amazon ML returns the following elements.

" + "smithy.api#documentation": "

Amazon ML returns the following elements.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DescribeBatchPredictions": { @@ -2113,6 +2214,9 @@ "smithy.api#documentation": "

The number of pages of information to include in the result. The range of acceptable values is 1 through 100. The default value is 100.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DescribeBatchPredictionsOutput": { @@ -2132,7 +2236,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeBatchPredictions operation. The content is essentially a list of BatchPredictions.

" + "smithy.api#documentation": "

Represents the output of a DescribeBatchPredictions operation. The content is essentially a list of BatchPredictions.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DescribeDataSources": { @@ -2257,6 +2362,9 @@ "smithy.api#documentation": "

The maximum number of DataSource to include in the result.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DescribeDataSourcesOutput": { @@ -2276,7 +2384,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the query results from a DescribeDataSources operation. The content is essentially a list of DataSource.

" + "smithy.api#documentation": "

Represents the query results from a DescribeDataSources operation. The content is essentially a list of DataSource.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DescribeEvaluations": { @@ -2401,6 +2510,9 @@ "smithy.api#documentation": "

The maximum number of Evaluation to include in the result.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DescribeEvaluationsOutput": { @@ -2420,7 +2532,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the query results from a DescribeEvaluations operation. The content is essentially a list of Evaluation.

" + "smithy.api#documentation": "

Represents the query results from a DescribeEvaluations operation. The content is essentially a list of Evaluation.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DescribeMLModels": { @@ -2545,6 +2658,9 @@ "smithy.api#documentation": "

The number of pages of information to include in the result. The range of acceptable values is 1 through 100. The default value is 100.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DescribeMLModelsOutput": { @@ -2564,7 +2680,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a DescribeMLModels operation. The content is essentially a list of MLModel.

" + "smithy.api#documentation": "

Represents the output of a DescribeMLModels operation. The content is essentially a list of MLModel.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DescribeTags": { @@ -2607,6 +2724,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#DescribeTagsOutput": { @@ -2632,23 +2752,28 @@ } }, "traits": { - "smithy.api#documentation": "

Amazon ML returns the following elements.

" + "smithy.api#documentation": "

Amazon ML returns the following elements.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#DetailsAttributes": { - "type": "string", - "traits": { - "smithy.api#documentation": "

Contains the key values of DetailsMap:

\n
    \n
  • \n

    \n PredictiveModelType - Indicates the type of the MLModel.

    \n
  • \n
  • \n

    \n Algorithm - Indicates the algorithm that was used for the MLModel.

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "PredictiveModelType", - "name": "PREDICTIVE_MODEL_TYPE" - }, - { - "value": "Algorithm", - "name": "ALGORITHM" + "type": "enum", + "members": { + "PREDICTIVE_MODEL_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PredictiveModelType" + } + }, + "ALGORITHM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Algorithm" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

Contains the key values of DetailsMap:

\n
    \n
  • \n

    \n PredictiveModelType - Indicates the type of the MLModel.

    \n
  • \n
  • \n

    \n Algorithm - Indicates the algorithm that was used for the MLModel.

    \n
  • \n
" } }, "com.amazonaws.machinelearning#DetailsMap": { @@ -2729,7 +2854,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[a-zA-Z0-9_.-]+" + "smithy.api#pattern": "^[a-zA-Z0-9_.-]+$" } }, "com.amazonaws.machinelearning#EntityName": { @@ -2740,35 +2865,45 @@ "min": 0, "max": 1024 }, - "smithy.api#pattern": ".*\\S.*|^$" + "smithy.api#pattern": "\\S.*|^$" } }, "com.amazonaws.machinelearning#EntityStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "

Object status with the following possible values:

\n
    \n
  • \n

    \n PENDING\n

    \n
  • \n
  • \n

    \n INPROGRESS\n

    \n
  • \n
  • \n

    \n FAILED\n

    \n
  • \n
  • \n

    \n COMPLETED\n

    \n
  • \n
  • \n

    \n DELETED\n

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "PENDING" - }, - { - "value": "INPROGRESS", - "name": "INPROGRESS" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" - }, - { - "value": "DELETED", - "name": "DELETED" + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "INPROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INPROGRESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" } - ] + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED" + } + } + }, + "traits": { + "smithy.api#documentation": "

Object status with the following possible values:

\n
    \n
  • \n

    \n PENDING\n

    \n
  • \n
  • \n

    \n INPROGRESS\n

    \n
  • \n
  • \n

    \n FAILED\n

    \n
  • \n
  • \n

    \n COMPLETED\n

    \n
  • \n
  • \n

    \n DELETED\n

    \n
  • \n
" } }, "com.amazonaws.machinelearning#EpochTime": { @@ -2876,43 +3011,59 @@ } }, "com.amazonaws.machinelearning#EvaluationFilterVariable": { - "type": "string", - "traits": { - "smithy.api#documentation": "

A list of the variables to use in searching or filtering Evaluation.

\n
    \n
  • \n

    \n CreatedAt - Sets the search criteria to Evaluation creation date.

    \n
  • \n
  • \n

    \n Status - Sets the search criteria to Evaluation status.

    \n
  • \n
  • \n

    \n Name - Sets the search criteria to the contents of Evaluation \n \n Name.

    \n
  • \n
  • \n

    \n IAMUser - Sets the search criteria to the user account that invoked an evaluation.

    \n
  • \n
  • \n

    \n MLModelId - Sets the search criteria to the Predictor that was evaluated.

    \n
  • \n
  • \n

    \n DataSourceId - Sets the search criteria to the DataSource used in evaluation.

    \n
  • \n
  • \n

    \n DataUri - Sets the search criteria to the data file(s) used in evaluation. The URL can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "CreatedAt", - "name": "CREATED_AT" - }, - { - "value": "LastUpdatedAt", - "name": "LAST_UPDATED_AT" - }, - { - "value": "Status", - "name": "STATUS" - }, - { - "value": "Name", - "name": "NAME" - }, - { - "value": "IAMUser", - "name": "IAM_USER" - }, - { - "value": "MLModelId", - "name": "ML_MODEL_ID" - }, - { - "value": "DataSourceId", - "name": "DATASOURCE_ID" - }, - { - "value": "DataURI", - "name": "DATA_URI" + "type": "enum", + "members": { + "CREATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreatedAt" + } + }, + "LAST_UPDATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LastUpdatedAt" + } + }, + "STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Status" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Name" + } + }, + "IAM_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IAMUser" + } + }, + "ML_MODEL_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MLModelId" } - ] + }, + "DATASOURCE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DataSourceId" + } + }, + "DATA_URI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DataURI" + } + } + }, + "traits": { + "smithy.api#documentation": "

A list of the variables to use in searching or filtering Evaluation.

\n
    \n
  • \n

    \n CreatedAt - Sets the search criteria to Evaluation creation date.

    \n
  • \n
  • \n

    \n Status - Sets the search criteria to Evaluation status.

    \n
  • \n
  • \n

    \n Name - Sets the search criteria to the contents of Evaluation \n \n Name.

    \n
  • \n
  • \n

    \n IAMUser - Sets the search criteria to the user account that invoked an evaluation.

    \n
  • \n
  • \n

    \n MLModelId - Sets the search criteria to the Predictor that was evaluated.

    \n
  • \n
  • \n

    \n DataSourceId - Sets the search criteria to the DataSource used in evaluation.

    \n
  • \n
  • \n

    \n DataUri - Sets the search criteria to the data file(s) used in evaluation. The URL can identify either a file or an Amazon Simple Storage Service (Amazon S3) bucket or directory.

    \n
  • \n
" } }, "com.amazonaws.machinelearning#Evaluations": { @@ -2954,6 +3105,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#GetBatchPredictionOutput": { @@ -3063,7 +3217,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetBatchPrediction operation and describes a BatchPrediction.

" + "smithy.api#documentation": "

Represents the output of a GetBatchPrediction operation and describes a BatchPrediction.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#GetDataSource": { @@ -3106,6 +3261,9 @@ "smithy.api#documentation": "

Specifies whether the GetDataSource operation should return DataSourceSchema.

\n

If true, DataSourceSchema is returned.

\n

If false, DataSourceSchema is not returned.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#GetDataSourceOutput": { @@ -3225,7 +3383,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetDataSource operation and describes a DataSource.

" + "smithy.api#documentation": "

Represents the output of a GetDataSource operation and describes a DataSource.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#GetEvaluation": { @@ -3261,6 +3420,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#GetEvaluationOutput": { @@ -3358,7 +3520,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetEvaluation operation and describes an Evaluation.

" + "smithy.api#documentation": "

Represents the output of a GetEvaluation operation and describes an Evaluation.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#GetMLModel": { @@ -3401,6 +3564,9 @@ "smithy.api#documentation": "

Specifies whether the GetMLModel operation should return Recipe.

\n

If true, Recipe is returned.

\n

If false, Recipe is not returned.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#GetMLModelOutput": { @@ -3531,7 +3697,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of a GetMLModel operation, and provides detailed information about a MLModel.

" + "smithy.api#documentation": "

Represents the output of a GetMLModel operation, and provides detailed information about a MLModel.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#IdempotentParameterMismatchException": { @@ -3750,50 +3917,68 @@ } }, "com.amazonaws.machinelearning#MLModelFilterVariable": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CreatedAt", - "name": "CREATED_AT" - }, - { - "value": "LastUpdatedAt", - "name": "LAST_UPDATED_AT" - }, - { - "value": "Status", - "name": "STATUS" - }, - { - "value": "Name", - "name": "NAME" - }, - { - "value": "IAMUser", - "name": "IAM_USER" - }, - { - "value": "TrainingDataSourceId", - "name": "TRAINING_DATASOURCE_ID" - }, - { - "value": "RealtimeEndpointStatus", - "name": "REAL_TIME_ENDPOINT_STATUS" - }, - { - "value": "MLModelType", - "name": "ML_MODEL_TYPE" - }, - { - "value": "Algorithm", - "name": "ALGORITHM" - }, - { - "value": "TrainingDataURI", - "name": "TRAINING_DATA_URI" + "type": "enum", + "members": { + "CREATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreatedAt" + } + }, + "LAST_UPDATED_AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LastUpdatedAt" + } + }, + "STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Status" + } + }, + "NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Name" + } + }, + "IAM_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IAMUser" + } + }, + "TRAINING_DATASOURCE_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TrainingDataSourceId" + } + }, + "REAL_TIME_ENDPOINT_STATUS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RealtimeEndpointStatus" } - ] + }, + "ML_MODEL_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MLModelType" + } + }, + "ALGORITHM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Algorithm" + } + }, + "TRAINING_DATA_URI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TrainingDataURI" + } + } } }, "com.amazonaws.machinelearning#MLModelName": { @@ -3806,22 +3991,26 @@ } }, "com.amazonaws.machinelearning#MLModelType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "REGRESSION", - "name": "REGRESSION" - }, - { - "value": "BINARY", - "name": "BINARY" - }, - { - "value": "MULTICLASS", - "name": "MULTICLASS" + "type": "enum", + "members": { + "REGRESSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REGRESSION" } - ] + }, + "BINARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BINARY" + } + }, + "MULTICLASS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MULTICLASS" + } + } } }, "com.amazonaws.machinelearning#MLModels": { @@ -3926,6 +4115,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#PredictOutput": { @@ -3934,6 +4126,9 @@ "Prediction": { "target": "com.amazonaws.machinelearning#Prediction" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#Prediction": { @@ -4139,7 +4334,7 @@ "min": 1, "max": 63 }, - "smithy.api#pattern": "[a-z0-9-]+" + "smithy.api#pattern": "^[a-z0-9-]+$" } }, "com.amazonaws.machinelearning#RDSMetadata": { @@ -4227,26 +4422,32 @@ } }, "com.amazonaws.machinelearning#RealtimeEndpointStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "READY", - "name": "READY" - }, - { - "value": "UPDATING", - "name": "UPDATING" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" } - ] + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } } }, "com.amazonaws.machinelearning#Recipe": { @@ -4278,7 +4479,7 @@ "min": 1, "max": 63 }, - "smithy.api#pattern": "[a-z0-9-]+" + "smithy.api#pattern": "^[a-z0-9-]+$" } }, "com.amazonaws.machinelearning#RedshiftDataSpec": { @@ -4383,7 +4584,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[a-z0-9]+" + "smithy.api#pattern": "^[a-z0-9]+$" } }, "com.amazonaws.machinelearning#RedshiftDatabasePassword": { @@ -4506,7 +4707,7 @@ "min": 0, "max": 2048 }, - "smithy.api#pattern": "s3://([^/]+)(/.*)?" + "smithy.api#pattern": "^s3://([^/]+)(/.*)?$" } }, "com.amazonaws.machinelearning#ScoreThreshold": { @@ -4531,19 +4732,23 @@ } }, "com.amazonaws.machinelearning#SortOrder": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The sort order specified in a listing condition. Possible values include the following:

\n
    \n
  • \n

    \n asc - Present the information in ascending order (from A-Z).

    \n
  • \n
  • \n

    \n dsc - Present the information in descending order (from Z-A).

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "asc", - "name": "ASC" - }, - { - "value": "dsc", - "name": "DSC" + "type": "enum", + "members": { + "ASC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "asc" + } + }, + "DSC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "dsc" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

The sort order specified in a listing condition. Possible values include the following:

\n
    \n
  • \n

    \n asc - Present the information in ascending order (from A-Z).

    \n
  • \n
  • \n

    \n dsc - Present the information in descending order (from Z-A).

    \n
  • \n
" } }, "com.amazonaws.machinelearning#StringType": { @@ -4628,26 +4833,32 @@ } }, "com.amazonaws.machinelearning#TaggableResourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BatchPrediction", - "name": "BATCH_PREDICTION" - }, - { - "value": "DataSource", - "name": "DATASOURCE" - }, - { - "value": "Evaluation", - "name": "EVALUATION" - }, - { - "value": "MLModel", - "name": "ML_MODEL" + "type": "enum", + "members": { + "BATCH_PREDICTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BatchPrediction" + } + }, + "DATASOURCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DataSource" + } + }, + "EVALUATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Evaluation" } - ] + }, + "ML_MODEL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MLModel" + } + } } }, "com.amazonaws.machinelearning#TrainingParameters": { @@ -4699,6 +4910,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#UpdateBatchPredictionOutput": { @@ -4712,7 +4926,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of an UpdateBatchPrediction operation.

\n

You can see the updated content by using the GetBatchPrediction operation.

" + "smithy.api#documentation": "

Represents the output of an UpdateBatchPrediction operation.

\n

You can see the updated content by using the GetBatchPrediction operation.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#UpdateDataSource": { @@ -4755,6 +4970,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#UpdateDataSourceOutput": { @@ -4768,7 +4986,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of an UpdateDataSource operation.

\n

You can see the updated content by using the GetBatchPrediction operation.

" + "smithy.api#documentation": "

Represents the output of an UpdateDataSource operation.

\n

You can see the updated content by using the GetBatchPrediction operation.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#UpdateEvaluation": { @@ -4811,6 +5030,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#UpdateEvaluationOutput": { @@ -4824,7 +5046,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of an UpdateEvaluation operation.

\n

You can see the updated content by using the GetEvaluation operation.

" + "smithy.api#documentation": "

Represents the output of an UpdateEvaluation operation.

\n

You can see the updated content by using the GetEvaluation operation.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#UpdateMLModel": { @@ -4872,6 +5095,9 @@ "smithy.api#documentation": "

The ScoreThreshold used in binary classification MLModel that marks the boundary between a positive prediction and a negative prediction.

\n

Output values greater than or equal to the ScoreThreshold receive a positive result from the MLModel, such as true. Output values less than the ScoreThreshold receive a negative response from the MLModel, such as false.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.machinelearning#UpdateMLModelOutput": { @@ -4885,7 +5111,8 @@ } }, "traits": { - "smithy.api#documentation": "

Represents the output of an UpdateMLModel operation.

\n

You can see the updated content by using the GetMLModel operation.

" + "smithy.api#documentation": "

Represents the output of an UpdateMLModel operation.

\n

You can see the updated content by using the GetMLModel operation.

", + "smithy.api#output": {} } }, "com.amazonaws.machinelearning#VariableName": { @@ -4914,7 +5141,7 @@ "min": 0, "max": 2048 }, - "smithy.api#pattern": "https://[a-zA-Z0-9-.]*\\.amazon(aws)?\\.com[/]?" + "smithy.api#pattern": "^https://[a-zA-Z0-9-.]*\\.amazon(aws)?\\.com[/]?$" } }, "com.amazonaws.machinelearning#floatLabel": { diff --git a/codegen/sdk-codegen/aws-models/macie.json b/codegen/sdk-codegen/aws-models/macie.json index b5ba29ea6d8..47ddbcfca1f 100644 --- a/codegen/sdk-codegen/aws-models/macie.json +++ b/codegen/sdk-codegen/aws-models/macie.json @@ -83,6 +83,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.macie#AssociateS3Resources": { @@ -127,6 +130,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.macie#AssociateS3ResourcesResult": { @@ -138,6 +144,9 @@ "smithy.api#documentation": "

(Discontinued) S3 resources that couldn't be associated with Amazon Macie Classic. An\n error code and an error message are provided for each failed item.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.macie#BucketName": { @@ -221,6 +230,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.macie#DisassociateS3Resources": { @@ -262,6 +274,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.macie#DisassociateS3ResourcesResult": { @@ -273,6 +288,9 @@ "smithy.api#documentation": "

(Discontinued) S3 resources that couldn't be removed from being monitored and\n classified by Amazon Macie Classic. An error code and an error message are provided for each\n failed item.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.macie#ErrorCode": { @@ -427,6 +445,9 @@ "smithy.api#documentation": "

(Discontinued) Use this parameter to indicate the maximum number of items that you want\n in the response. The default value is 250.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.macie#ListMemberAccountsResult": { @@ -444,6 +465,9 @@ "smithy.api#documentation": "

(Discontinued) When a response is generated, if there is more data to be listed, this\n parameter is present in the response and contains the value to use for the nextToken parameter\n in a subsequent pagination request. If there is no more data to be listed, this parameter is\n set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.macie#ListS3Resources": { @@ -495,6 +519,9 @@ "smithy.api#documentation": "

(Discontinued) Use this parameter to indicate the maximum number of items that you want\n in the response. The default value is 250.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.macie#ListS3ResourcesResult": { @@ -512,6 +539,9 @@ "smithy.api#documentation": "

(Discontinued) When a response is generated, if there is more data to be listed, this\n parameter is present in the response and contains the value to use for the nextToken parameter\n in a subsequent pagination request. If there is no more data to be listed, this parameter is\n set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.macie#MacieService": { @@ -552,7 +582,7 @@ "name": "macie" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Amazon Macie Classic\n

Amazon Macie Classic has been discontinued and is no longer available.

\n \n

A new Amazon Macie is now available with significant design improvements and additional\n features, at a lower price and in most Amazon Web Services Regions. We encourage you to take advantage of the\n new and improved features, and benefit from the reduced cost. To learn about features and pricing for the new Macie, see Amazon Macie. To learn how to use the new Macie, see the Amazon Macie User\n Guide.

", + "smithy.api#documentation": "Amazon Macie Classic\n

Amazon Macie Classic has been discontinued and is no longer available.

\n

A new Amazon Macie is now available with significant design improvements and additional\n features, at a lower price and in most Amazon Web Services Regions. We encourage you to take advantage of the\n new and improved features, and benefit from the reduced cost. To learn about features and pricing for the new Macie, see Amazon Macie. To learn how to use the new Macie, see the Amazon Macie User\n Guide.

", "smithy.api#title": "Amazon Macie", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -614,52 +644,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -667,13 +701,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -683,224 +726,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://macie-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://macie-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://macie-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://macie-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://macie.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://macie.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://macie.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://macie.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -915,8 +909,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -928,8 +922,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -941,8 +935,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -954,8 +948,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -967,8 +961,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -980,8 +974,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -993,8 +987,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1006,8 +1000,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1019,8 +1013,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1032,8 +1026,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1045,8 +1039,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1058,8 +1052,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1071,8 +1065,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1084,8 +1078,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1097,8 +1102,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1110,8 +1126,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1123,8 +1150,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1136,8 +1174,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1149,8 +1187,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1162,8 +1200,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1174,8 +1212,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1186,10 +1224,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1253,29 +1297,31 @@ } }, "com.amazonaws.macie#S3ContinuousClassificationType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "FULL", - "name": "FULL" + "type": "enum", + "members": { + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL" } - ] + } } }, "com.amazonaws.macie#S3OneTimeClassificationType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "FULL", - "name": "FULL" - }, - { - "value": "NONE", - "name": "NONE" + "type": "enum", + "members": { + "FULL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FULL" } - ] + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + } } }, "com.amazonaws.macie#S3Resource": { @@ -1412,6 +1458,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.macie#UpdateS3ResourcesResult": { @@ -1423,6 +1472,9 @@ "smithy.api#documentation": "

(Discontinued) The S3 resources whose classification types can't be updated. An error\n code and an error message are provided for each failed item.

" } } + }, + "traits": { + "smithy.api#output": {} } } } diff --git a/codegen/sdk-codegen/aws-models/macie2.json b/codegen/sdk-codegen/aws-models/macie2.json index 63ec5f70d31..a199bca8a3b 100644 --- a/codegen/sdk-codegen/aws-models/macie2.json +++ b/codegen/sdk-codegen/aws-models/macie2.json @@ -8886,52 +8886,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -8939,13 +8943,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -8955,224 +8968,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://macie2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://macie2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://macie2-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://macie2-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://macie2.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://macie2.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://macie2.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://macie2.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/managedblockchain.json b/codegen/sdk-codegen/aws-models/managedblockchain.json index fd9b3e330c3..3f1caebf716 100644 --- a/codegen/sdk-codegen/aws-models/managedblockchain.json +++ b/codegen/sdk-codegen/aws-models/managedblockchain.json @@ -3911,52 +3911,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3964,13 +3968,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3980,224 +3993,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://managedblockchain-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://managedblockchain-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://managedblockchain-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://managedblockchain-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://managedblockchain.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://managedblockchain.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://managedblockchain.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://managedblockchain.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/marketplace-catalog.json b/codegen/sdk-codegen/aws-models/marketplace-catalog.json index 27b1ffb7277..ca72e87c52c 100644 --- a/codegen/sdk-codegen/aws-models/marketplace-catalog.json +++ b/codegen/sdk-codegen/aws-models/marketplace-catalog.json @@ -154,52 +154,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -207,13 +211,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -223,224 +236,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://catalog.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://catalog.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://catalog.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://catalog.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://catalog.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://catalog.marketplace.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://catalog.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://catalog.marketplace.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/marketplace-commerce-analytics.json b/codegen/sdk-codegen/aws-models/marketplace-commerce-analytics.json index 3d782d299a5..994e17cce26 100644 --- a/codegen/sdk-codegen/aws-models/marketplace-commerce-analytics.json +++ b/codegen/sdk-codegen/aws-models/marketplace-commerce-analytics.json @@ -51,110 +51,160 @@ "type": "string" }, "com.amazonaws.marketplacecommerceanalytics#DataSetType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "customer_subscriber_hourly_monthly_subscriptions", - "name": "CUSTOMER_SUBSCRIBER_HOURLY_MONTHLY_SUBSCRIPTIONS" - }, - { - "value": "customer_subscriber_annual_subscriptions", - "name": "CUSTOMER_SUBSCRIBER_ANNUAL_SUBSCRIPTIONS" - }, - { - "value": "daily_business_usage_by_instance_type", - "name": "DAILY_BUSINESS_USAGE_BY_INSTANCE_TYPE" - }, - { - "value": "daily_business_fees", - "name": "DAILY_BUSINESS_FEES" - }, - { - "value": "daily_business_free_trial_conversions", - "name": "DAILY_BUSINESS_FREE_TRIAL_CONVERSIONS" - }, - { - "value": "daily_business_new_instances", - "name": "DAILY_BUSINESS_NEW_INSTANCES" - }, - { - "value": "daily_business_new_product_subscribers", - "name": "DAILY_BUSINESS_NEW_PRODUCT_SUBSCRIBERS" - }, - { - "value": "daily_business_canceled_product_subscribers", - "name": "DAILY_BUSINESS_CANCELED_PRODUCT_SUBSCRIBERS" - }, - { - "value": "monthly_revenue_billing_and_revenue_data", - "name": "MONTHLY_REVENUE_BILLING_AND_REVENUE_DATA" - }, - { - "value": "monthly_revenue_annual_subscriptions", - "name": "MONTHLY_REVENUE_ANNUAL_SUBSCRIPTIONS" - }, - { - "value": "monthly_revenue_field_demonstration_usage", - "name": "MONTHLY_REVENUE_FIELD_DEMONSTRATION_USAGE" - }, - { - "value": "monthly_revenue_flexible_payment_schedule", - "name": "MONTHLY_REVENUE_FLEXIBLE_PAYMENT_SCHEDULE" - }, - { - "value": "disbursed_amount_by_product", - "name": "DISBURSED_AMOUNT_BY_PRODUCT" - }, - { - "value": "disbursed_amount_by_product_with_uncollected_funds", - "name": "DISBURSED_AMOUNT_BY_PRODUCT_WITH_UNCOLLECTED_FUNDS" - }, - { - "value": "disbursed_amount_by_instance_hours", - "name": "DISBURSED_AMOUNT_BY_INSTANCE_HOURS" - }, - { - "value": "disbursed_amount_by_customer_geo", - "name": "DISBURSED_AMOUNT_BY_CUSTOMER_GEO" - }, - { - "value": "disbursed_amount_by_age_of_uncollected_funds", - "name": "DISBURSED_AMOUNT_BY_AGE_OF_UNCOLLECTED_FUNDS" - }, - { - "value": "disbursed_amount_by_age_of_disbursed_funds", - "name": "DISBURSED_AMOUNT_BY_AGE_OF_DISBURSED_FUNDS" - }, - { - "value": "disbursed_amount_by_age_of_past_due_funds", - "name": "DISBURSED_AMOUNT_BY_AGE_OF_PAST_DUE_FUNDS" - }, - { - "value": "disbursed_amount_by_uncollected_funds_breakdown", - "name": "DISBURSED_AMOUNT_BY_UNCOLLECTED_FUNDS_BREAKDOWN" - }, - { - "value": "customer_profile_by_industry", - "name": "CUSTOMER_PROFILE_BY_INDUSTRY" - }, - { - "value": "customer_profile_by_revenue", - "name": "CUSTOMER_PROFILE_BY_REVENUE" - }, - { - "value": "customer_profile_by_geography", - "name": "CUSTOMER_PROFILE_BY_GEOGRAPHY" - }, - { - "value": "sales_compensation_billed_revenue", - "name": "SALES_COMPENSATION_BILLED_REVENUE" - }, - { - "value": "us_sales_and_use_tax_records", - "name": "US_SALES_AND_USE_TAX_RECORDS" + "type": "enum", + "members": { + "CUSTOMER_SUBSCRIBER_HOURLY_MONTHLY_SUBSCRIPTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "customer_subscriber_hourly_monthly_subscriptions" + } + }, + "CUSTOMER_SUBSCRIBER_ANNUAL_SUBSCRIPTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "customer_subscriber_annual_subscriptions" + } + }, + "DAILY_BUSINESS_USAGE_BY_INSTANCE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily_business_usage_by_instance_type" + } + }, + "DAILY_BUSINESS_FEES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily_business_fees" + } + }, + "DAILY_BUSINESS_FREE_TRIAL_CONVERSIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily_business_free_trial_conversions" + } + }, + "DAILY_BUSINESS_NEW_INSTANCES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily_business_new_instances" + } + }, + "DAILY_BUSINESS_NEW_PRODUCT_SUBSCRIBERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily_business_new_product_subscribers" + } + }, + "DAILY_BUSINESS_CANCELED_PRODUCT_SUBSCRIBERS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "daily_business_canceled_product_subscribers" + } + }, + "MONTHLY_REVENUE_BILLING_AND_REVENUE_DATA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly_revenue_billing_and_revenue_data" + } + }, + "MONTHLY_REVENUE_ANNUAL_SUBSCRIPTIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly_revenue_annual_subscriptions" + } + }, + "MONTHLY_REVENUE_FIELD_DEMONSTRATION_USAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly_revenue_field_demonstration_usage" + } + }, + "MONTHLY_REVENUE_FLEXIBLE_PAYMENT_SCHEDULE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "monthly_revenue_flexible_payment_schedule" + } + }, + "DISBURSED_AMOUNT_BY_PRODUCT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disbursed_amount_by_product" + } + }, + "DISBURSED_AMOUNT_BY_PRODUCT_WITH_UNCOLLECTED_FUNDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disbursed_amount_by_product_with_uncollected_funds" + } + }, + "DISBURSED_AMOUNT_BY_INSTANCE_HOURS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disbursed_amount_by_instance_hours" + } + }, + "DISBURSED_AMOUNT_BY_CUSTOMER_GEO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disbursed_amount_by_customer_geo" + } + }, + "DISBURSED_AMOUNT_BY_AGE_OF_UNCOLLECTED_FUNDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disbursed_amount_by_age_of_uncollected_funds" + } + }, + "DISBURSED_AMOUNT_BY_AGE_OF_DISBURSED_FUNDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disbursed_amount_by_age_of_disbursed_funds" + } + }, + "DISBURSED_AMOUNT_BY_AGE_OF_PAST_DUE_FUNDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disbursed_amount_by_age_of_past_due_funds" + } + }, + "DISBURSED_AMOUNT_BY_UNCOLLECTED_FUNDS_BREAKDOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "disbursed_amount_by_uncollected_funds_breakdown" + } + }, + "CUSTOMER_PROFILE_BY_INDUSTRY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "customer_profile_by_industry" + } + }, + "CUSTOMER_PROFILE_BY_REVENUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "customer_profile_by_revenue" + } + }, + "CUSTOMER_PROFILE_BY_GEOGRAPHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "customer_profile_by_geography" } - ], + }, + "SALES_COMPENSATION_BILLED_REVENUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sales_compensation_billed_revenue" + } + }, + "US_SALES_AND_USE_TAX_RECORDS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "us_sales_and_use_tax_records" + } + } + }, + "traits": { "smithy.api#length": { "min": 1, "max": 255 @@ -247,7 +297,8 @@ } }, "traits": { - "smithy.api#documentation": "Container for the parameters to the GenerateDataSet operation." + "smithy.api#documentation": "Container for the parameters to the GenerateDataSet operation.", + "smithy.api#input": {} } }, "com.amazonaws.marketplacecommerceanalytics#GenerateDataSetResult": { @@ -261,7 +312,8 @@ } }, "traits": { - "smithy.api#documentation": "Container for the result of the GenerateDataSet operation." + "smithy.api#documentation": "Container for the result of the GenerateDataSet operation.", + "smithy.api#output": {} } }, "com.amazonaws.marketplacecommerceanalytics#MarketplaceCommerceAnalytics20150701": { @@ -281,6 +333,7 @@ "arnNamespace": "marketplacecommerceanalytics", "cloudFormationName": "MarketplaceCommerceAnalytics", "cloudTrailEventSource": "marketplacecommerceanalytics.amazonaws.com", + "docId": "marketplacecommerceanalytics-2015-07-01", "endpointPrefix": "marketplacecommerceanalytics" }, "aws.auth#sigv4": { @@ -349,52 +402,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -402,13 +459,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -418,224 +484,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://marketplacecommerceanalytics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://marketplacecommerceanalytics-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://marketplacecommerceanalytics-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://marketplacecommerceanalytics.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://marketplacecommerceanalytics.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://marketplacecommerceanalytics.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://marketplacecommerceanalytics.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -650,8 +667,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -663,8 +680,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -676,8 +693,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -689,8 +706,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -702,8 +719,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -715,8 +732,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -728,8 +745,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -741,8 +758,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -754,8 +771,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -767,8 +784,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -780,8 +797,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -793,8 +810,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -806,8 +834,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -819,8 +858,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -832,8 +882,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -845,8 +906,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -858,8 +919,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -871,8 +932,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -883,8 +944,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -895,10 +956,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1023,7 +1090,8 @@ } }, "traits": { - "smithy.api#documentation": "Container for the parameters to the StartSupportDataExport operation." + "smithy.api#documentation": "Container for the parameters to the StartSupportDataExport operation.", + "smithy.api#input": {} } }, "com.amazonaws.marketplacecommerceanalytics#StartSupportDataExportResult": { @@ -1037,22 +1105,27 @@ } }, "traits": { - "smithy.api#documentation": "Container for the result of the StartSupportDataExport operation." + "smithy.api#documentation": "Container for the result of the StartSupportDataExport operation.", + "smithy.api#output": {} } }, "com.amazonaws.marketplacecommerceanalytics#SupportDataSetType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "customer_support_contacts_data", - "name": "customer_support_contacts_data" - }, - { - "value": "test_customer_support_contacts_data", - "name": "test_customer_support_contacts_data" + "type": "enum", + "members": { + "customer_support_contacts_data": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "customer_support_contacts_data" } - ], + }, + "test_customer_support_contacts_data": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "test_customer_support_contacts_data" + } + } + }, + "traits": { "smithy.api#length": { "min": 1, "max": 255 diff --git a/codegen/sdk-codegen/aws-models/marketplace-entitlement-service.json b/codegen/sdk-codegen/aws-models/marketplace-entitlement-service.json index 7dc1e35629a..b8dab8047a0 100644 --- a/codegen/sdk-codegen/aws-models/marketplace-entitlement-service.json +++ b/codegen/sdk-codegen/aws-models/marketplace-entitlement-service.json @@ -43,6 +43,7 @@ "arnNamespace": "aws-marketplace", "cloudFormationName": "MarketplaceEntitlementService", "cloudTrailEventSource": "marketplaceentitlementservice.amazonaws.com", + "docId": "entitlement.marketplace-2017-01-11", "endpointPrefix": "entitlement.marketplace" }, "aws.auth#sigv4": { @@ -111,52 +112,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -164,13 +169,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -180,249 +194,200 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://entitlement.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://entitlement.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://entitlement.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://entitlement.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://entitlement.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://entitlement.marketplace.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, { "conditions": [], "endpoint": { - "url": "https://entitlement.marketplace.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://entitlement.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://entitlement.marketplace.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://entitlement.marketplace.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -437,8 +402,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -450,8 +415,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -463,8 +428,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -476,8 +441,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -489,8 +454,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -502,8 +467,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -515,8 +480,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -528,8 +493,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -541,8 +506,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -554,8 +519,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -567,8 +532,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -580,8 +545,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -593,8 +569,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -606,8 +593,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -619,8 +617,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -632,8 +641,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -645,8 +654,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -658,8 +667,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -670,8 +679,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -682,10 +691,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -797,18 +812,20 @@ } }, "com.amazonaws.marketplaceentitlementservice#GetEntitlementFilterName": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CUSTOMER_IDENTIFIER", - "name": "CUSTOMER_IDENTIFIER" - }, - { - "value": "DIMENSION", - "name": "DIMENSION" + "type": "enum", + "members": { + "CUSTOMER_IDENTIFIER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CUSTOMER_IDENTIFIER" } - ] + }, + "DIMENSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DIMENSION" + } + } } }, "com.amazonaws.marketplaceentitlementservice#GetEntitlementFilters": { @@ -873,7 +890,8 @@ } }, "traits": { - "smithy.api#documentation": "

The GetEntitlementsRequest contains parameters for the GetEntitlements\n operation.

" + "smithy.api#documentation": "

The GetEntitlementsRequest contains parameters for the GetEntitlements\n operation.

", + "smithy.api#input": {} } }, "com.amazonaws.marketplaceentitlementservice#GetEntitlementsResult": { @@ -893,7 +911,8 @@ } }, "traits": { - "smithy.api#documentation": "

The GetEntitlementsRequest contains results from the GetEntitlements operation.

" + "smithy.api#documentation": "

The GetEntitlementsRequest contains results from the GetEntitlements operation.

", + "smithy.api#output": {} } }, "com.amazonaws.marketplaceentitlementservice#Integer": { @@ -926,7 +945,7 @@ "com.amazonaws.marketplaceentitlementservice#NonEmptyString": { "type": "string", "traits": { - "smithy.api#pattern": "\\S+" + "smithy.api#pattern": "^\\S+$" } }, "com.amazonaws.marketplaceentitlementservice#ProductCode": { diff --git a/codegen/sdk-codegen/aws-models/marketplace-metering.json b/codegen/sdk-codegen/aws-models/marketplace-metering.json index fa3a3621d63..fa5cb0ff6e1 100644 --- a/codegen/sdk-codegen/aws-models/marketplace-metering.json +++ b/codegen/sdk-codegen/aws-models/marketplace-metering.json @@ -52,13 +52,14 @@ "arnNamespace": "aws-marketplace", "cloudFormationName": "MarketplaceMetering", "cloudTrailEventSource": "marketplacemetering.amazonaws.com", + "docId": "meteringmarketplace-2016-01-14", "endpointPrefix": "metering.marketplace" }, "aws.auth#sigv4": { "name": "aws-marketplace" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "AWS Marketplace Metering Service\n

This reference provides descriptions of the low-level AWS Marketplace Metering Service\n API.

\n

AWS Marketplace sellers can use this API to submit usage data for custom usage\n dimensions.

\n

For information on the permissions you need to use this API, see AWS Marketplace metering and entitlement API permissions in the\n AWS Marketplace Seller Guide.\n

\n

\n Submitting Metering Records\n

\n
    \n
  • \n

    \n MeterUsage - Submits the metering record for an AWS\n Marketplace product. MeterUsage is called from an EC2 instance or a\n container running on EKS or ECS.

    \n
  • \n
  • \n

    \n BatchMeterUsage - Submits the metering record for a set of\n customers. BatchMeterUsage is called from a software-as-a-service\n (SaaS) application.

    \n
  • \n
\n

\n Accepting New Customers\n

\n
    \n
  • \n

    \n ResolveCustomer - Called by a SaaS application during the\n registration process. When a buyer visits your website during the registration\n process, the buyer submits a Registration Token through the browser. The\n Registration Token is resolved through this API to obtain a\n CustomerIdentifier\n \n along with the CustomerAWSAccountId and\n ProductCode.

    \n
  • \n
\n

\n Entitlement and Metering for Paid Container Products\n

\n
    \n
  • \n

    Paid container software products sold through AWS Marketplace must integrate\n with the AWS Marketplace Metering Service and call the\n RegisterUsage operation for software entitlement and metering.\n Free and BYOL products for Amazon ECS or Amazon EKS aren't required to call\n RegisterUsage, but you can do so if you want to receive usage\n data in your seller reports. For more information on using the\n RegisterUsage operation, see Container-Based Products.

    \n
  • \n
\n

\n BatchMeterUsage API calls are captured by AWS CloudTrail. You can use\n Cloudtrail to verify that the SaaS metering records that you sent are accurate by\n searching for records with the eventName of BatchMeterUsage.\n You can also use CloudTrail to audit records over time. For more information, see the\n \n AWS CloudTrail User Guide.\n

", + "smithy.api#documentation": "AWS Marketplace Metering Service\n

This reference provides descriptions of the low-level AWS Marketplace Metering Service\n API.

\n

AWS Marketplace sellers can use this API to submit usage data for custom usage\n dimensions.

\n

For information on the permissions you need to use this API, see AWS Marketplace metering and entitlement API permissions in the\n AWS Marketplace Seller Guide.\n

\n

\n Submitting Metering Records\n

\n
    \n
  • \n

    \n MeterUsage - Submits the metering record for an AWS\n Marketplace product. MeterUsage is called from an EC2 instance or a\n container running on EKS or ECS.

    \n
  • \n
  • \n

    \n BatchMeterUsage - Submits the metering record for a set of\n customers. BatchMeterUsage is called from a software-as-a-service\n (SaaS) application.

    \n
  • \n
\n

\n Accepting New Customers\n

\n
    \n
  • \n

    \n ResolveCustomer - Called by a SaaS application during the\n registration process. When a buyer visits your website during the registration\n process, the buyer submits a Registration Token through the browser. The\n Registration Token is resolved through this API to obtain a\n CustomerIdentifier\n \n along with the CustomerAWSAccountId and\n ProductCode.

    \n
  • \n
\n

\n Entitlement and Metering for Paid Container Products\n

\n
    \n
  • \n

    Paid container software products sold through AWS Marketplace must integrate\n with the AWS Marketplace Metering Service and call the\n RegisterUsage operation for software entitlement and metering.\n Free and BYOL products for Amazon ECS or Amazon EKS aren't required to call\n RegisterUsage, but you can do so if you want to receive usage\n data in your seller reports. For more information on using the\n RegisterUsage operation, see Container-Based Products.

    \n
  • \n
\n

\n BatchMeterUsage API calls are captured by AWS CloudTrail. You can use\n Cloudtrail to verify that the SaaS metering records that you sent are accurate by\n searching for records with the eventName of BatchMeterUsage.\n You can also use CloudTrail to audit records over time. For more information, see the\n \n AWS CloudTrail User Guide.\n

", "smithy.api#title": "AWSMarketplace Metering", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -120,52 +121,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -173,13 +178,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -189,274 +203,225 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://metering.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://metering.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://metering.marketplace-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://metering.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://metering.marketplace.{Region}.amazonaws.com", + "url": "https://metering.marketplace-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ - "aws-us-gov", { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://metering.marketplace.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://metering.marketplace.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://metering.marketplace.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://metering.marketplace.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://metering.marketplace.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://metering.marketplace.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -471,8 +436,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -484,8 +449,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -497,8 +462,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -510,8 +475,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -523,8 +488,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -536,8 +501,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -549,8 +514,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -562,8 +527,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -575,8 +540,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -588,8 +553,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -601,8 +566,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -614,8 +579,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -627,8 +592,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -640,8 +605,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -653,8 +618,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -666,8 +631,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -679,8 +644,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -692,8 +657,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -705,8 +670,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -718,8 +683,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -731,8 +696,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -744,8 +709,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -757,8 +722,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -770,8 +735,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -783,8 +748,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -796,8 +761,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -809,8 +774,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -822,8 +787,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -835,8 +800,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -848,8 +813,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -861,8 +826,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -874,8 +839,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -887,8 +852,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -900,8 +865,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -913,8 +889,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -926,8 +913,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -939,8 +937,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -952,8 +961,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -965,8 +974,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -978,8 +987,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -990,8 +999,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1002,10 +1011,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1059,7 +1074,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n BatchMeterUsage is called from a SaaS application listed on AWS\n Marketplace to post metering records for a set of customers.

\n

For identical requests, the API is idempotent; requests can be retried with the same\n records or a subset of the input records.

\n

Every request to BatchMeterUsage is for one product. If you need to meter\n usage for multiple products, you must make multiple calls to\n BatchMeterUsage.

\n

Usage records are expected to be submitted as quickly as possible after the event that\n is being recorded, and are not accepted more than 6 hours after the event.

\n

\n BatchMeterUsage can process up to 25 UsageRecords at a\n time.

\n

A UsageRecord can optionally include multiple usage allocations, to\n provide customers with usage data split into buckets by tags that you define (or allow\n the customer to define).

\n

\n BatchMeterUsage returns a list of UsageRecordResult objects,\n showing the result for each UsageRecord, as well as a list of\n UnprocessedRecords, indicating errors in the service side that you\n should retry.

\n

\n BatchMeterUsage requests must be less than 1MB in size.

\n \n

For an example of using BatchMeterUsage, see BatchMeterUsage code example in the AWS Marketplace Seller\n Guide.

\n
" + "smithy.api#documentation": "

\n BatchMeterUsage is called from a SaaS application listed on AWS\n Marketplace to post metering records for a set of customers.

\n

For identical requests, the API is idempotent; requests can be retried with the same\n records or a subset of the input records.

\n

Every request to BatchMeterUsage is for one product. If you need to meter\n usage for multiple products, you must make multiple calls to\n BatchMeterUsage.

\n

Usage records are expected to be submitted as quickly as possible after the event that\n is being recorded, and are not accepted more than 6 hours after the event.

\n

\n BatchMeterUsage can process up to 25 UsageRecords at a\n time.

\n

A UsageRecord can optionally include multiple usage allocations, to\n provide customers with usage data split into buckets by tags that you define (or allow\n the customer to define).

\n

\n BatchMeterUsage returns a list of UsageRecordResult objects,\n showing the result for each UsageRecord, as well as a list of\n UnprocessedRecords, indicating errors in the service side that you\n should retry.

\n

\n BatchMeterUsage requests must be less than 1MB in size.

\n \n

For an example of using BatchMeterUsage, see BatchMeterUsage code example in the AWS Marketplace Seller\n Guide.

\n
" } }, "com.amazonaws.marketplacemetering#BatchMeterUsageRequest": { @@ -1081,7 +1096,8 @@ } }, "traits": { - "smithy.api#documentation": "

A BatchMeterUsageRequest contains UsageRecords, which\n indicate quantities of usage within your application.

" + "smithy.api#documentation": "

A BatchMeterUsageRequest contains UsageRecords, which\n indicate quantities of usage within your application.

", + "smithy.api#input": {} } }, "com.amazonaws.marketplacemetering#BatchMeterUsageResult": { @@ -1101,7 +1117,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the UsageRecords processed by BatchMeterUsage and\n any records that have failed due to transient error.

" + "smithy.api#documentation": "

Contains the UsageRecords processed by BatchMeterUsage and\n any records that have failed due to transient error.

", + "smithy.api#output": {} } }, "com.amazonaws.marketplacemetering#Boolean": { @@ -1336,7 +1353,7 @@ } ], "traits": { - "smithy.api#documentation": "

API to emit metering records. For identical requests, the API is idempotent. It simply\n returns the metering record ID.

\n

\n MeterUsage is authenticated on the buyer's AWS account using credentials\n from the EC2 instance, ECS task, or EKS pod.

\n

\n MeterUsage can optionally include multiple usage allocations, to provide\n customers with usage data split into buckets by tags that you define (or allow the\n customer to define).

\n

Usage records are expected to be submitted as quickly as possible after the event that\n is being recorded, and are not accepted more than 6 hours after the event.

" + "smithy.api#documentation": "

API to emit metering records. For identical requests, the API is idempotent. It simply\n returns the metering record ID.

\n

\n MeterUsage is authenticated on the buyer's AWS account using credentials\n from the EC2 instance, ECS task, or EKS pod.

\n

\n MeterUsage can optionally include multiple usage allocations, to provide\n customers with usage data split into buckets by tags that you define (or allow the\n customer to define).

\n

Usage records are expected to be submitted as quickly as possible after the event that\n is being recorded, and are not accepted more than 6 hours after the event.

" } }, "com.amazonaws.marketplacemetering#MeterUsageRequest": { @@ -1378,9 +1395,12 @@ "UsageAllocations": { "target": "com.amazonaws.marketplacemetering#UsageAllocations", "traits": { - "smithy.api#documentation": "

The set of UsageAllocations to submit.

\n

The sum of all UsageAllocation quantities must equal the\n UsageQuantity of the MeterUsage request, and each\n UsageAllocation must have a unique set of tags (include no\n tags).

" + "smithy.api#documentation": "

The set of UsageAllocations to submit.

\n

The sum of all UsageAllocation quantities must equal the\n UsageQuantity of the MeterUsage request, and each\n UsageAllocation must have a unique set of tags (include no\n tags).

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.marketplacemetering#MeterUsageResult": { @@ -1392,6 +1412,9 @@ "smithy.api#documentation": "

Metering record id.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.marketplacemetering#NonEmptyString": { @@ -1467,7 +1490,7 @@ } ], "traits": { - "smithy.api#documentation": "

Paid container software products sold through AWS Marketplace must integrate with the\n AWS Marketplace Metering Service and call the RegisterUsage operation for\n software entitlement and metering. Free and BYOL products for Amazon ECS or Amazon EKS\n aren't required to call RegisterUsage, but you may choose to do so if you\n would like to receive usage data in your seller reports. The sections below explain the\n behavior of RegisterUsage. RegisterUsage performs two primary\n functions: metering and entitlement.

\n
    \n
  • \n

    \n Entitlement: RegisterUsage allows you to\n verify that the customer running your paid software is subscribed to your\n product on AWS Marketplace, enabling you to guard against unauthorized use. Your\n container image that integrates with RegisterUsage is only required\n to guard against unauthorized use at container startup, as such a\n CustomerNotSubscribedException or\n PlatformNotSupportedException will only be thrown on the\n initial call to RegisterUsage. Subsequent calls from the same\n Amazon ECS task instance (e.g. task-id) or Amazon EKS pod will not throw a\n CustomerNotSubscribedException, even if the customer\n unsubscribes while the Amazon ECS task or Amazon EKS pod is still\n running.

    \n
  • \n
  • \n

    \n Metering: RegisterUsage meters software use\n per ECS task, per hour, or per pod for Amazon EKS with usage prorated to the\n second. A minimum of 1 minute of usage applies to tasks that are short lived.\n For example, if a customer has a 10 node Amazon ECS or Amazon EKS cluster and a\n service configured as a Daemon Set, then Amazon ECS or Amazon EKS will launch a\n task on all 10 cluster nodes and the customer will be charged: (10 *\n hourly_rate). Metering for software use is automatically handled by the AWS\n Marketplace Metering Control Plane -- your software is not required to perform\n any metering specific actions, other than call RegisterUsage once\n for metering of software use to commence. The AWS Marketplace Metering Control\n Plane will also continue to bill customers for running ECS tasks and Amazon EKS\n pods, regardless of the customers subscription state, removing the need for your\n software to perform entitlement checks at runtime.

    \n
  • \n
" + "smithy.api#documentation": "

Paid container software products sold through AWS Marketplace must integrate with the\n AWS Marketplace Metering Service and call the RegisterUsage operation for\n software entitlement and metering. Free and BYOL products for Amazon ECS or Amazon EKS\n aren't required to call RegisterUsage, but you may choose to do so if you\n would like to receive usage data in your seller reports. The sections below explain the\n behavior of RegisterUsage. RegisterUsage performs two primary\n functions: metering and entitlement.

\n
    \n
  • \n

    \n Entitlement: RegisterUsage allows you to\n verify that the customer running your paid software is subscribed to your\n product on AWS Marketplace, enabling you to guard against unauthorized use. Your\n container image that integrates with RegisterUsage is only required\n to guard against unauthorized use at container startup, as such a\n CustomerNotSubscribedException or\n PlatformNotSupportedException will only be thrown on the\n initial call to RegisterUsage. Subsequent calls from the same\n Amazon ECS task instance (e.g. task-id) or Amazon EKS pod will not throw a\n CustomerNotSubscribedException, even if the customer\n unsubscribes while the Amazon ECS task or Amazon EKS pod is still\n running.

    \n
  • \n
  • \n

    \n Metering: RegisterUsage meters software use\n per ECS task, per hour, or per pod for Amazon EKS with usage prorated to the\n second. A minimum of 1 minute of usage applies to tasks that are short lived.\n For example, if a customer has a 10 node Amazon ECS or Amazon EKS cluster and a\n service configured as a Daemon Set, then Amazon ECS or Amazon EKS will launch a\n task on all 10 cluster nodes and the customer will be charged: (10 *\n hourly_rate). Metering for software use is automatically handled by the AWS\n Marketplace Metering Control Plane -- your software is not required to perform\n any metering specific actions, other than call RegisterUsage once\n for metering of software use to commence. The AWS Marketplace Metering Control\n Plane will also continue to bill customers for running ECS tasks and Amazon EKS\n pods, regardless of the customers subscription state, removing the need for your\n software to perform entitlement checks at runtime.

    \n
  • \n
" } }, "com.amazonaws.marketplacemetering#RegisterUsageRequest": { @@ -1493,6 +1516,9 @@ "smithy.api#documentation": "

(Optional) To scope down the registration to a specific running software instance and\n guard against replay attacks.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.marketplacemetering#RegisterUsageResult": { @@ -1510,6 +1536,9 @@ "smithy.api#documentation": "

JWT Token

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.marketplacemetering#ResolveCustomer": { @@ -1538,7 +1567,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n ResolveCustomer is called by a SaaS application during the registration\n process. When a buyer visits your website during the registration process, the buyer\n submits a registration token through their browser. The registration token is resolved\n through this API to obtain a CustomerIdentifier\n along with the\n CustomerAWSAccountId and\n ProductCode.

\n \n

The API needs to called from the seller account id used to publish the SaaS\n application to successfully resolve the token.

\n

For an example of using ResolveCustomer, see ResolveCustomer code example in the AWS Marketplace Seller\n Guide.

\n
" + "smithy.api#documentation": "

\n ResolveCustomer is called by a SaaS application during the registration\n process. When a buyer visits your website during the registration process, the buyer\n submits a registration token through their browser. The registration token is resolved\n through this API to obtain a CustomerIdentifier\n along with the\n CustomerAWSAccountId and\n ProductCode.

\n \n

The API needs to called from the seller account id used to publish the SaaS\n application to successfully resolve the token.

\n

For an example of using ResolveCustomer, see ResolveCustomer code example in the AWS Marketplace Seller\n Guide.

\n
" } }, "com.amazonaws.marketplacemetering#ResolveCustomerRequest": { @@ -1553,7 +1582,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains input to the ResolveCustomer operation.

" + "smithy.api#documentation": "

Contains input to the ResolveCustomer operation.

", + "smithy.api#input": {} } }, "com.amazonaws.marketplacemetering#ResolveCustomerResult": { @@ -1579,7 +1609,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of the ResolveCustomer operation. Contains the\n CustomerIdentifier\n \n along with the CustomerAWSAccountId and\n ProductCode.

" + "smithy.api#documentation": "

The result of the ResolveCustomer operation. Contains the\n CustomerIdentifier\n \n along with the CustomerAWSAccountId and\n ProductCode.

", + "smithy.api#output": {} } }, "com.amazonaws.marketplacemetering#String": { @@ -1662,7 +1693,7 @@ } }, "traits": { - "smithy.api#documentation": "

The timestamp value passed in the UsageRecord is out of\n allowed range.

\n

For BatchMeterUsage, if any of the records are outside of the allowed\n range, the entire batch is not processed. You must remove invalid records and try\n again.

", + "smithy.api#documentation": "

The timestamp value passed in the UsageRecord is out of\n allowed range.

\n

For BatchMeterUsage, if any of the records are outside of the allowed\n range, the entire batch is not processed. You must remove invalid records and try\n again.

", "smithy.api#error": "client" } }, @@ -1684,7 +1715,7 @@ } }, "traits": { - "smithy.api#documentation": "

Usage allocations allow you to split usage into buckets by tags.

\n

Each UsageAllocation indicates the usage quantity for a specific set of\n tags.

" + "smithy.api#documentation": "

Usage allocations allow you to split usage into buckets by tags.

\n

Each UsageAllocation indicates the usage quantity for a specific set of\n tags.

" } }, "com.amazonaws.marketplacemetering#UsageAllocations": { @@ -1724,7 +1755,7 @@ "Timestamp": { "target": "com.amazonaws.marketplacemetering#Timestamp", "traits": { - "smithy.api#documentation": "

Timestamp, in UTC, for which the usage is being reported.

\n

Your application can meter usage for up to one hour in the past. Make sure the\n timestamp value is not before the start of the software usage.

", + "smithy.api#documentation": "

Timestamp, in UTC, for which the usage is being reported.

\n

Your application can meter usage for up to one hour in the past. Make sure the\n timestamp value is not before the start of the software usage.

", "smithy.api#required": {} } }, @@ -1756,7 +1787,7 @@ } }, "traits": { - "smithy.api#documentation": "

A UsageRecord indicates a quantity of usage for a given product,\n customer, dimension and time.

\n

Multiple requests with the same UsageRecords as input will be\n de-duplicated to prevent double charges.

" + "smithy.api#documentation": "

A UsageRecord indicates a quantity of usage for a given product,\n customer, dimension and time.

\n

Multiple requests with the same UsageRecords as input will be\n de-duplicated to prevent double charges.

" } }, "com.amazonaws.marketplacemetering#UsageRecordList": { @@ -1789,7 +1820,7 @@ "Status": { "target": "com.amazonaws.marketplacemetering#UsageRecordResultStatus", "traits": { - "smithy.api#documentation": "

The UsageRecordResult\n Status indicates the status of an individual UsageRecord\n processed by BatchMeterUsage.

\n
    \n
  • \n

    \n Success- The UsageRecord was accepted and\n honored by BatchMeterUsage.

    \n
  • \n
  • \n

    \n CustomerNotSubscribed- The CustomerIdentifier\n specified is not able to use your product. The UsageRecord was not\n honored. There are three causes for this result:

    \n
      \n
    • \n

      The customer identifier is invalid.

      \n
    • \n
    • \n

      The customer identifier provided in the metering record does not have\n an active agreement or subscription with this product. Future\n UsageRecords for this customer will fail until the\n customer subscribes to your product.

      \n
    • \n
    • \n

      The customer's AWS account was suspended.

      \n
    • \n
    \n
  • \n
  • \n

    \n DuplicateRecord- Indicates that the\n UsageRecord was invalid and not honored. A previously metered\n UsageRecord had the same customer, dimension, and time, but a\n different quantity.

    \n
  • \n
" + "smithy.api#documentation": "

The UsageRecordResult\n Status indicates the status of an individual UsageRecord\n processed by BatchMeterUsage.

\n
    \n
  • \n

    \n Success- The UsageRecord was accepted and\n honored by BatchMeterUsage.

    \n
  • \n
  • \n

    \n CustomerNotSubscribed- The CustomerIdentifier\n specified is not able to use your product. The UsageRecord was not\n honored. There are three causes for this result:

    \n
      \n
    • \n

      The customer identifier is invalid.

      \n
    • \n
    • \n

      The customer identifier provided in the metering record does not have\n an active agreement or subscription with this product. Future\n UsageRecords for this customer will fail until the\n customer subscribes to your product.

      \n
    • \n
    • \n

      The customer's AWS account was suspended.

      \n
    • \n
    \n
  • \n
  • \n

    \n DuplicateRecord- Indicates that the\n UsageRecord was invalid and not honored. A previously metered\n UsageRecord had the same customer, dimension, and time, but a\n different quantity.

    \n
  • \n
" } } }, @@ -1804,22 +1835,26 @@ } }, "com.amazonaws.marketplacemetering#UsageRecordResultStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Success", - "name": "SUCCESS" - }, - { - "value": "CustomerNotSubscribed", - "name": "CUSTOMER_NOT_SUBSCRIBED" - }, - { - "value": "DuplicateRecord", - "name": "DUPLICATE_RECORD" + "type": "enum", + "members": { + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Success" + } + }, + "CUSTOMER_NOT_SUBSCRIBED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CustomerNotSubscribed" + } + }, + "DUPLICATE_RECORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DuplicateRecord" } - ] + } } }, "com.amazonaws.marketplacemetering#VersionInteger": { diff --git a/codegen/sdk-codegen/aws-models/mediaconnect.json b/codegen/sdk-codegen/aws-models/mediaconnect.json index b16339829d7..b2d57251bdd 100644 --- a/codegen/sdk-codegen/aws-models/mediaconnect.json +++ b/codegen/sdk-codegen/aws-models/mediaconnect.json @@ -91,7 +91,6 @@ "Port": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The network output port.", "smithy.api#jsonName": "port", "smithy.api#required": {} @@ -108,7 +107,6 @@ "Ttl": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The network output TTL.", "smithy.api#jsonName": "ttl", "smithy.api#required": {} @@ -149,7 +147,6 @@ "Port": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The network source port.", "smithy.api#jsonName": "port", "smithy.api#required": {} @@ -384,7 +381,6 @@ "MaxBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum expected bitrate (in bps).", "smithy.api#jsonName": "maxBitrate", "smithy.api#required": {} @@ -759,7 +755,6 @@ "MaxBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum expected bitrate (in bps).", "smithy.api#jsonName": "maxBitrate", "smithy.api#required": {} @@ -768,7 +763,6 @@ "MaxOutputs": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of expected outputs.", "smithy.api#jsonName": "maxOutputs", "smithy.api#required": {} @@ -813,7 +807,6 @@ "ClockRate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The sample rate (in Hz) for the stream. If the media stream type is video or ancillary data, set this value to 90000. If the media stream type is audio, set this value to either 48000 or 96000.", "smithy.api#jsonName": "clockRate" } @@ -828,7 +821,6 @@ "MediaStreamId": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "A unique identifier for the media stream.", "smithy.api#jsonName": "mediaStreamId", "smithy.api#required": {} @@ -896,7 +888,6 @@ "MaxLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum latency in milliseconds. This parameter applies only to RIST-based, Zixi-based, and Fujitsu-based streams.", "smithy.api#jsonName": "maxLatency" } @@ -911,7 +902,6 @@ "MinLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.", "smithy.api#jsonName": "minLatency" } @@ -926,7 +916,6 @@ "Port": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port to use when content is distributed to this output.", "smithy.api#jsonName": "port" } @@ -949,7 +938,6 @@ "SenderControlPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow uses to send outbound requests to initiate connection with the sender.", "smithy.api#jsonName": "senderControlPort" } @@ -957,7 +945,6 @@ "SmoothingLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.", "smithy.api#jsonName": "smoothingLatency" } @@ -1199,7 +1186,6 @@ "Port": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The network output port.", "smithy.api#jsonName": "port", "smithy.api#required": {} @@ -1216,7 +1202,6 @@ "Ttl": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The network output TTL.", "smithy.api#jsonName": "ttl", "smithy.api#required": {} @@ -1257,7 +1242,6 @@ "Port": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The network source port.", "smithy.api#jsonName": "port", "smithy.api#required": {} @@ -2141,7 +2125,6 @@ "Force": { "target": "com.amazonaws.mediaconnect#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "Force the deregistration of an instance. Force will deregister an instance, even if there are bridges running on it.", "smithy.api#httpQuery": "force" } @@ -2786,7 +2769,6 @@ "DestinationPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port to use when the content of the media stream is distributed to the output.", "smithy.api#jsonName": "destinationPort", "smithy.api#required": {} @@ -2827,7 +2809,6 @@ "DestinationPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that you want MediaConnect to use when it distributes the media stream to the output.", "smithy.api#jsonName": "destinationPort", "smithy.api#required": {} @@ -2870,7 +2851,6 @@ "MaxBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum expected bitrate (in bps) of the egress bridge.", "smithy.api#jsonName": "maxBitrate", "smithy.api#required": {} @@ -2930,7 +2910,6 @@ "CompressionFactor": { "target": "com.amazonaws.mediaconnect#__double", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "A value that is used to calculate compression for an output. The bitrate of the output is calculated as follows: Output bitrate = (1 / compressionFactor) * (source bitrate) This property only applies to outputs that use the ST 2110 JPEG XS protocol, with a flow source that uses the CDI protocol. Valid values are floating point numbers in the range of 3.0 to 10.0, inclusive.", "smithy.api#jsonName": "compressionFactor", "smithy.api#required": {} @@ -2955,7 +2934,6 @@ "CompressionFactor": { "target": "com.amazonaws.mediaconnect#__double", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "A value that is used to calculate compression for an output. The bitrate of the output is calculated as follows: Output bitrate = (1 / compressionFactor) * (source bitrate) This property only applies to outputs that use the ST 2110 JPEG XS protocol, with a flow source that uses the CDI protocol. Valid values are floating point numbers in the range of 3.0 to 10.0, inclusive.", "smithy.api#jsonName": "compressionFactor", "smithy.api#required": {} @@ -3052,7 +3030,6 @@ "DataTransferSubscriberFeePercent": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Percentage from 0-100 of the data transfer cost to be billed to the subscriber.", "smithy.api#jsonName": "dataTransferSubscriberFeePercent" } @@ -3137,7 +3114,6 @@ "RecoveryWindow": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Search window time to look for dash-7 packets", "smithy.api#jsonName": "recoveryWindow" } @@ -3554,7 +3530,6 @@ "RunningBridgeCount": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The running bridge count.", "smithy.api#jsonName": "runningBridgeCount", "smithy.api#required": {} @@ -3636,7 +3611,6 @@ "DataTransferSubscriberFeePercent": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Percentage from 0-100 of the data transfer cost to be billed to the subscriber.", "smithy.api#jsonName": "dataTransferSubscriberFeePercent" } @@ -3801,7 +3775,6 @@ "MaxBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum expected bitrate (in bps) of the ingress bridge.", "smithy.api#jsonName": "maxBitrate", "smithy.api#required": {} @@ -3810,7 +3783,6 @@ "MaxOutputs": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of outputs on the ingress bridge.", "smithy.api#jsonName": "maxOutputs", "smithy.api#required": {} @@ -3832,7 +3804,6 @@ "InputPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow listens on for an incoming media stream.", "smithy.api#jsonName": "inputPort", "smithy.api#required": {} @@ -3857,7 +3828,6 @@ "InputPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that you want the flow to listen on for an incoming media stream.", "smithy.api#jsonName": "inputPort", "smithy.api#required": {} @@ -4043,7 +4013,6 @@ "MaxResults": { "target": "com.amazonaws.mediaconnect#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to return per API request. For example, you submit a ListBridges request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.", "smithy.api#httpQuery": "maxResults" } @@ -4125,7 +4094,6 @@ "MaxResults": { "target": "com.amazonaws.mediaconnect#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to return per API request. For example, you submit a ListEntitlements request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 20 results per page.", "smithy.api#httpQuery": "maxResults" } @@ -4207,7 +4175,6 @@ "MaxResults": { "target": "com.amazonaws.mediaconnect#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to return per API request. For example, you submit a ListFlows request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.", "smithy.api#httpQuery": "maxResults" } @@ -4299,7 +4266,6 @@ "MaxResults": { "target": "com.amazonaws.mediaconnect#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to return per API request. For example, you submit a ListInstances request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.", "smithy.api#httpQuery": "maxResults" } @@ -4384,7 +4350,6 @@ "MaxResults": { "target": "com.amazonaws.mediaconnect#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to return per API request. For example, you submit a ListGateways request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.", "smithy.api#httpQuery": "maxResults" } @@ -4466,7 +4431,6 @@ "MaxResults": { "target": "com.amazonaws.mediaconnect#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to return per API request. For example, you submit a ListOfferings request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.", "smithy.api#httpQuery": "maxResults" } @@ -4548,7 +4512,6 @@ "MaxResults": { "target": "com.amazonaws.mediaconnect#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of results to return per API request. For example, you submit a ListReservations request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.", "smithy.api#httpQuery": "maxResults" } @@ -4699,7 +4662,6 @@ "DataTransferSubscriberFeePercent": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Percentage from 0-100 of the data transfer cost to be billed to the subscriber.", "smithy.api#jsonName": "dataTransferSubscriberFeePercent" } @@ -4943,7 +4905,6 @@ "com.amazonaws.mediaconnect#MaxResults": { "type": "integer", "traits": { - "smithy.api#default": 0, "smithy.api#range": { "min": 1, "max": 1000 @@ -5179,52 +5140,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -5232,13 +5197,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -5248,224 +5222,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mediaconnect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://mediaconnect-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mediaconnect-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://mediaconnect-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mediaconnect.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://mediaconnect.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://mediaconnect.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://mediaconnect.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -5993,7 +5918,6 @@ "ClockRate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The sample rate for the stream. This value is measured in Hz.", "smithy.api#jsonName": "clockRate" } @@ -6008,7 +5932,6 @@ "Fmt": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The format type number (sometimes referred to as RTP payload type) of the media stream. MediaConnect assigns this value to the media stream. For ST 2110 JPEG XS outputs, you need to provide this value to the receiver.", "smithy.api#jsonName": "fmt", "smithy.api#required": {} @@ -6017,7 +5940,6 @@ "MediaStreamId": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "A unique identifier for the media stream.", "smithy.api#jsonName": "mediaStreamId", "smithy.api#required": {} @@ -6350,7 +6272,6 @@ "Duration": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The length of time that your reservation would be active.", "smithy.api#jsonName": "duration", "smithy.api#required": {} @@ -6415,7 +6336,6 @@ "DataTransferSubscriberFeePercent": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Percentage from 0-100 of the data transfer cost to be billed to the subscriber.", "smithy.api#jsonName": "dataTransferSubscriberFeePercent" } @@ -6488,7 +6408,6 @@ "Port": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port to use when content is distributed to this output.", "smithy.api#jsonName": "port" } @@ -7244,7 +7163,6 @@ "Duration": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The length of time that this reservation is active. MediaConnect defines this value in the offering.", "smithy.api#jsonName": "duration", "smithy.api#required": {} @@ -7378,7 +7296,6 @@ "ReservedBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The amount of outbound bandwidth that is discounted in the offering.", "smithy.api#jsonName": "reservedBitrate" } @@ -7585,7 +7502,6 @@ "IngestPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow will be listening on for incoming content.", "smithy.api#jsonName": "ingestPort" } @@ -7593,7 +7509,6 @@ "MaxBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The smoothing max bitrate (in bps) for RIST, RTP, and RTP-FEC streams.", "smithy.api#jsonName": "maxBitrate" } @@ -7601,7 +7516,6 @@ "MaxLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum latency in milliseconds. This parameter applies only to RIST-based, Zixi-based, and Fujitsu-based streams.", "smithy.api#jsonName": "maxLatency" } @@ -7609,7 +7523,6 @@ "MaxSyncBuffer": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The size of the buffer (in milliseconds) to use to sync incoming source data.", "smithy.api#jsonName": "maxSyncBuffer" } @@ -7624,7 +7537,6 @@ "MinLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.", "smithy.api#jsonName": "minLatency" } @@ -7646,7 +7558,6 @@ "SenderControlPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow uses to send outbound requests to initiate connection with the sender.", "smithy.api#jsonName": "senderControlPort" } @@ -7668,7 +7579,6 @@ "SourceListenerPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Source port for SRT-caller protocol.", "smithy.api#jsonName": "sourceListenerPort" } @@ -7712,7 +7622,6 @@ "DataTransferSubscriberFeePercent": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Percentage from 0-100 of the data transfer cost to be billed to the subscriber.", "smithy.api#jsonName": "dataTransferSubscriberFeePercent" } @@ -7748,7 +7657,6 @@ "IngestPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow will be listening on for incoming content.", "smithy.api#jsonName": "ingestPort" } @@ -7771,7 +7679,6 @@ "SenderControlPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow uses to send outbound requests to initiate connection with the sender.", "smithy.api#jsonName": "senderControlPort" } @@ -8215,7 +8122,6 @@ "MaxBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The smoothing max bitrate (in bps) for RIST, RTP, and RTP-FEC streams.", "smithy.api#jsonName": "maxBitrate" } @@ -8223,7 +8129,6 @@ "MaxLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum latency in milliseconds. This parameter applies only to RIST-based, Zixi-based, and Fujitsu-based streams.", "smithy.api#jsonName": "maxLatency" } @@ -8231,7 +8136,6 @@ "MaxSyncBuffer": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The size of the buffer (in milliseconds) to use to sync incoming source data.", "smithy.api#jsonName": "maxSyncBuffer" } @@ -8239,7 +8143,6 @@ "MinLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.", "smithy.api#jsonName": "minLatency" } @@ -8262,7 +8165,6 @@ "SenderControlPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow uses to send outbound requests to initiate connection with the sender.", "smithy.api#jsonName": "senderControlPort" } @@ -8277,7 +8179,6 @@ "SmoothingLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.", "smithy.api#jsonName": "smoothingLatency" } @@ -8292,7 +8193,6 @@ "SourceListenerPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Source port for SRT-caller protocol.", "smithy.api#jsonName": "sourceListenerPort" } @@ -8444,7 +8344,6 @@ "Port": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The network output port.", "smithy.api#jsonName": "port" } @@ -8459,7 +8358,6 @@ "Ttl": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The network output TTL.", "smithy.api#jsonName": "ttl" } @@ -8489,7 +8387,6 @@ "Port": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The network source port.", "smithy.api#jsonName": "port" } @@ -8842,7 +8739,6 @@ "MaxBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Update an existing egress-type bridge.", "smithy.api#jsonName": "maxBitrate" } @@ -8933,7 +8829,6 @@ "RecoveryWindow": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Recovery window time to look for dash-7 packets", "smithy.api#jsonName": "recoveryWindow" } @@ -9157,7 +9052,6 @@ "ClockRate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The sample rate (in Hz) for the stream. If the media stream type is video or ancillary data, set this value to 90000. If the media stream type is audio, set this value to either 48000 or 96000.", "smithy.api#jsonName": "clockRate" } @@ -9308,7 +9202,6 @@ "MaxLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum latency in milliseconds. This parameter applies only to RIST-based, Zixi-based, and Fujitsu-based streams.", "smithy.api#jsonName": "maxLatency" } @@ -9323,7 +9216,6 @@ "MinLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.", "smithy.api#jsonName": "minLatency" } @@ -9340,7 +9232,6 @@ "Port": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port to use when content is distributed to this output.", "smithy.api#jsonName": "port" } @@ -9362,7 +9253,6 @@ "SenderControlPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow uses to send outbound requests to initiate connection with the sender.", "smithy.api#jsonName": "senderControlPort" } @@ -9377,7 +9267,6 @@ "SmoothingLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.", "smithy.api#jsonName": "smoothingLatency" } @@ -9542,7 +9431,6 @@ "IngestPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow will be listening on for incoming content.", "smithy.api#jsonName": "ingestPort" } @@ -9550,7 +9438,6 @@ "MaxBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The smoothing max bitrate (in bps) for RIST, RTP, and RTP-FEC streams.", "smithy.api#jsonName": "maxBitrate" } @@ -9558,7 +9445,6 @@ "MaxLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum latency in milliseconds. This parameter applies only to RIST-based, Zixi-based, and Fujitsu-based streams.", "smithy.api#jsonName": "maxLatency" } @@ -9566,7 +9452,6 @@ "MaxSyncBuffer": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The size of the buffer (in milliseconds) to use to sync incoming source data.", "smithy.api#jsonName": "maxSyncBuffer" } @@ -9581,7 +9466,6 @@ "MinLatency": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The minimum latency in milliseconds for SRT-based streams. In streams that use the SRT protocol, this value that you set on your MediaConnect source or output represents the minimal potential latency of that connection. The latency of the stream is set to the highest number between the sender’s minimum latency and the receiver’s minimum latency.", "smithy.api#jsonName": "minLatency" } @@ -9596,7 +9480,6 @@ "SenderControlPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The port that the flow uses to send outbound requests to initiate connection with the sender.", "smithy.api#jsonName": "senderControlPort" } @@ -9627,7 +9510,6 @@ "SourceListenerPort": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Source port for SRT-caller protocol.", "smithy.api#jsonName": "sourceListenerPort" } @@ -9804,7 +9686,6 @@ "MaxBitrate": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum expected bitrate (in bps).", "smithy.api#jsonName": "maxBitrate" } @@ -9812,7 +9693,6 @@ "MaxOutputs": { "target": "com.amazonaws.mediaconnect#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum number of expected outputs.", "smithy.api#jsonName": "maxOutputs" } @@ -9967,22 +9847,13 @@ } }, "com.amazonaws.mediaconnect#__boolean": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } + "type": "boolean" }, "com.amazonaws.mediaconnect#__double": { - "type": "double", - "traits": { - "smithy.api#default": 0 - } + "type": "double" }, "com.amazonaws.mediaconnect#__integer": { - "type": "integer", - "traits": { - "smithy.api#default": 0 - } + "type": "integer" }, "com.amazonaws.mediaconnect#__listOfAddBridgeOutputRequest": { "type": "list", diff --git a/codegen/sdk-codegen/aws-models/mediapackage-vod.json b/codegen/sdk-codegen/aws-models/mediapackage-vod.json index dfd95272cc9..9037011d0a1 100644 --- a/codegen/sdk-codegen/aws-models/mediapackage-vod.json +++ b/codegen/sdk-codegen/aws-models/mediapackage-vod.json @@ -181,7 +181,6 @@ "IncludeEncoderConfigurationInSegments": { "target": "com.amazonaws.mediapackagevod#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "When includeEncoderConfigurationInSegments is set to true, MediaPackage places your encoder's Sequence Parameter Set (SPS), Picture Parameter Set (PPS), and Video Parameter Set (VPS) metadata in every video segment instead of in the init fragment. This lets you use different SPS/PPS/VPS settings for your assets during content playback.", "smithy.api#jsonName": "includeEncoderConfigurationInSegments" } @@ -189,7 +188,6 @@ "SegmentDurationSeconds": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Duration (in seconds) of each fragment. Actual fragments will be\nrounded to the nearest multiple of the source fragment duration.", "smithy.api#jsonName": "segmentDurationSeconds" } @@ -793,7 +791,6 @@ "MinBufferTimeSeconds": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Minimum duration (in seconds) that a player will buffer media before starting the presentation.", "smithy.api#jsonName": "minBufferTimeSeconds" } @@ -843,7 +840,6 @@ "IncludeEncoderConfigurationInSegments": { "target": "com.amazonaws.mediapackagevod#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "When includeEncoderConfigurationInSegments is set to true, MediaPackage places your encoder's Sequence Parameter Set (SPS), Picture Parameter Set (PPS), and Video Parameter Set (VPS) metadata in every video segment instead of in the init fragment. This lets you use different SPS/PPS/VPS settings for your assets during content playback.", "smithy.api#jsonName": "includeEncoderConfigurationInSegments" } @@ -851,7 +847,6 @@ "IncludeIframeOnlyStream": { "target": "com.amazonaws.mediapackagevod#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "When enabled, an I-Frame only stream will be included in the output.", "smithy.api#jsonName": "includeIframeOnlyStream" } @@ -866,7 +861,6 @@ "SegmentDurationSeconds": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Duration (in seconds) of each segment. Actual segments will be\nrounded to the nearest multiple of the source segment duration.", "smithy.api#jsonName": "segmentDurationSeconds" } @@ -1364,7 +1358,6 @@ "ApproximateAssetCount": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The approximate asset count of the PackagingGroup.", "smithy.api#jsonName": "approximateAssetCount" } @@ -1563,7 +1556,6 @@ "IncludeIframeOnlyStream": { "target": "com.amazonaws.mediapackagevod#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "When enabled, an I-Frame only stream will be included in the output.", "smithy.api#jsonName": "includeIframeOnlyStream" } @@ -1578,7 +1570,6 @@ "ProgramDateTimeIntervalSeconds": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag\ninserted into manifests. Additionally, when an interval is specified\nID3Timed Metadata messages will be generated every 5 seconds using the\ningest time of the content.\nIf the interval is not specified, or set to 0, then\nno EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no\nID3Timed Metadata messages will be generated. Note that irrespective\nof this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input,\nit will be passed through to HLS output.", "smithy.api#jsonName": "programDateTimeIntervalSeconds" } @@ -1586,7 +1577,6 @@ "RepeatExtXKey": { "target": "com.amazonaws.mediapackagevod#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "When enabled, the EXT-X-KEY tag will be repeated in output manifests.", "smithy.api#jsonName": "repeatExtXKey" } @@ -1622,7 +1612,6 @@ "IncludeDvbSubtitles": { "target": "com.amazonaws.mediapackagevod#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "When enabled, MediaPackage passes through digital video broadcasting (DVB) subtitles into the output.", "smithy.api#jsonName": "includeDvbSubtitles" } @@ -1630,7 +1619,6 @@ "SegmentDurationSeconds": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Duration (in seconds) of each fragment. Actual fragments will be\nrounded to the nearest multiple of the source fragment duration.", "smithy.api#jsonName": "segmentDurationSeconds" } @@ -1638,7 +1626,6 @@ "UseAudioRenditionGroup": { "target": "com.amazonaws.mediapackagevod#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "When enabled, audio streams will be placed in rendition groups in the output.", "smithy.api#jsonName": "useAudioRenditionGroup" } @@ -1713,7 +1700,6 @@ "MaxResults": { "target": "com.amazonaws.mediapackagevod#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Upper bound on number of records to return.", "smithy.api#httpQuery": "maxResults" } @@ -1808,7 +1794,6 @@ "MaxResults": { "target": "com.amazonaws.mediapackagevod#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Upper bound on number of records to return.", "smithy.api#httpQuery": "maxResults" } @@ -1903,7 +1888,6 @@ "MaxResults": { "target": "com.amazonaws.mediapackagevod#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "Upper bound on number of records to return.", "smithy.api#httpQuery": "maxResults" } @@ -2010,7 +1994,6 @@ "com.amazonaws.mediapackagevod#MaxResults": { "type": "integer", "traits": { - "smithy.api#default": 0, "smithy.api#range": { "min": 1, "max": 1000 @@ -2147,52 +2130,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2200,13 +2187,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2216,224 +2212,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mediapackage-vod-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://mediapackage-vod-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mediapackage-vod-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://mediapackage-vod-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mediapackage-vod.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://mediapackage-vod.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://mediapackage-vod.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://mediapackage-vod.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2777,6 +2724,17 @@ "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": { @@ -2790,6 +2748,17 @@ "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": { @@ -2803,6 +2772,17 @@ "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": { @@ -2816,6 +2796,17 @@ "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": { @@ -2879,6 +2870,12 @@ "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2941,7 +2938,6 @@ "SegmentDurationSeconds": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The duration (in seconds) of each segment.", "smithy.api#jsonName": "segmentDurationSeconds" } @@ -3039,7 +3035,6 @@ "ApproximateAssetCount": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The approximate asset count of the PackagingGroup.", "smithy.api#jsonName": "approximateAssetCount" } @@ -3335,7 +3330,6 @@ "MaxVideoBitsPerSecond": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The maximum video bitrate (bps) to include in output.", "smithy.api#jsonName": "maxVideoBitsPerSecond" } @@ -3343,7 +3337,6 @@ "MinVideoBitsPerSecond": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The minimum video bitrate (bps) to include in output.", "smithy.api#jsonName": "minVideoBitsPerSecond" } @@ -3552,7 +3545,6 @@ "ApproximateAssetCount": { "target": "com.amazonaws.mediapackagevod#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "The approximate asset count of the PackagingGroup.", "smithy.api#jsonName": "approximateAssetCount" } @@ -3620,16 +3612,10 @@ } }, "com.amazonaws.mediapackagevod#__boolean": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } + "type": "boolean" }, "com.amazonaws.mediapackagevod#__integer": { - "type": "integer", - "traits": { - "smithy.api#default": 0 - } + "type": "integer" }, "com.amazonaws.mediapackagevod#__listOfAssetShallow": { "type": "list", diff --git a/codegen/sdk-codegen/aws-models/mediapackagev2.json b/codegen/sdk-codegen/aws-models/mediapackagev2.json index f2f38261bed..a4fd374906c 100644 --- a/codegen/sdk-codegen/aws-models/mediapackagev2.json +++ b/codegen/sdk-codegen/aws-models/mediapackagev2.json @@ -5572,54 +5572,54 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://mediapackagev2-fips.us-gov-east-1.api.aws" + "url": "https://mediapackagev2-fips.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://mediapackagev2-fips.us-gov-east-1.amazonaws.com" + "url": "https://mediapackagev2-fips.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://mediapackagev2.us-gov-east-1.api.aws" + "url": "https://mediapackagev2.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://mediapackagev2.us-gov-east-1.amazonaws.com" + "url": "https://mediapackagev2.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": false } }, @@ -5631,8 +5631,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -5644,8 +5644,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -5657,8 +5657,8 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -5670,108 +5670,108 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://mediapackagev2-fips.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://mediapackagev2-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://mediapackagev2-fips.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://mediapackagev2.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://mediapackagev2.us-iso-east-1.c2s.ic.gov" + "url": "https://mediapackagev2.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://mediapackagev2-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://mediapackagev2-fips.us-east-1.amazonaws.com" + "url": "https://mediapackagev2-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://mediapackagev2.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://mediapackagev2.us-east-1.amazonaws.com" + "url": "https://mediapackagev2.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": false } }, @@ -5781,8 +5781,8 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -5794,8 +5794,8 @@ } }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -5805,8 +5805,8 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -5818,21 +5818,34 @@ } }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -5843,8 +5856,8 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -5855,11 +5868,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/mediastore-data.json b/codegen/sdk-codegen/aws-models/mediastore-data.json index 0a192863740..52479284aa5 100644 --- a/codegen/sdk-codegen/aws-models/mediastore-data.json +++ b/codegen/sdk-codegen/aws-models/mediastore-data.json @@ -93,11 +93,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastoredata#DeleteObjectResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastoredata#DescribeObject": { "type": "operation", @@ -138,6 +144,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastoredata#DescribeObjectResponse": { @@ -178,6 +187,9 @@ "smithy.api#httpHeader": "Last-Modified" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastoredata#ETag": { @@ -187,7 +199,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[0-9A-Fa-f]+" + "smithy.api#pattern": "^[0-9A-Fa-f]+$" } }, "com.amazonaws.mediastoredata#ErrorMessage": { @@ -197,7 +209,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[ \\w:\\.\\?-]+" + "smithy.api#pattern": "^[ \\w:\\.\\?-]+$" } }, "com.amazonaws.mediastoredata#GetObject": { @@ -249,6 +261,9 @@ "smithy.api#httpHeader": "Range" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastoredata#GetObjectResponse": { @@ -313,6 +328,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastoredata#InternalServerError": { @@ -380,22 +398,24 @@ "com.amazonaws.mediastoredata#ItemName": { "type": "string", "traits": { - "smithy.api#pattern": "[A-Za-z0-9_\\.\\-\\~]+" + "smithy.api#pattern": "^[A-Za-z0-9_\\.\\-\\~]+$" } }, "com.amazonaws.mediastoredata#ItemType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "OBJECT", - "name": "OBJECT" - }, - { - "value": "FOLDER", - "name": "FOLDER" + "type": "enum", + "members": { + "OBJECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OBJECT" } - ] + }, + "FOLDER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FOLDER" + } + } } }, "com.amazonaws.mediastoredata#ListItems": { @@ -452,6 +472,9 @@ "smithy.api#httpQuery": "NextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastoredata#ListItemsResponse": { @@ -469,6 +492,9 @@ "smithy.api#documentation": "

The token that can be used in a request to view the next set of results. For example,\n you submit a ListItems request that matches 2,000 items with\n MaxResults set at 500. The service returns the first batch of results (up\n to 500) and a NextToken value that can be used to fetch the next batch of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastoredata#ListLimit": { @@ -487,7 +513,7 @@ "min": 0, "max": 900 }, - "smithy.api#pattern": "/?(?:[A-Za-z0-9_\\.\\-\\~]+/){0,10}(?:[A-Za-z0-9_\\.\\-\\~]+)?/?" + "smithy.api#pattern": "^/?(?:[A-Za-z0-9_\\.\\-\\~]+/){0,10}(?:[A-Za-z0-9_\\.\\-\\~]+)?/?$" } }, "com.amazonaws.mediastoredata#MediaStoreObject_20170901": { @@ -587,52 +613,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -640,13 +670,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -656,224 +695,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://data.mediastore-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://data.mediastore-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://data.mediastore-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://data.mediastore-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://data.mediastore.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://data.mediastore.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://data.mediastore.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://data.mediastore.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -888,8 +878,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -901,8 +891,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -914,8 +904,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -927,8 +917,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -940,8 +930,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -953,8 +943,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -966,8 +956,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -979,8 +969,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -992,8 +982,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1005,8 +995,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1018,8 +1008,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1031,8 +1021,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1044,8 +1034,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1057,8 +1047,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1070,8 +1060,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1083,8 +1073,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1096,8 +1086,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1109,8 +1099,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1122,8 +1112,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1135,8 +1125,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1148,8 +1149,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1161,8 +1173,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1174,8 +1197,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1187,8 +1221,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1200,8 +1234,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1213,8 +1247,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1225,8 +1259,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1237,10 +1271,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1278,7 +1318,7 @@ "min": 1, "max": 900 }, - "smithy.api#pattern": "(?:[A-Za-z0-9_\\.\\-\\~]+/){0,10}[A-Za-z0-9_\\.\\-\\~]+" + "smithy.api#pattern": "^(?:[A-Za-z0-9_\\.\\-\\~]+/){0,10}[A-Za-z0-9_\\.\\-\\~]+$" } }, "com.amazonaws.mediastoredata#PayloadBlob": { @@ -1363,6 +1403,9 @@ "smithy.api#httpHeader": "x-amz-upload-availability" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastoredata#PutObjectResponse": { @@ -1386,6 +1429,9 @@ "smithy.api#documentation": "

The storage class where the object was persisted. The class should be\n “Temporal”.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastoredata#RangePattern": { @@ -1414,18 +1460,20 @@ "min": 64, "max": 64 }, - "smithy.api#pattern": "[0-9A-Fa-f]{64}" + "smithy.api#pattern": "^[0-9A-Fa-f]{64}$" } }, "com.amazonaws.mediastoredata#StorageClass": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "TEMPORAL", - "name": "TEMPORAL" + "type": "enum", + "members": { + "TEMPORAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEMPORAL" } - ], + } + }, + "traits": { "smithy.api#length": { "min": 1, "max": 16 @@ -1439,18 +1487,22 @@ "type": "timestamp" }, "com.amazonaws.mediastoredata#UploadAvailability": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "STANDARD", - "name": "STANDARD" - }, - { - "value": "STREAMING", - "name": "STREAMING" + "type": "enum", + "members": { + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD" } - ], + }, + "STREAMING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STREAMING" + } + } + }, + "traits": { "smithy.api#length": { "min": 1, "max": 16 diff --git a/codegen/sdk-codegen/aws-models/mediastore.json b/codegen/sdk-codegen/aws-models/mediastore.json index bb51e10009c..1f4035bc309 100644 --- a/codegen/sdk-codegen/aws-models/mediastore.json +++ b/codegen/sdk-codegen/aws-models/mediastore.json @@ -116,7 +116,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "arn:aws:mediastore:[a-z]+-[a-z]+-\\d:\\d{12}:container/[\\w-]{1,255}" + "smithy.api#pattern": "^arn:aws:mediastore:[a-z]+-[a-z]+-\\d:\\d{12}:container/[\\w-]{1,255}$" } }, "com.amazonaws.mediastore#ContainerAccessLoggingEnabled": { @@ -135,18 +135,20 @@ } }, "com.amazonaws.mediastore#ContainerLevelMetrics": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" } - ] + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } } }, "com.amazonaws.mediastore#ContainerList": { @@ -171,7 +173,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[\\w-]+" + "smithy.api#pattern": "^[\\w-]+$" } }, "com.amazonaws.mediastore#ContainerNotFoundException": { @@ -193,26 +195,32 @@ "min": 1, "max": 8192 }, - "smithy.api#pattern": "[\\x00-\\x7F]+" + "smithy.api#pattern": "^[\\x00-\\x7F]+$" } }, "com.amazonaws.mediastore#ContainerStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "DELETING", - "name": "DELETING" + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" } - ], + }, + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + } + }, + "traits": { "smithy.api#length": { "min": 1, "max": 16 @@ -324,6 +332,9 @@ "smithy.api#documentation": "

An array of key:value pairs that you define. These values can be anything that you want. Typically, the tag key represents a category (such as\n \"environment\") and the tag value represents a specific value within that category (such as \"test,\" \"development,\" or \"production\"). You can add up to 50 \n tags to each container. For more information about tagging, including naming and usage conventions, see Tagging Resources in MediaStore.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#CreateContainerOutput": { @@ -336,6 +347,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastore#DeleteContainer": { @@ -371,11 +385,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#DeleteContainerOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#DeleteContainerPolicy": { "type": "operation", @@ -413,11 +433,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#DeleteContainerPolicyOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#DeleteCorsPolicy": { "type": "operation", @@ -455,11 +481,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#DeleteCorsPolicyOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#DeleteLifecyclePolicy": { "type": "operation", @@ -497,11 +529,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#DeleteLifecyclePolicyOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#DeleteMetricPolicy": { "type": "operation", @@ -539,11 +577,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#DeleteMetricPolicyOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#DescribeContainer": { "type": "operation", @@ -574,6 +618,9 @@ "smithy.api#documentation": "

The name of the container to query.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#DescribeContainerOutput": { @@ -585,6 +632,9 @@ "smithy.api#documentation": "

The name of the queried container.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastore#Endpoint": { @@ -594,7 +644,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$" } }, "com.amazonaws.mediastore#ErrorMessage": { @@ -604,7 +654,7 @@ "min": 1, "max": 255 }, - "smithy.api#pattern": "[ \\w:\\.\\?-]+" + "smithy.api#pattern": "^[ \\w:\\.\\?-]+$" } }, "com.amazonaws.mediastore#ExposeHeaders": { @@ -655,6 +705,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#GetContainerPolicyOutput": { @@ -667,6 +720,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastore#GetCorsPolicy": { @@ -705,6 +761,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#GetCorsPolicyOutput": { @@ -717,6 +776,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastore#GetLifecyclePolicy": { @@ -755,6 +817,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#GetLifecyclePolicyOutput": { @@ -767,6 +832,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastore#GetMetricPolicy": { @@ -805,6 +873,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#GetMetricPolicyOutput": { @@ -817,6 +888,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastore#Header": { @@ -826,7 +900,7 @@ "min": 1, "max": 8192 }, - "smithy.api#pattern": "[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$" } }, "com.amazonaws.mediastore#InternalServerError": { @@ -848,7 +922,7 @@ "min": 0, "max": 8192 }, - "smithy.api#pattern": "[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$" } }, "com.amazonaws.mediastore#LimitExceededException": { @@ -900,6 +974,9 @@ "smithy.api#documentation": "

Enter the maximum number of containers in the response. Use from 1 to 255 characters.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#ListContainersOutput": { @@ -918,6 +995,9 @@ "smithy.api#documentation": "

\n NextToken is the token to use in the next call to ListContainers.\n This token is returned only if you included the MaxResults tag in the original\n command, and only if there are still containers to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastore#ListTagsForResource": { @@ -953,6 +1033,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#ListTagsForResourceOutput": { @@ -964,6 +1047,9 @@ "smithy.api#documentation": "

An array of key:value pairs that are assigned to the container.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mediastore#MaxAgeSeconds": { @@ -1121,52 +1207,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1174,13 +1264,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1190,224 +1289,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mediastore-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://mediastore-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mediastore-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://mediastore-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mediastore.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://mediastore.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://mediastore.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://mediastore.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1422,8 +1472,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1435,8 +1485,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1448,8 +1498,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1461,8 +1511,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1474,8 +1524,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1487,8 +1537,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1500,8 +1550,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1513,8 +1563,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1526,8 +1576,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1539,8 +1589,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1552,8 +1602,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1565,8 +1615,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1578,8 +1628,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1591,8 +1641,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1604,8 +1654,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1617,8 +1667,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1630,8 +1680,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1643,8 +1693,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1656,8 +1706,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1669,8 +1719,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1682,8 +1743,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1695,8 +1767,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1708,8 +1791,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1721,8 +1815,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1734,8 +1828,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1747,8 +1841,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1759,8 +1853,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1771,10 +1865,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1782,26 +1882,32 @@ } }, "com.amazonaws.mediastore#MethodName": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PUT", - "name": "PUT" - }, - { - "value": "GET", - "name": "GET" - }, - { - "value": "DELETE", - "name": "DELETE" - }, - { - "value": "HEAD", - "name": "HEAD" + "type": "enum", + "members": { + "PUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PUT" + } + }, + "GET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GET" } - ] + }, + "DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE" + } + }, + "HEAD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HEAD" + } + } } }, "com.amazonaws.mediastore#MetricPolicy": { @@ -1866,7 +1972,7 @@ "min": 1, "max": 900 }, - "smithy.api#pattern": "/?(?:[A-Za-z0-9_=:\\.\\-\\~\\*]+/){0,10}(?:[A-Za-z0-9_=:\\.\\-\\~\\*]+)?/?" + "smithy.api#pattern": "^/?(?:[A-Za-z0-9_=:\\.\\-\\~\\*]+/){0,10}(?:[A-Za-z0-9_=:\\.\\-\\~\\*]+)?/?$" } }, "com.amazonaws.mediastore#ObjectGroupName": { @@ -1876,7 +1982,7 @@ "min": 1, "max": 30 }, - "smithy.api#pattern": "[a-zA-Z0-9_]+" + "smithy.api#pattern": "^[a-zA-Z0-9_]+$" } }, "com.amazonaws.mediastore#Origin": { @@ -1886,7 +1992,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+" + "smithy.api#pattern": "^[\\u0009\\u000A\\u000D\\u0020-\\u00FF]+$" } }, "com.amazonaws.mediastore#PaginationToken": { @@ -1896,7 +2002,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "[0-9A-Za-z=/+]+" + "smithy.api#pattern": "^[0-9A-Za-z=/+]+$" } }, "com.amazonaws.mediastore#PolicyNotFoundException": { @@ -1951,11 +2057,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#PutContainerPolicyOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#PutCorsPolicy": { "type": "operation", @@ -1997,11 +2109,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#PutCorsPolicyOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#PutLifecyclePolicy": { "type": "operation", @@ -2043,11 +2161,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#PutLifecyclePolicyOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#PutMetricPolicy": { "type": "operation", @@ -2089,11 +2213,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#PutMetricPolicyOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#StartAccessLogging": { "type": "operation", @@ -2128,11 +2258,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#StartAccessLoggingOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#StopAccessLogging": { "type": "operation", @@ -2167,11 +2303,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#StopAccessLoggingOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#Tag": { "type": "structure", @@ -2201,7 +2343,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": "[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*" + "smithy.api#pattern": "^[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*$" } }, "com.amazonaws.mediastore#TagKeyList": { @@ -2262,11 +2404,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#TagResourceOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mediastore#TagValue": { "type": "string", @@ -2275,7 +2423,7 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*" + "smithy.api#pattern": "^[\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*$" } }, "com.amazonaws.mediastore#TimeStamp": { @@ -2321,11 +2469,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mediastore#UntagResourceOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } } } } diff --git a/codegen/sdk-codegen/aws-models/medical-imaging.json b/codegen/sdk-codegen/aws-models/medical-imaging.json index e888dfcaccf..66215e6b763 100644 --- a/codegen/sdk-codegen/aws-models/medical-imaging.json +++ b/codegen/sdk-codegen/aws-models/medical-imaging.json @@ -435,53 +435,53 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://medical-imaging-fips.us-gov-east-1.api.aws" + "url": "https://medical-imaging-fips.us-east-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://medical-imaging-fips.us-gov-east-1.amazonaws.com" + "url": "https://medical-imaging-fips.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-gov-east-1", + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://medical-imaging.us-gov-east-1.api.aws" + "url": "https://medical-imaging.us-east-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://medical-imaging.us-gov-east-1.amazonaws.com" + "url": "https://medical-imaging.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-gov-east-1", + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false } @@ -539,101 +539,101 @@ } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://medical-imaging-fips.us-gov-east-1.api.aws" + } }, "params": { - "Region": "us-iso-east-1", + "Region": "us-gov-east-1", "UseFIPS": true, "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://medical-imaging-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://medical-imaging-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-iso-east-1", + "Region": "us-gov-east-1", "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://medical-imaging.us-gov-east-1.api.aws" + } }, "params": { - "Region": "us-iso-east-1", + "Region": "us-gov-east-1", "UseFIPS": false, "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://medical-imaging.us-iso-east-1.c2s.ic.gov" + "url": "https://medical-imaging.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-iso-east-1", + "Region": "us-gov-east-1", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://medical-imaging-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "Region": "us-east-1", + "Region": "us-iso-east-1", "UseFIPS": true, "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://medical-imaging-fips.us-east-1.amazonaws.com" + "url": "https://medical-imaging-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "Region": "us-east-1", + "Region": "us-iso-east-1", "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://medical-imaging.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "Region": "us-east-1", + "Region": "us-iso-east-1", "UseFIPS": false, "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://medical-imaging.us-east-1.amazonaws.com" + "url": "https://medical-imaging.us-iso-east-1.c2s.ic.gov" } }, "params": { - "Region": "us-east-1", + "Region": "us-iso-east-1", "UseFIPS": false, "UseDualStack": false } @@ -687,7 +687,7 @@ } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" @@ -700,6 +700,19 @@ "Endpoint": "https://example.com" } }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, { "documentation": "For custom endpoint with fips enabled and dualstack disabled", "expect": { @@ -723,6 +736,12 @@ "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/memorydb.json b/codegen/sdk-codegen/aws-models/memorydb.json index 8c7a63a6bc4..97b84e04821 100644 --- a/codegen/sdk-codegen/aws-models/memorydb.json +++ b/codegen/sdk-codegen/aws-models/memorydb.json @@ -427,52 +427,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -480,13 +484,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -496,251 +509,202 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://memory-db-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://memory-db-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://memory-db-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://memory-db-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://memory-db.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "fips" - ] - } - ], - "endpoint": { - "url": "https://memory-db-fips.us-west-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "memorydb", - "signingRegion": "us-west-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, { "conditions": [], "endpoint": { - "url": "https://memory-db.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://memory-db.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "fips" + ] + } + ], + "endpoint": { + "url": "https://memory-db-fips.us-west-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "memorydb", + "signingRegion": "us-west-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://memory-db.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/mgn.json b/codegen/sdk-codegen/aws-models/mgn.json index 842ffe57e82..80c6e633ae0 100644 --- a/codegen/sdk-codegen/aws-models/mgn.json +++ b/codegen/sdk-codegen/aws-models/mgn.json @@ -467,52 +467,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -520,13 +524,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -536,224 +549,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mgn-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://mgn-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mgn-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://mgn-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mgn.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://mgn.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://mgn.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://mgn.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/migration-hub-refactor-spaces.json b/codegen/sdk-codegen/aws-models/migration-hub-refactor-spaces.json index 28ffe997fa6..3d151cb2996 100644 --- a/codegen/sdk-codegen/aws-models/migration-hub-refactor-spaces.json +++ b/codegen/sdk-codegen/aws-models/migration-hub-refactor-spaces.json @@ -3616,52 +3616,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3669,13 +3673,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3685,224 +3698,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://refactor-spaces-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://refactor-spaces-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://refactor-spaces-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://refactor-spaces-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://refactor-spaces.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://refactor-spaces.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://refactor-spaces.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://refactor-spaces.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/migration-hub.json b/codegen/sdk-codegen/aws-models/migration-hub.json index a55702403dd..3d9f9a2bae4 100644 --- a/codegen/sdk-codegen/aws-models/migration-hub.json +++ b/codegen/sdk-codegen/aws-models/migration-hub.json @@ -91,6 +91,7 @@ "arnNamespace": "mgh", "cloudFormationName": "MigrationHub", "cloudTrailEventSource": "migrationhub.amazonaws.com", + "docId": "AWSMigrationHub-2017-05-31", "endpointPrefix": "mgh" }, "aws.auth#sigv4": { @@ -159,52 +160,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -212,13 +217,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -228,224 +242,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mgh-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://mgh-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mgh-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://mgh-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mgh.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://mgh.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://mgh.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://mgh.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -460,8 +425,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -473,8 +438,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -486,8 +451,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -499,8 +464,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -512,8 +477,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -525,8 +490,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -538,8 +503,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -551,8 +516,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -564,8 +529,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -577,8 +542,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -590,8 +555,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -603,8 +568,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -616,8 +581,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -629,8 +594,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -642,8 +607,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -655,8 +620,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -668,8 +633,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -681,8 +646,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -694,8 +670,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -707,8 +694,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -720,8 +718,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -733,8 +742,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -746,8 +755,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -759,8 +768,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -771,8 +780,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -783,10 +792,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -866,22 +881,26 @@ } }, "com.amazonaws.migrationhub#ApplicationStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NOT_STARTED", - "name": "NOT_STARTED" - }, - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" + "type": "enum", + "members": { + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_STARTED" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" } - ] + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + } } }, "com.amazonaws.migrationhub#AssociateCreatedArtifact": { @@ -956,11 +975,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#AssociateCreatedArtifactResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#AssociateDiscoveredResource": { "type": "operation", @@ -1037,11 +1062,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#AssociateDiscoveredResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#ConfigurationId": { "type": "string", @@ -1108,11 +1139,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#CreateProgressUpdateStreamResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#CreatedArtifact": { "type": "structure", @@ -1158,7 +1195,7 @@ "min": 1, "max": 1600 }, - "smithy.api#pattern": "arn:[a-z-]+:[a-z0-9-]+:(?:[a-z0-9-]+|):(?:[0-9]{12}|):.*" + "smithy.api#pattern": "^arn:[a-z-]+:[a-z0-9-]+:(?:[a-z0-9-]+|):(?:[0-9]{12}|):" } }, "com.amazonaws.migrationhub#DeleteProgressUpdateStream": { @@ -1219,11 +1256,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#DeleteProgressUpdateStreamResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#DescribeApplicationState": { "type": "operation", @@ -1273,6 +1316,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#DescribeApplicationStateResult": { @@ -1290,6 +1336,9 @@ "smithy.api#documentation": "

The timestamp when the application status was last updated.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhub#DescribeMigrationTask": { @@ -1344,6 +1393,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#DescribeMigrationTaskResult": { @@ -1355,6 +1407,9 @@ "smithy.api#documentation": "

Object encapsulating information about the migration task.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhub#DisassociateCreatedArtifact": { @@ -1429,11 +1484,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#DisassociateCreatedArtifactResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#DisassociateDiscoveredResource": { "type": "operation", @@ -1507,11 +1568,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#DisassociateDiscoveredResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#DiscoveredResource": { "type": "structure", @@ -1648,11 +1715,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#ImportMigrationTaskResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#InternalServerError": { "type": "structure", @@ -1749,6 +1822,9 @@ "smithy.api#documentation": "

Maximum number of results to be returned per page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#ListApplicationStatesResult": { @@ -1766,6 +1842,9 @@ "smithy.api#documentation": "

If a NextToken was returned by a previous call, there are more results\n available. To retrieve the next page of results, make the call again using the returned\n token in NextToken.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhub#ListCreatedArtifacts": { @@ -1838,6 +1917,9 @@ "smithy.api#documentation": "

Maximum number of results to be returned per page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#ListCreatedArtifactsResult": { @@ -1855,6 +1937,9 @@ "smithy.api#documentation": "

List of created artifacts up to the maximum number of results specified in the\n request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhub#ListDiscoveredResources": { @@ -1927,6 +2012,9 @@ "smithy.api#documentation": "

The maximum number of results returned per page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#ListDiscoveredResourcesResult": { @@ -1944,6 +2032,9 @@ "smithy.api#documentation": "

Returned list of discovered resources associated with the given MigrationTask.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhub#ListMigrationTasks": { @@ -2011,6 +2102,9 @@ "smithy.api#documentation": "

Filter migration tasks by discovered resource name.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#ListMigrationTasksResult": { @@ -2028,6 +2122,9 @@ "smithy.api#documentation": "

Lists the migration task's summary which includes: MigrationTaskName,\n ProgressPercent, ProgressUpdateStream, Status,\n and the UpdateDateTime for each task.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhub#ListProgressUpdateStreams": { @@ -2083,6 +2180,9 @@ "smithy.api#documentation": "

Filter to limit the maximum number of results to list per page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#ListProgressUpdateStreamsResult": { @@ -2100,6 +2200,9 @@ "smithy.api#documentation": "

If there are more streams created than the max result, return the next token to be\n passed to the next call as a bookmark of where to start from.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhub#MaxResults": { @@ -2174,7 +2277,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "[^:|]+" + "smithy.api#pattern": "^[^:|]+$" } }, "com.amazonaws.migrationhub#MigrationTaskSummary": { @@ -2310,11 +2413,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#NotifyApplicationStateResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#NotifyMigrationTaskState": { "type": "operation", @@ -2403,11 +2512,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#NotifyMigrationTaskStateResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#PolicyErrorException": { "type": "structure", @@ -2437,7 +2552,7 @@ "min": 1, "max": 50 }, - "smithy.api#pattern": "[^/:|\\000-\\037]+" + "smithy.api#pattern": "^[^/:|\\000-\\037]+$" } }, "com.amazonaws.migrationhub#ProgressUpdateStreamSummary": { @@ -2532,11 +2647,17 @@ "smithy.api#documentation": "

Optional boolean flag to indicate whether any effect should take place. Used to test if\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhub#PutResourceAttributesResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.migrationhub#ResourceAttribute": { "type": "structure", @@ -2573,50 +2694,68 @@ } }, "com.amazonaws.migrationhub#ResourceAttributeType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IPV4_ADDRESS", - "name": "IPV4_ADDRESS" - }, - { - "value": "IPV6_ADDRESS", - "name": "IPV6_ADDRESS" - }, - { - "value": "MAC_ADDRESS", - "name": "MAC_ADDRESS" - }, - { - "value": "FQDN", - "name": "FQDN" - }, - { - "value": "VM_MANAGER_ID", - "name": "VM_MANAGER_ID" - }, - { - "value": "VM_MANAGED_OBJECT_REFERENCE", - "name": "VM_MANAGED_OBJECT_REFERENCE" - }, - { - "value": "VM_NAME", - "name": "VM_NAME" - }, - { - "value": "VM_PATH", - "name": "VM_PATH" - }, - { - "value": "BIOS_ID", - "name": "BIOS_ID" - }, - { - "value": "MOTHERBOARD_SERIAL_NUMBER", - "name": "MOTHERBOARD_SERIAL_NUMBER" + "type": "enum", + "members": { + "IPV4_ADDRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPV4_ADDRESS" + } + }, + "IPV6_ADDRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPV6_ADDRESS" + } + }, + "MAC_ADDRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MAC_ADDRESS" + } + }, + "FQDN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FQDN" } - ] + }, + "VM_MANAGER_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VM_MANAGER_ID" + } + }, + "VM_MANAGED_OBJECT_REFERENCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VM_MANAGED_OBJECT_REFERENCE" + } + }, + "VM_NAME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VM_NAME" + } + }, + "VM_PATH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VM_PATH" + } + }, + "BIOS_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BIOS_ID" + } + }, + "MOTHERBOARD_SERIAL_NUMBER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MOTHERBOARD_SERIAL_NUMBER" + } + } } }, "com.amazonaws.migrationhub#ResourceAttributeValue": { @@ -2670,26 +2809,32 @@ } }, "com.amazonaws.migrationhub#Status": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NOT_STARTED", - "name": "NOT_STARTED" - }, - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" + "type": "enum", + "members": { + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_STARTED" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" } - ] + } } }, "com.amazonaws.migrationhub#StatusDetail": { diff --git a/codegen/sdk-codegen/aws-models/migrationhub-config.json b/codegen/sdk-codegen/aws-models/migrationhub-config.json index f821b4aa9b9..aa775111ef0 100644 --- a/codegen/sdk-codegen/aws-models/migrationhub-config.json +++ b/codegen/sdk-codegen/aws-models/migrationhub-config.json @@ -117,52 +117,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -170,13 +174,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -186,224 +199,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://migrationhub-config-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://migrationhub-config-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://migrationhub-config-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://migrationhub-config-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://migrationhub-config.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://migrationhub-config.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://migrationhub-config.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://migrationhub-config.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -418,8 +382,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -431,8 +395,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -444,8 +408,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -457,8 +421,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -470,8 +434,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -483,8 +447,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -496,8 +460,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -509,8 +473,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -522,8 +486,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -535,8 +499,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -548,8 +512,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -561,8 +525,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -574,8 +549,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -587,8 +573,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -600,8 +597,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -613,8 +621,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -626,8 +634,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -639,8 +647,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -651,8 +659,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -663,10 +671,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -751,6 +765,9 @@ "smithy.api#documentation": "

Optional Boolean flag to indicate whether any effect should take place. It tests whether\n the caller has permission to make the call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhubconfig#CreateHomeRegionControlResult": { @@ -762,6 +779,9 @@ "smithy.api#documentation": "

This object is the HomeRegionControl object that's returned by a successful\n call to CreateHomeRegionControl.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhubconfig#DescribeHomeRegionControls": { @@ -840,6 +860,9 @@ "smithy.api#documentation": "

If a NextToken was returned by a previous call, more results are available.\n To retrieve the next page of results, make the call again using the returned token in\n NextToken.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.migrationhubconfig#DescribeHomeRegionControlsResult": { @@ -857,6 +880,9 @@ "smithy.api#documentation": "

If a NextToken was returned by a previous call, more results are available.\n To retrieve the next page of results, make the call again using the returned token in\n NextToken.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhubconfig#DryRun": { @@ -911,7 +937,10 @@ }, "com.amazonaws.migrationhubconfig#GetHomeRegionRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.migrationhubconfig#GetHomeRegionResult": { "type": "structure", @@ -922,6 +951,9 @@ "smithy.api#documentation": "

The name of the home region of the calling account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.migrationhubconfig#HomeRegion": { @@ -1055,14 +1087,14 @@ } }, "com.amazonaws.migrationhubconfig#TargetType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACCOUNT", - "name": "ACCOUNT" + "type": "enum", + "members": { + "ACCOUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCOUNT" } - ] + } } }, "com.amazonaws.migrationhubconfig#ThrottlingException": { diff --git a/codegen/sdk-codegen/aws-models/migrationhuborchestrator.json b/codegen/sdk-codegen/aws-models/migrationhuborchestrator.json index 9acf80a8168..adfc31af45b 100644 --- a/codegen/sdk-codegen/aws-models/migrationhuborchestrator.json +++ b/codegen/sdk-codegen/aws-models/migrationhuborchestrator.json @@ -436,55 +436,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://migrationhub-orchestrator-fips.us-gov-east-1.api.aws" + "url": "https://migrationhub-orchestrator-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://migrationhub-orchestrator-fips.us-gov-east-1.amazonaws.com" + "url": "https://migrationhub-orchestrator-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://migrationhub-orchestrator.us-gov-east-1.api.aws" + "url": "https://migrationhub-orchestrator.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://migrationhub-orchestrator.us-gov-east-1.amazonaws.com" + "url": "https://migrationhub-orchestrator.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -495,9 +495,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -508,9 +508,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -521,9 +521,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -534,109 +534,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://migrationhub-orchestrator-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://migrationhub-orchestrator-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://migrationhub-orchestrator-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://migrationhub-orchestrator.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://migrationhub-orchestrator.us-iso-east-1.c2s.ic.gov" + "url": "https://migrationhub-orchestrator.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://migrationhub-orchestrator-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://migrationhub-orchestrator-fips.us-east-1.amazonaws.com" + "url": "https://migrationhub-orchestrator-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://migrationhub-orchestrator.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://migrationhub-orchestrator.us-east-1.amazonaws.com" + "url": "https://migrationhub-orchestrator.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -645,9 +645,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -658,9 +658,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -669,9 +669,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -682,22 +682,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -707,9 +720,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -719,11 +732,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -5171,4 +5190,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/migrationhubstrategy.json b/codegen/sdk-codegen/aws-models/migrationhubstrategy.json index 16d3cde21e6..6089f8a3c81 100644 --- a/codegen/sdk-codegen/aws-models/migrationhubstrategy.json +++ b/codegen/sdk-codegen/aws-models/migrationhubstrategy.json @@ -141,52 +141,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -194,13 +198,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -210,224 +223,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://migrationhub-strategy-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://migrationhub-strategy-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://migrationhub-strategy-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://migrationhub-strategy-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://migrationhub-strategy.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://migrationhub-strategy.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://migrationhub-strategy.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://migrationhub-strategy.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -667,6 +631,17 @@ "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": { @@ -680,6 +655,17 @@ "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": { @@ -693,6 +679,17 @@ "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": { @@ -706,6 +703,17 @@ "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": { @@ -769,6 +777,12 @@ "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/mobile.json b/codegen/sdk-codegen/aws-models/mobile.json index 126900e5e31..86d89569714 100644 --- a/codegen/sdk-codegen/aws-models/mobile.json +++ b/codegen/sdk-codegen/aws-models/mobile.json @@ -138,52 +138,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -191,13 +195,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -207,224 +220,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mobile-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://mobile-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mobile-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://mobile-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mobile.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://mobile.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://mobile.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://mobile.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -439,8 +403,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -452,8 +416,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -465,8 +429,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -478,8 +442,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -491,8 +455,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -504,8 +468,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -517,8 +481,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -530,8 +494,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -543,8 +507,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -556,8 +520,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -569,8 +533,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -582,8 +546,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -595,8 +570,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -608,8 +594,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -621,8 +618,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -634,8 +642,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -647,8 +655,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -660,8 +668,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -672,8 +680,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -684,10 +692,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -891,7 +905,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Request structure used to request a project be created.\n

" + "smithy.api#documentation": "

\n Request structure used to request a project be created.\n

", + "smithy.api#input": {} } }, "com.amazonaws.mobile#CreateProjectResult": { @@ -905,7 +920,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Result structure used in response to a request to create a project.\n

" + "smithy.api#documentation": "

\n Result structure used in response to a request to create a project.\n

", + "smithy.api#output": {} } }, "com.amazonaws.mobile#Date": { @@ -958,7 +974,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Request structure used to request a project be deleted.\n

" + "smithy.api#documentation": "

\n Request structure used to request a project be deleted.\n

", + "smithy.api#input": {} } }, "com.amazonaws.mobile#DeleteProjectResult": { @@ -978,7 +995,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Result structure used in response to request to delete a project.\n

" + "smithy.api#documentation": "

\n Result structure used in response to request to delete a project.\n

", + "smithy.api#output": {} } }, "com.amazonaws.mobile#DescribeBundle": { @@ -1031,7 +1049,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Request structure to request the details of a specific bundle.\n

" + "smithy.api#documentation": "

\n Request structure to request the details of a specific bundle.\n

", + "smithy.api#input": {} } }, "com.amazonaws.mobile#DescribeBundleResult": { @@ -1045,7 +1064,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Result structure contains the details of the bundle.\n

" + "smithy.api#documentation": "

\n Result structure contains the details of the bundle.\n

", + "smithy.api#output": {} } }, "com.amazonaws.mobile#DescribeProject": { @@ -1106,7 +1126,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Request structure used to request details about a project.\n

" + "smithy.api#documentation": "

\n Request structure used to request details about a project.\n

", + "smithy.api#input": {} } }, "com.amazonaws.mobile#DescribeProjectResult": { @@ -1117,7 +1138,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Result structure used for requests of project details.\n

" + "smithy.api#documentation": "

\n Result structure used for requests of project details.\n

", + "smithy.api#output": {} } }, "com.amazonaws.mobile#DownloadUrl": { @@ -1196,7 +1218,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Request structure used to request generation of custom SDK and tool packages\n required to integrate mobile web or app clients with backed AWS resources.\n

" + "smithy.api#documentation": "

\n Request structure used to request generation of custom SDK and tool packages\n required to integrate mobile web or app clients with backed AWS resources.\n

", + "smithy.api#input": {} } }, "com.amazonaws.mobile#ExportBundleResult": { @@ -1210,7 +1233,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Result structure which contains link to download custom-generated SDK and\n tool packages used to integrate mobile web or app clients with backed\n AWS resources.\n

" + "smithy.api#documentation": "

\n Result structure which contains link to download custom-generated SDK and\n tool packages used to integrate mobile web or app clients with backed\n AWS resources.\n

", + "smithy.api#output": {} } }, "com.amazonaws.mobile#ExportProject": { @@ -1263,7 +1287,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Request structure used in requests to export project configuration details.\n

" + "smithy.api#documentation": "

\n Request structure used in requests to export project configuration details.\n

", + "smithy.api#input": {} } }, "com.amazonaws.mobile#ExportProjectResult": { @@ -1289,7 +1314,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Result structure used for requests to export project configuration details.\n

" + "smithy.api#documentation": "

\n Result structure used for requests to export project configuration details.\n

", + "smithy.api#output": {} } }, "com.amazonaws.mobile#Feature": { @@ -1395,7 +1421,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Request structure to request all available bundles.\n

" + "smithy.api#documentation": "

\n Request structure to request all available bundles.\n

", + "smithy.api#input": {} } }, "com.amazonaws.mobile#ListBundlesResult": { @@ -1415,7 +1442,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Result structure contains a list of all available bundles with details.\n

" + "smithy.api#documentation": "

\n Result structure contains a list of all available bundles with details.\n

", + "smithy.api#output": {} } }, "com.amazonaws.mobile#ListProjects": { @@ -1477,7 +1505,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Request structure used to request projects list in AWS Mobile Hub.\n

" + "smithy.api#documentation": "

\n Request structure used to request projects list in AWS Mobile Hub.\n

", + "smithy.api#input": {} } }, "com.amazonaws.mobile#ListProjectsResult": { @@ -1491,7 +1520,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Result structure used for requests to list projects in AWS Mobile Hub.\n

" + "smithy.api#documentation": "

\n Result structure used for requests to list projects in AWS Mobile Hub.\n

", + "smithy.api#output": {} } }, "com.amazonaws.mobile#MaxResults": { @@ -1521,39 +1551,53 @@ } }, "com.amazonaws.mobile#Platform": { - "type": "string", - "traits": { - "smithy.api#documentation": "

\n Developer desktop or target mobile app or website platform.\n

", - "smithy.api#enum": [ - { - "value": "OSX", - "name": "OSX" - }, - { - "value": "WINDOWS", - "name": "WINDOWS" - }, - { - "value": "LINUX", - "name": "LINUX" - }, - { - "value": "OBJC", - "name": "OBJC" - }, - { - "value": "SWIFT", - "name": "SWIFT" - }, - { - "value": "ANDROID", - "name": "ANDROID" - }, - { - "value": "JAVASCRIPT", - "name": "JAVASCRIPT" + "type": "enum", + "members": { + "OSX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OSX" + } + }, + "WINDOWS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WINDOWS" + } + }, + "LINUX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINUX" + } + }, + "OBJC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OBJC" + } + }, + "SWIFT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SWIFT" + } + }, + "ANDROID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ANDROID" + } + }, + "JAVASCRIPT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JAVASCRIPT" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

\n Developer desktop or target mobile app or website platform.\n

" } }, "com.amazonaws.mobile#Platforms": { @@ -1625,23 +1669,29 @@ } }, "com.amazonaws.mobile#ProjectState": { - "type": "string", - "traits": { - "smithy.api#documentation": "

\n Synchronization state for a project.\n

", - "smithy.api#enum": [ - { - "value": "NORMAL", - "name": "NORMAL" - }, - { - "value": "SYNCING", - "name": "SYNCING" - }, - { - "value": "IMPORTING", - "name": "IMPORTING" + "type": "enum", + "members": { + "NORMAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NORMAL" } - ] + }, + "SYNCING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SYNCING" + } + }, + "IMPORTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IMPORTING" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Synchronization state for a project.\n

" } }, "com.amazonaws.mobile#ProjectSummaries": { @@ -1849,7 +1899,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Request structure used for requests to update project configuration.\n

" + "smithy.api#documentation": "

\n Request structure used for requests to update project configuration.\n

", + "smithy.api#input": {} } }, "com.amazonaws.mobile#UpdateProjectResult": { @@ -1863,7 +1914,8 @@ } }, "traits": { - "smithy.api#documentation": "

\n Result structure used for requests to updated project configuration.\n

" + "smithy.api#documentation": "

\n Result structure used for requests to updated project configuration.\n

", + "smithy.api#output": {} } } } diff --git a/codegen/sdk-codegen/aws-models/mq.json b/codegen/sdk-codegen/aws-models/mq.json index f8845f59120..76f345eb797 100644 --- a/codegen/sdk-codegen/aws-models/mq.json +++ b/codegen/sdk-codegen/aws-models/mq.json @@ -4057,52 +4057,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -4110,13 +4114,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -4126,224 +4139,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mq-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://mq-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mq-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://mq-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mq.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://mq.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://mq.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://mq.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/mturk.json b/codegen/sdk-codegen/aws-models/mturk.json index 85c12dae9fc..c424d11dcf9 100644 --- a/codegen/sdk-codegen/aws-models/mturk.json +++ b/codegen/sdk-codegen/aws-models/mturk.json @@ -65,11 +65,17 @@ "smithy.api#documentation": "

\n The value of the Qualification. You can omit this value if you are using the\n presence or absence of the Qualification as the basis for a HIT requirement.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#AcceptQualificationRequestResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#ApproveAssignment": { "type": "operation", @@ -114,11 +120,17 @@ "smithy.api#documentation": "

\n A flag indicating that an assignment should be approved even if it was previously rejected. Defaults to False.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ApproveAssignmentResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#Assignment": { "type": "structure", @@ -207,22 +219,26 @@ } }, "com.amazonaws.mturk#AssignmentStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Submitted", - "name": "Submitted" - }, - { - "value": "Approved", - "name": "Approved" - }, - { - "value": "Rejected", - "name": "Rejected" + "type": "enum", + "members": { + "Submitted": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Submitted" + } + }, + "Approved": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Approved" + } + }, + "Rejected": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Rejected" } - ] + } } }, "com.amazonaws.mturk#AssignmentStatusList": { @@ -280,11 +296,17 @@ "smithy.api#documentation": "

\n Specifies whether to send a notification email message to the Worker\n saying that the qualification was assigned to the Worker.\n Note: this is true by default.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#AssociateQualificationWithWorkerResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#BonusPayment": { "type": "structure", @@ -331,50 +353,68 @@ "type": "boolean" }, "com.amazonaws.mturk#Comparator": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "LessThan", - "name": "LessThan" - }, - { - "value": "LessThanOrEqualTo", - "name": "LessThanOrEqualTo" - }, - { - "value": "GreaterThan", - "name": "GreaterThan" - }, - { - "value": "GreaterThanOrEqualTo", - "name": "GreaterThanOrEqualTo" - }, - { - "value": "EqualTo", - "name": "EqualTo" - }, - { - "value": "NotEqualTo", - "name": "NotEqualTo" - }, - { - "value": "Exists", - "name": "Exists" - }, - { - "value": "DoesNotExist", - "name": "DoesNotExist" - }, - { - "value": "In", - "name": "In" - }, - { - "value": "NotIn", - "name": "NotIn" + "type": "enum", + "members": { + "LessThan": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LessThan" + } + }, + "LessThanOrEqualTo": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LessThanOrEqualTo" + } + }, + "GreaterThan": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GreaterThan" + } + }, + "GreaterThanOrEqualTo": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GreaterThanOrEqualTo" + } + }, + "EqualTo": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EqualTo" + } + }, + "NotEqualTo": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NotEqualTo" + } + }, + "Exists": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Exists" + } + }, + "DoesNotExist": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DoesNotExist" + } + }, + "In": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "In" + } + }, + "NotIn": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NotIn" } - ] + } } }, "com.amazonaws.mturk#CountryParameters": { @@ -429,11 +469,17 @@ "smithy.api#documentation": "

\n A unique identifier for this request, which allows you to retry the call on error\n without extending the HIT multiple times.\n This is useful in cases such as network timeouts where it is unclear whether or not\n the call succeeded on the server. If the extend HIT already exists in the system\n from a previous call using the same UniqueRequestToken,\n subsequent calls will return an error with a message containing the request ID.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#CreateAdditionalAssignmentsForHITResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#CreateHIT": { "type": "operation", @@ -559,6 +605,9 @@ "smithy.api#documentation": "

\n If the HITLayoutId is provided, any placeholder values must be filled in with values\n using the HITLayoutParameter structure. For more information, see HITLayout.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#CreateHITResponse": { @@ -570,6 +619,9 @@ "smithy.api#documentation": "

Contains the newly created HIT data. For a description of\n the HIT data structure as it appears in responses, see the HIT Data\n Structure documentation.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#CreateHITType": { @@ -642,6 +694,9 @@ "smithy.api#documentation": "

\n Conditions that a Worker's Qualifications must meet in order\n to accept the HIT. A HIT can have between zero and ten\n Qualification requirements. All requirements must be met in\n order for a Worker to accept the HIT. Additionally, other\n actions can be restricted using the ActionsGuarded\n field on each QualificationRequirement structure.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#CreateHITTypeResponse": { @@ -653,6 +708,9 @@ "smithy.api#documentation": "

The ID of the newly registered HIT type.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#CreateHITWithHITType": { @@ -740,6 +798,9 @@ "smithy.api#documentation": "

\n If the HITLayoutId is provided, any placeholder values must be filled in with values\n using the HITLayoutParameter structure. For more information, see HITLayout.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#CreateHITWithHITTypeResponse": { @@ -751,6 +812,9 @@ "smithy.api#documentation": "

Contains the newly created HIT data. For a description of\n the HIT data structure as it appears in responses, see the HIT Data\n Structure documentation.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#CreateQualificationType": { @@ -839,6 +903,9 @@ "smithy.api#documentation": "

The Qualification value to use for automatically granted\n Qualifications. This parameter is used only if the AutoGranted\n parameter is true.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#CreateQualificationTypeResponse": { @@ -850,6 +917,9 @@ "smithy.api#documentation": "

The created Qualification type, returned as a\n QualificationType data structure.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#CreateWorkerBlock": { @@ -889,11 +959,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#CreateWorkerBlockResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#CurrencyAmount": { "type": "string", @@ -949,11 +1025,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#DeleteHITResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#DeleteQualificationType": { "type": "operation", @@ -986,11 +1068,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#DeleteQualificationTypeResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#DeleteWorkerBlock": { "type": "operation", @@ -1029,11 +1117,17 @@ "smithy.api#documentation": "

A message that explains the reason for unblocking the Worker. The Worker does not see this message.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#DeleteWorkerBlockResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#DisassociateQualificationFromWorker": { "type": "operation", @@ -1078,11 +1172,17 @@ "smithy.api#documentation": "

A text message that explains why the Qualification was revoked. The user who had the Qualification sees this message.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#DisassociateQualificationFromWorkerResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#EntityId": { "type": "string", @@ -1095,58 +1195,80 @@ } }, "com.amazonaws.mturk#EventType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AssignmentAccepted", - "name": "AssignmentAccepted" - }, - { - "value": "AssignmentAbandoned", - "name": "AssignmentAbandoned" - }, - { - "value": "AssignmentReturned", - "name": "AssignmentReturned" - }, - { - "value": "AssignmentSubmitted", - "name": "AssignmentSubmitted" - }, - { - "value": "AssignmentRejected", - "name": "AssignmentRejected" - }, - { - "value": "AssignmentApproved", - "name": "AssignmentApproved" - }, - { - "value": "HITCreated", - "name": "HITCreated" - }, - { - "value": "HITExpired", - "name": "HITExpired" - }, - { - "value": "HITReviewable", - "name": "HITReviewable" - }, - { - "value": "HITExtended", - "name": "HITExtended" - }, - { - "value": "HITDisposed", - "name": "HITDisposed" - }, - { - "value": "Ping", - "name": "Ping" + "type": "enum", + "members": { + "AssignmentAccepted": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AssignmentAccepted" + } + }, + "AssignmentAbandoned": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AssignmentAbandoned" + } + }, + "AssignmentReturned": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AssignmentReturned" + } + }, + "AssignmentSubmitted": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AssignmentSubmitted" + } + }, + "AssignmentRejected": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AssignmentRejected" + } + }, + "AssignmentApproved": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AssignmentApproved" + } + }, + "HITCreated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HITCreated" + } + }, + "HITExpired": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HITExpired" + } + }, + "HITReviewable": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HITReviewable" + } + }, + "HITExtended": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HITExtended" + } + }, + "HITDisposed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HITDisposed" + } + }, + "Ping": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Ping" } - ] + } } }, "com.amazonaws.mturk#EventTypeList": { @@ -1181,7 +1303,10 @@ }, "com.amazonaws.mturk#GetAccountBalanceRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.mturk#GetAccountBalanceResponse": { "type": "structure", @@ -1192,6 +1317,9 @@ "OnHoldBalance": { "target": "com.amazonaws.mturk#CurrencyAmount" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#GetAssignment": { @@ -1225,6 +1353,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#GetAssignmentResponse": { @@ -1242,6 +1373,9 @@ "smithy.api#documentation": "

The HIT associated with this assignment. The response\n includes one HIT element.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#GetFileUploadURL": { @@ -1282,6 +1416,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#GetFileUploadURLResponse": { @@ -1293,6 +1430,9 @@ "smithy.api#documentation": "

A temporary URL for the file that the Worker uploaded for\n the answer.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#GetHIT": { @@ -1326,6 +1466,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#GetHITResponse": { @@ -1337,6 +1480,9 @@ "smithy.api#documentation": "

Contains the requested HIT data.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#GetQualificationScore": { @@ -1377,6 +1523,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#GetQualificationScoreResponse": { @@ -1388,6 +1537,9 @@ "smithy.api#documentation": "

The Qualification data structure of the Qualification\n assigned to a user, including the Qualification type and the value\n (score).\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#GetQualificationType": { @@ -1421,6 +1573,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#GetQualificationTypeResponse": { @@ -1432,6 +1587,9 @@ "smithy.api#documentation": "

The returned Qualification Type

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#HIT": { @@ -1566,22 +1724,26 @@ } }, "com.amazonaws.mturk#HITAccessActions": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Accept", - "name": "Accept" - }, - { - "value": "PreviewAndAccept", - "name": "PreviewAndAccept" - }, - { - "value": "DiscoverPreviewAndAccept", - "name": "DiscoverPreviewAndAccept" + "type": "enum", + "members": { + "Accept": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Accept" + } + }, + "PreviewAndAccept": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PreviewAndAccept" } - ] + }, + "DiscoverPreviewAndAccept": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DiscoverPreviewAndAccept" + } + } } }, "com.amazonaws.mturk#HITLayoutParameter": { @@ -1619,53 +1781,67 @@ } }, "com.amazonaws.mturk#HITReviewStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NotReviewed", - "name": "NotReviewed" - }, - { - "value": "MarkedForReview", - "name": "MarkedForReview" - }, - { - "value": "ReviewedAppropriate", - "name": "ReviewedAppropriate" - }, - { - "value": "ReviewedInappropriate", - "name": "ReviewedInappropriate" + "type": "enum", + "members": { + "NotReviewed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NotReviewed" + } + }, + "MarkedForReview": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MarkedForReview" + } + }, + "ReviewedAppropriate": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReviewedAppropriate" + } + }, + "ReviewedInappropriate": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReviewedInappropriate" } - ] + } } }, "com.amazonaws.mturk#HITStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Assignable", - "name": "Assignable" - }, - { - "value": "Unassignable", - "name": "Unassignable" - }, - { - "value": "Reviewable", - "name": "Reviewable" - }, - { - "value": "Reviewing", - "name": "Reviewing" - }, - { - "value": "Disposed", - "name": "Disposed" + "type": "enum", + "members": { + "Assignable": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Assignable" + } + }, + "Unassignable": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Unassignable" + } + }, + "Reviewable": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Reviewable" + } + }, + "Reviewing": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Reviewing" + } + }, + "Disposed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Disposed" } - ] + } } }, "com.amazonaws.mturk#IdempotencyToken": { @@ -1737,6 +1913,9 @@ "smithy.api#documentation": "

The status of the assignments to return: Submitted | Approved\n | Rejected

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListAssignmentsForHITResponse": { @@ -1757,6 +1936,9 @@ "smithy.api#documentation": "

The collection of Assignment data structures returned by\n this call.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#ListBonusPayments": { @@ -1809,6 +1991,9 @@ "MaxResults": { "target": "com.amazonaws.mturk#ResultSize" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListBonusPaymentsResponse": { @@ -1829,6 +2014,9 @@ "smithy.api#documentation": "

A successful request to the ListBonusPayments operation\n returns a list of BonusPayment objects.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#ListHITs": { @@ -1905,6 +2093,9 @@ "smithy.api#documentation": "

\n Limit the number of results returned.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListHITsForQualificationTypeResponse": { @@ -1925,6 +2116,9 @@ "smithy.api#documentation": "

The list of HIT elements returned by the query.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#ListHITsRequest": { @@ -1939,6 +2133,9 @@ "MaxResults": { "target": "com.amazonaws.mturk#ResultSize" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListHITsResponse": { @@ -1959,6 +2156,9 @@ "smithy.api#documentation": "

The list of HIT elements returned by the query.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#ListQualificationRequests": { @@ -2005,6 +2205,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListQualificationRequestsResponse": { @@ -2025,6 +2228,9 @@ "smithy.api#documentation": "

The Qualification request. The response includes one\n QualificationRequest element\n for each Qualification request returned\n by the query.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#ListQualificationTypes": { @@ -2084,6 +2290,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListQualificationTypesResponse": { @@ -2104,6 +2313,9 @@ "smithy.api#documentation": "

The list of QualificationType elements returned by the\n query.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#ListReviewPolicyResultsForHIT": { @@ -2172,6 +2384,9 @@ "smithy.api#documentation": "

Limit the number of results returned.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListReviewPolicyResultsForHITResponse": { @@ -2210,6 +2425,9 @@ "NextToken": { "target": "com.amazonaws.mturk#PaginationToken" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#ListReviewableHITs": { @@ -2265,6 +2483,9 @@ "smithy.api#documentation": "

\n Limit the number of results returned.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListReviewableHITsResponse": { @@ -2285,6 +2506,9 @@ "smithy.api#documentation": "

The list of HIT elements returned by the query.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#ListWorkerBlocks": { @@ -2325,6 +2549,9 @@ "MaxResults": { "target": "com.amazonaws.mturk#ResultSize" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListWorkerBlocksResponse": { @@ -2345,6 +2572,9 @@ "smithy.api#documentation": "

The list of WorkerBlocks, containing the collection of\n Worker IDs and reasons for blocking.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#ListWorkersWithQualificationType": { @@ -2401,6 +2631,9 @@ "smithy.api#documentation": "

\n Limit the number of results returned.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#ListWorkersWithQualificationTypeResponse": { @@ -2421,6 +2654,9 @@ "smithy.api#documentation": "

The list of Qualification elements returned by this call.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#Locale": { @@ -2581,6 +2817,7 @@ "arnNamespace": "mturk-requester", "cloudFormationName": "MTurk", "cloudTrailEventSource": "mturk.amazonaws.com", + "docId": "mturk-requester-2017-01-17", "endpointPrefix": "mturk-requester" }, "aws.auth#sigv4": { @@ -2652,52 +2889,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2705,13 +2946,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2721,243 +2971,194 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mturk-requester-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://mturk-requester-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://mturk-requester-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://mturk-requester-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://mturk-requester.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "sandbox" - ] - } - ], - "endpoint": { - "url": "https://mturk-requester-sandbox.us-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, { "conditions": [], "endpoint": { - "url": "https://mturk-requester.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://mturk-requester.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "sandbox" + ] + } + ], + "endpoint": { + "url": "https://mturk-requester-sandbox.us-east-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://mturk-requester.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2972,8 +3173,8 @@ }, "params": { "Region": "sandbox", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2985,8 +3186,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2998,8 +3199,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3011,8 +3212,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3024,8 +3225,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3037,8 +3238,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3050,8 +3251,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3063,8 +3264,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3076,8 +3277,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3089,8 +3290,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3102,8 +3303,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3115,8 +3316,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3128,8 +3329,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3141,8 +3353,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3154,8 +3377,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3167,8 +3401,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3180,8 +3425,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3193,8 +3438,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3206,8 +3451,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3218,8 +3463,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3230,10 +3475,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3277,22 +3528,26 @@ } }, "com.amazonaws.mturk#NotificationTransport": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Email", - "name": "Email" - }, - { - "value": "SQS", - "name": "SQS" - }, - { - "value": "SNS", - "name": "SNS" + "type": "enum", + "members": { + "Email": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Email" } - ] + }, + "SQS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SQS" + } + }, + "SNS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNS" + } + } } }, "com.amazonaws.mturk#NotifyWorkers": { @@ -3316,18 +3571,20 @@ } }, "com.amazonaws.mturk#NotifyWorkersFailureCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SoftFailure", - "name": "SoftFailure" - }, - { - "value": "HardFailure", - "name": "HardFailure" + "type": "enum", + "members": { + "SoftFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SoftFailure" + } + }, + "HardFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HardFailure" } - ] + } } }, "com.amazonaws.mturk#NotifyWorkersFailureStatus": { @@ -3386,6 +3643,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#NotifyWorkersResponse": { @@ -3397,6 +3657,9 @@ "smithy.api#documentation": "

When MTurk sends notifications to the list of Workers, it\n returns back any failures it encounters in this list of\n NotifyWorkersFailureStatus objects.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#PaginationToken": { @@ -3618,18 +3881,20 @@ } }, "com.amazonaws.mturk#QualificationStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Granted", - "name": "Granted" - }, - { - "value": "Revoked", - "name": "Revoked" + "type": "enum", + "members": { + "Granted": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Granted" + } + }, + "Revoked": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Revoked" } - ] + } } }, "com.amazonaws.mturk#QualificationType": { @@ -3725,18 +3990,20 @@ } }, "com.amazonaws.mturk#QualificationTypeStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Active", - "name": "Active" - }, - { - "value": "Inactive", - "name": "Inactive" + "type": "enum", + "members": { + "Active": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Active" + } + }, + "Inactive": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Inactive" } - ] + } } }, "com.amazonaws.mturk#RejectAssignment": { @@ -3777,11 +4044,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#RejectAssignmentResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#RejectQualificationRequest": { "type": "operation", @@ -3819,11 +4092,17 @@ "smithy.api#documentation": "

A text message explaining why the request was rejected, to be\n shown to the Worker who made the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#RejectQualificationRequestResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#RequestError": { "type": "structure", @@ -3836,6 +4115,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "RequestError", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

Your request is invalid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -3913,26 +4196,32 @@ } }, "com.amazonaws.mturk#ReviewActionStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Intended", - "name": "Intended" - }, - { - "value": "Succeeded", - "name": "Succeeded" - }, - { - "value": "Failed", - "name": "Failed" - }, - { - "value": "Cancelled", - "name": "Cancelled" + "type": "enum", + "members": { + "Intended": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Intended" + } + }, + "Succeeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Succeeded" + } + }, + "Failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" } - ] + }, + "Cancelled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Cancelled" + } + } } }, "com.amazonaws.mturk#ReviewPolicy": { @@ -3957,18 +4246,20 @@ } }, "com.amazonaws.mturk#ReviewPolicyLevel": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Assignment", - "name": "Assignment" - }, - { - "value": "HIT", - "name": "HIT" + "type": "enum", + "members": { + "Assignment": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Assignment" + } + }, + "HIT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HIT" } - ] + } } }, "com.amazonaws.mturk#ReviewPolicyLevelList": { @@ -4048,18 +4339,20 @@ } }, "com.amazonaws.mturk#ReviewableHITStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Reviewable", - "name": "Reviewable" - }, - { - "value": "Reviewing", - "name": "Reviewing" + "type": "enum", + "members": { + "Reviewable": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Reviewable" } - ] + }, + "Reviewing": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Reviewing" + } + } } }, "com.amazonaws.mturk#SendBonus": { @@ -4119,11 +4412,17 @@ "smithy.api#documentation": "

A unique identifier for this request, which allows you to\n retry the call on error without granting multiple bonuses. This is\n useful in cases such as network timeouts where it is unclear whether\n or not the call succeeded on the server. If the bonus already exists\n in the system from a previous call using the same UniqueRequestToken,\n subsequent calls will return an error with a message containing the\n request ID.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#SendBonusResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#SendTestEventNotification": { "type": "operation", @@ -4162,11 +4461,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#SendTestEventNotificationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#ServiceFault": { "type": "structure", @@ -4179,6 +4484,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ServiceFault", + "httpResponseCode": 500 + }, "smithy.api#documentation": "

Amazon Mechanical Turk is temporarily unable to process your request. Try your call again.

", "smithy.api#error": "server", "smithy.api#httpError": 500 @@ -4237,11 +4546,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#UpdateExpirationForHITResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#UpdateHITReviewStatus": { "type": "operation", @@ -4280,11 +4595,17 @@ "smithy.api#documentation": "

\n Specifies how to update the HIT status. Default is False.\n

\n
    \n
  • \n

    \n Setting this to false will only transition a HIT from Reviewable to Reviewing\n

    \n
  • \n
  • \n

    \n Setting this to true will only transition a HIT from Reviewing to Reviewable\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#UpdateHITReviewStatusResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#UpdateHITTypeOfHIT": { "type": "operation", @@ -4324,11 +4645,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#UpdateHITTypeOfHITResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#UpdateNotificationSettings": { "type": "operation", @@ -4373,11 +4700,17 @@ "smithy.api#documentation": "

\n Specifies whether notifications are sent for HITs of this HIT type,\n according to the notification specification.\n You must specify either the Notification parameter or the Active parameter\n for the call to UpdateNotificationSettings to succeed.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#UpdateNotificationSettingsResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.mturk#UpdateQualificationType": { "type": "operation", @@ -4457,6 +4790,9 @@ "smithy.api#documentation": "

The Qualification value to use for automatically granted Qualifications. This parameter is used only if the AutoGranted parameter is true.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.mturk#UpdateQualificationTypeResponse": { @@ -4468,6 +4804,9 @@ "smithy.api#documentation": "

Contains a QualificationType data structure.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.mturk#WorkerBlock": { diff --git a/codegen/sdk-codegen/aws-models/mwaa.json b/codegen/sdk-codegen/aws-models/mwaa.json index 747e02550ad..52be1efe86f 100644 --- a/codegen/sdk-codegen/aws-models/mwaa.json +++ b/codegen/sdk-codegen/aws-models/mwaa.json @@ -145,52 +145,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -198,13 +202,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -214,224 +227,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://airflow-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://airflow-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://airflow-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://airflow-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://airflow.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://airflow.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://airflow.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://airflow.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/neptune.json b/codegen/sdk-codegen/aws-models/neptune.json index 2bc05c7eeeb..2b2694467bf 100644 --- a/codegen/sdk-codegen/aws-models/neptune.json +++ b/codegen/sdk-codegen/aws-models/neptune.json @@ -78,6 +78,9 @@ "smithy.api#documentation": "

The name of the feature for the Neptune DB cluster that the IAM role is to be associated with.\n For the list of supported feature names, see DBEngineVersion.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#AddSourceIdentifierToSubscription": { @@ -117,6 +120,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#AddSourceIdentifierToSubscriptionResult": { @@ -125,6 +131,9 @@ "EventSubscription": { "target": "com.amazonaws.neptune#EventSubscription" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#AddTagsToResource": { @@ -167,6 +176,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#AmazonRDSv19": { @@ -458,52 +470,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -511,13 +527,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -527,92 +552,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rds-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://rds-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -621,155 +637,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://rds.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://rds-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://rds.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://rds-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rds.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://rds.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://rds.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://rds.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1321,6 +1297,17 @@ "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": { @@ -1334,6 +1321,17 @@ "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-isob-east-1 with FIPS disabled and DualStack disabled", "expect": { @@ -1347,6 +1345,17 @@ "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": { @@ -1360,6 +1369,17 @@ "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 custom endpoint with region set and fips disabled and dualstack disabled", "expect": { @@ -1410,6 +1430,12 @@ "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1474,6 +1500,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ApplyPendingMaintenanceActionResult": { @@ -1482,6 +1511,9 @@ "ResourcePendingMaintenanceActions": { "target": "com.amazonaws.neptune#ResourcePendingMaintenanceActions" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#AttributeValueList": { @@ -1717,6 +1749,9 @@ "smithy.api#documentation": "

The tags to be assigned to the copied DB cluster parameter group.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CopyDBClusterParameterGroupResult": { @@ -1725,6 +1760,9 @@ "DBClusterParameterGroup": { "target": "com.amazonaws.neptune#DBClusterParameterGroup" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CopyDBClusterSnapshot": { @@ -1800,6 +1838,9 @@ "smithy.api#documentation": "

The tags to assign to the new DB cluster snapshot copy.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CopyDBClusterSnapshotResult": { @@ -1808,6 +1849,9 @@ "DBClusterSnapshot": { "target": "com.amazonaws.neptune#DBClusterSnapshot" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CopyDBParameterGroup": { @@ -1863,6 +1907,9 @@ "smithy.api#documentation": "

The tags to be assigned to the copied DB parameter group.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CopyDBParameterGroupResult": { @@ -1871,6 +1918,9 @@ "DBParameterGroup": { "target": "com.amazonaws.neptune#DBParameterGroup" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CreateDBCluster": { @@ -2012,6 +2062,9 @@ "smithy.api#documentation": "

The tags to be assigned to the Amazon Neptune resource.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CreateDBClusterEndpointOutput": { @@ -2247,6 +2300,9 @@ "smithy.api#documentation": "

The ID of the Neptune global database to which this new DB cluster\n should be added.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CreateDBClusterParameterGroup": { @@ -2299,6 +2355,9 @@ "smithy.api#documentation": "

The tags to be assigned to the new DB cluster parameter group.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CreateDBClusterParameterGroupResult": { @@ -2307,6 +2366,9 @@ "DBClusterParameterGroup": { "target": "com.amazonaws.neptune#DBClusterParameterGroup" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CreateDBClusterResult": { @@ -2315,6 +2377,9 @@ "DBCluster": { "target": "com.amazonaws.neptune#DBCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CreateDBClusterSnapshot": { @@ -2369,6 +2434,9 @@ "smithy.api#documentation": "

The tags to be assigned to the DB cluster snapshot.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CreateDBClusterSnapshotResult": { @@ -2377,6 +2445,9 @@ "DBClusterSnapshot": { "target": "com.amazonaws.neptune#DBClusterSnapshot" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CreateDBInstance": { @@ -2713,6 +2784,9 @@ "smithy.api#documentation": "

A value that indicates whether the DB instance has deletion protection enabled.\n The database can't be deleted when deletion protection is enabled. By default,\n deletion protection is disabled. See Deleting\n a DB Instance.

\n

DB instances in a DB cluster can be deleted even when deletion\n protection is enabled in their parent DB cluster.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CreateDBInstanceResult": { @@ -2721,6 +2795,9 @@ "DBInstance": { "target": "com.amazonaws.neptune#DBInstance" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CreateDBParameterGroup": { @@ -2773,6 +2850,9 @@ "smithy.api#documentation": "

The tags to be assigned to the new DB parameter group.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CreateDBParameterGroupResult": { @@ -2781,6 +2861,9 @@ "DBParameterGroup": { "target": "com.amazonaws.neptune#DBParameterGroup" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CreateDBSubnetGroup": { @@ -2842,6 +2925,9 @@ "smithy.api#documentation": "

The tags to be assigned to the new DB subnet group.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CreateDBSubnetGroupResult": { @@ -2850,6 +2936,9 @@ "DBSubnetGroup": { "target": "com.amazonaws.neptune#DBSubnetGroup" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CreateEventSubscription": { @@ -2934,6 +3023,9 @@ "smithy.api#documentation": "

The tags to be applied to the new event subscription.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CreateEventSubscriptionResult": { @@ -2942,6 +3034,9 @@ "EventSubscription": { "target": "com.amazonaws.neptune#EventSubscription" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#CreateGlobalCluster": { @@ -3010,6 +3105,9 @@ "smithy.api#documentation": "

The storage encryption setting for the new global database\n cluster.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#CreateGlobalClusterResult": { @@ -3018,6 +3116,9 @@ "GlobalCluster": { "target": "com.amazonaws.neptune#GlobalCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DBCluster": { @@ -3418,6 +3519,9 @@ "smithy.api#documentation": "

Contains the details of the endpoints associated with the cluster\n and matching any filter conditions.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DBClusterEndpointNotFoundFault": { @@ -3526,6 +3630,9 @@ "smithy.api#documentation": "

Contains a list of DB clusters for the user.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DBClusterNotFoundFault": { @@ -3681,6 +3788,9 @@ "smithy.api#documentation": "

A list of DB cluster parameter groups.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DBClusterQuotaExceededFault": { @@ -4024,6 +4134,9 @@ "smithy.api#documentation": "

Provides a list of DB cluster snapshots for the user.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DBClusterSnapshotNotFoundFault": { @@ -4159,6 +4272,9 @@ "smithy.api#documentation": "

A list of DBEngineVersion elements.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DBInstance": { @@ -4541,6 +4657,9 @@ "smithy.api#documentation": "

A list of DBInstance instances.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DBInstanceNotFoundFault": { @@ -4778,6 +4897,9 @@ "smithy.api#documentation": "

A list of DBParameterGroup instances.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DBSecurityGroupMembership": { @@ -4977,6 +5099,9 @@ "smithy.api#documentation": "

A list of DBSubnetGroup instances.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DBSubnetGroupNotFoundFault": { @@ -5130,6 +5255,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DeleteDBClusterEndpointOutput": { @@ -5224,6 +5352,9 @@ "smithy.api#documentation": "

The DB cluster snapshot identifier of the new DB cluster snapshot created when\n SkipFinalSnapshot is set to false.

\n \n

Specifying this parameter and also setting the SkipFinalShapshot parameter\n to true results in an error.

\n
\n

Constraints:

\n
    \n
  • \n

    Must be 1 to 255 letters, numbers, or hyphens.

    \n
  • \n
  • \n

    First character must be a letter

    \n
  • \n
  • \n

    Cannot end with a hyphen or contain two consecutive hyphens

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DeleteDBClusterParameterGroup": { @@ -5256,6 +5387,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DeleteDBClusterResult": { @@ -5264,6 +5398,9 @@ "DBCluster": { "target": "com.amazonaws.neptune#DBCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DeleteDBClusterSnapshot": { @@ -5296,6 +5433,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DeleteDBClusterSnapshotResult": { @@ -5304,6 +5444,9 @@ "DBClusterSnapshot": { "target": "com.amazonaws.neptune#DBClusterSnapshot" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DeleteDBInstance": { @@ -5358,6 +5501,9 @@ "smithy.api#documentation": "

The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot is set to\n false.

\n \n

Specifying this parameter and also setting the SkipFinalShapshot parameter to true\n results in an error.

\n
\n

Constraints:

\n
    \n
  • \n

    Must be 1 to 255 letters or numbers.

    \n
  • \n
  • \n

    First character must be a letter

    \n
  • \n
  • \n

    Cannot end with a hyphen or contain two consecutive hyphens

    \n
  • \n
  • \n

    Cannot be specified when deleting a Read Replica.

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DeleteDBInstanceResult": { @@ -5366,6 +5512,9 @@ "DBInstance": { "target": "com.amazonaws.neptune#DBInstance" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DeleteDBParameterGroup": { @@ -5398,6 +5547,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DeleteDBSubnetGroup": { @@ -5433,6 +5585,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DeleteEventSubscription": { @@ -5465,6 +5620,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DeleteEventSubscriptionResult": { @@ -5473,6 +5631,9 @@ "EventSubscription": { "target": "com.amazonaws.neptune#EventSubscription" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DeleteGlobalCluster": { @@ -5505,6 +5666,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DeleteGlobalClusterResult": { @@ -5513,6 +5677,9 @@ "GlobalCluster": { "target": "com.amazonaws.neptune#GlobalCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DescribeDBClusterEndpoints": { @@ -5571,6 +5738,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous\n DescribeDBClusterEndpoints request.\n If this parameter is specified, the response includes\n only records beyond the marker,\n up to the value specified by MaxRecords.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBClusterParameterGroups": { @@ -5623,6 +5793,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous\n DescribeDBClusterParameterGroups request. If this parameter is specified, the\n response includes only records beyond the marker, up to the value specified by\n MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBClusterParameters": { @@ -5682,6 +5855,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous\n DescribeDBClusterParameters request. If this parameter is specified, the response\n includes only records beyond the marker, up to the value specified by MaxRecords.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBClusterSnapshotAttributes": { @@ -5711,6 +5887,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBClusterSnapshotAttributesResult": { @@ -5719,6 +5898,9 @@ "DBClusterSnapshotAttributesResult": { "target": "com.amazonaws.neptune#DBClusterSnapshotAttributesResult" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DescribeDBClusterSnapshots": { @@ -5797,6 +5979,9 @@ "smithy.api#documentation": "

True to include manual DB cluster snapshots that are public and can be copied or restored\n by any Amazon account, and otherwise false. The default is false. The default is\n false.

\n

You can share a manual DB cluster snapshot as public by using the ModifyDBClusterSnapshotAttribute API action.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBClusters": { @@ -5849,6 +6034,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeDBClusters\n request. If this parameter is specified, the response includes only records beyond the marker,\n up to the value specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBEngineVersions": { @@ -5927,6 +6115,9 @@ "smithy.api#documentation": "

If this parameter is specified and the requested engine supports the TimeZone\n parameter for CreateDBInstance, the response includes a list of supported time\n zones for each engine version.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBInstances": { @@ -6110,6 +6301,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeDBInstances\n request. If this parameter is specified, the response includes only records beyond the marker,\n up to the value specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBParameterGroups": { @@ -6162,6 +6356,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous\n DescribeDBParameterGroups request. If this parameter is specified, the response\n includes only records beyond the marker, up to the value specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBParameters": { @@ -6221,6 +6418,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeDBParameters\n request. If this parameter is specified, the response includes only records beyond the marker,\n up to the value specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeDBSubnetGroups": { @@ -6273,6 +6473,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeDBSubnetGroups request. If\n this parameter is specified, the response includes only records beyond the marker, up to the\n value specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeEngineDefaultClusterParameters": { @@ -6315,6 +6518,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous\n DescribeEngineDefaultClusterParameters request. If this parameter is specified,\n the response includes only records beyond the marker, up to the value specified by\n MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeEngineDefaultClusterParametersResult": { @@ -6323,6 +6529,9 @@ "EngineDefaults": { "target": "com.amazonaws.neptune#EngineDefaults" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DescribeEngineDefaultParameters": { @@ -6371,6 +6580,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous\n DescribeEngineDefaultParameters request. If this parameter is specified, the\n response includes only records beyond the marker, up to the value specified by\n MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeEngineDefaultParametersResult": { @@ -6379,6 +6591,9 @@ "EngineDefaults": { "target": "com.amazonaws.neptune#EngineDefaults" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DescribeEventCategories": { @@ -6408,6 +6623,9 @@ "smithy.api#documentation": "

This parameter is not currently supported.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeEventSubscriptions": { @@ -6460,6 +6678,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions\n request. If this parameter is specified, the response includes only records beyond the marker,\n up to the value specified by MaxRecords .

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeEvents": { @@ -6537,6 +6758,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeEvents request. If this\n parameter is specified, the response includes only records beyond the marker, up to the value\n specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeGlobalClusters": { @@ -6583,6 +6807,9 @@ "smithy.api#documentation": "

(Optional) A pagination token returned by a previous\n call to DescribeGlobalClusters. If this parameter is specified,\n the response will only include records beyond the marker, up to the number\n specified by MaxRecords.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeOrderableDBInstanceOptions": { @@ -6655,6 +6882,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeOrderableDBInstanceOptions\n request. If this parameter is specified, the response includes only records beyond the marker,\n up to the value specified by MaxRecords .

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribePendingMaintenanceActions": { @@ -6707,6 +6937,9 @@ "smithy.api#documentation": "

The maximum number of records to include in the response. If more records exist than the\n specified MaxRecords value, a pagination token called a marker is included in the\n response so that the remaining results can be retrieved.

\n

Default: 100

\n

Constraints: Minimum 20, maximum 100.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeValidDBInstanceModifications": { @@ -6739,6 +6972,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#DescribeValidDBInstanceModificationsResult": { @@ -6747,6 +6983,9 @@ "ValidDBInstanceModificationsMessage": { "target": "com.amazonaws.neptune#ValidDBInstanceModificationsMessage" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#DomainMembership": { @@ -6994,6 +7233,9 @@ "smithy.api#documentation": "

A list of EventCategoriesMap data types.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#EventList": { @@ -7118,6 +7360,9 @@ "smithy.api#documentation": "

A list of EventSubscriptions data types.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#EventsMessage": { @@ -7135,6 +7380,9 @@ "smithy.api#documentation": "

A list of Event instances.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#ExceptionMessage": { @@ -7178,6 +7426,9 @@ "smithy.api#documentation": "

The name of the instance to promote to the primary instance.

\n

You must specify the instance identifier for an Read Replica in the DB cluster. For\n example, mydbcluster-replica1.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#FailoverDBClusterResult": { @@ -7186,6 +7437,9 @@ "DBCluster": { "target": "com.amazonaws.neptune#DBCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#FailoverGlobalCluster": { @@ -7231,6 +7485,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#FailoverGlobalClusterResult": { @@ -7239,6 +7496,9 @@ "GlobalCluster": { "target": "com.amazonaws.neptune#GlobalCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#Filter": { @@ -7473,6 +7733,9 @@ "smithy.api#documentation": "

The list of global clusters and instances returned by this request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#InstanceQuotaExceededFault": { @@ -7909,6 +8172,9 @@ "smithy.api#documentation": "

This parameter is not currently supported.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#LogTypeList": { @@ -8021,6 +8287,9 @@ "smithy.api#documentation": "

List of DB instance identifiers that aren't part of the custom endpoint group.\n All other eligible instances are reachable through the custom endpoint.\n Only relevant if the list of static members is empty.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ModifyDBClusterEndpointOutput": { @@ -8209,6 +8478,9 @@ "ServerlessV2ScalingConfiguration": { "target": "com.amazonaws.neptune#ServerlessV2ScalingConfiguration" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ModifyDBClusterParameterGroup": { @@ -8248,6 +8520,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ModifyDBClusterResult": { @@ -8256,6 +8531,9 @@ "DBCluster": { "target": "com.amazonaws.neptune#DBCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#ModifyDBClusterSnapshotAttribute": { @@ -8310,6 +8588,9 @@ "smithy.api#documentation": "

A list of DB cluster snapshot attributes to remove from the attribute specified by\n AttributeName.

\n

To remove authorization for other Amazon accounts to copy or restore a manual DB cluster\n snapshot, set this list to include one or more Amazon account identifiers, or all to\n remove authorization for any Amazon account to copy or restore the DB cluster snapshot. If you\n specify all, an Amazon account whose account ID is explicitly added to the\n restore attribute can still copy or restore a manual DB cluster snapshot.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ModifyDBClusterSnapshotAttributeResult": { @@ -8318,6 +8599,9 @@ "DBClusterSnapshotAttributesResult": { "target": "com.amazonaws.neptune#DBClusterSnapshotAttributesResult" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#ModifyDBInstance": { @@ -8611,6 +8895,9 @@ "smithy.api#documentation": "

A value that indicates whether the DB instance has deletion protection enabled.\n The database can't be deleted when deletion protection is enabled. By default,\n deletion protection is disabled. See Deleting\n a DB Instance.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ModifyDBInstanceResult": { @@ -8619,6 +8906,9 @@ "DBInstance": { "target": "com.amazonaws.neptune#DBInstance" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#ModifyDBParameterGroup": { @@ -8658,6 +8948,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ModifyDBSubnetGroup": { @@ -8712,6 +9005,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ModifyDBSubnetGroupResult": { @@ -8720,6 +9016,9 @@ "DBSubnetGroup": { "target": "com.amazonaws.neptune#DBSubnetGroup" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#ModifyEventSubscription": { @@ -8788,6 +9087,9 @@ "smithy.api#documentation": "

A Boolean value; set to true to activate the\n subscription.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ModifyEventSubscriptionResult": { @@ -8796,6 +9098,9 @@ "EventSubscription": { "target": "com.amazonaws.neptune#EventSubscription" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#ModifyGlobalCluster": { @@ -8852,6 +9157,9 @@ "smithy.api#documentation": "

A value that indicates whether major version upgrades are allowed.

\n

Constraints: You must allow major version upgrades if you specify a value\n for the EngineVersion parameter that is a different major version\n than the DB cluster's current version.

\n

If you upgrade the major version of a global database, the cluster and\n DB instance parameter groups are set to the default parameter groups for the\n new version, so you will need to apply any custom parameter groups after\n completing the upgrade.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ModifyGlobalClusterResult": { @@ -8860,6 +9168,9 @@ "GlobalCluster": { "target": "com.amazonaws.neptune#GlobalCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#OptionGroupMembership": { @@ -9078,6 +9389,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous OrderableDBInstanceOptions request.\n If this parameter is specified, the response includes only records beyond the marker, up to\n the value specified by MaxRecords .

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#Parameter": { @@ -9255,6 +9569,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous\n DescribePendingMaintenanceActions request. If this parameter is specified, the\n response includes only records beyond the marker, up to a number of records specified by\n MaxRecords.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#PendingModifiedValues": { @@ -9379,6 +9696,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#PromoteReadReplicaDBClusterResult": { @@ -9387,6 +9707,9 @@ "DBCluster": { "target": "com.amazonaws.neptune#DBCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#ProvisionedIopsNotAvailableInAZFault": { @@ -9515,6 +9838,9 @@ "smithy.api#documentation": "

When true, the reboot is conducted through a MultiAZ failover.

\n

Constraint: You can't specify true if the instance is not configured for\n MultiAZ.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#RebootDBInstanceResult": { @@ -9523,6 +9849,9 @@ "DBInstance": { "target": "com.amazonaws.neptune#DBInstance" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#RemoveFromGlobalCluster": { @@ -9565,6 +9894,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#RemoveFromGlobalClusterResult": { @@ -9573,6 +9905,9 @@ "GlobalCluster": { "target": "com.amazonaws.neptune#GlobalCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#RemoveRoleFromDBCluster": { @@ -9621,6 +9956,9 @@ "smithy.api#documentation": "

The name of the feature for the DB cluster that the IAM role is to be disassociated from.\n For the list of supported feature names, see DescribeDBEngineVersions.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#RemoveSourceIdentifierFromSubscription": { @@ -9660,6 +9998,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#RemoveSourceIdentifierFromSubscriptionResult": { @@ -9668,6 +10009,9 @@ "EventSubscription": { "target": "com.amazonaws.neptune#EventSubscription" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#RemoveTagsFromResource": { @@ -9710,6 +10054,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ResetDBClusterParameterGroup": { @@ -9755,6 +10102,9 @@ "smithy.api#documentation": "

A list of parameter names in the DB cluster parameter group to reset to the default\n values. You can't use this parameter if the ResetAllParameters parameter is set\n to true.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ResetDBParameterGroup": { @@ -9800,6 +10150,9 @@ "smithy.api#documentation": "

To reset the entire DB parameter group, specify the DBParameterGroup name and\n ResetAllParameters parameters. To reset specific parameters, provide a list of\n the following: ParameterName and ApplyMethod. A maximum of 20\n parameters can be modified in a single request.

\n

Valid Values (for Apply method): pending-reboot\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#ResourceNotFoundFault": { @@ -10015,6 +10368,9 @@ "ServerlessV2ScalingConfiguration": { "target": "com.amazonaws.neptune#ServerlessV2ScalingConfiguration" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#RestoreDBClusterFromSnapshotResult": { @@ -10023,6 +10379,9 @@ "DBCluster": { "target": "com.amazonaws.neptune#DBCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#RestoreDBClusterToPointInTime": { @@ -10189,6 +10548,9 @@ "ServerlessV2ScalingConfiguration": { "target": "com.amazonaws.neptune#ServerlessV2ScalingConfiguration" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#RestoreDBClusterToPointInTimeResult": { @@ -10197,6 +10559,9 @@ "DBCluster": { "target": "com.amazonaws.neptune#DBCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#SNSInvalidTopicFault": { @@ -10442,6 +10807,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#StartDBClusterResult": { @@ -10450,6 +10818,9 @@ "DBCluster": { "target": "com.amazonaws.neptune#DBCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#StopDBCluster": { @@ -10485,6 +10856,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.neptune#StopDBClusterResult": { @@ -10493,6 +10867,9 @@ "DBCluster": { "target": "com.amazonaws.neptune#DBCluster" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#StorageQuotaExceededFault": { @@ -10727,6 +11104,9 @@ "smithy.api#documentation": "

List of tags returned by the ListTagsForResource operation.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.neptune#Timezone": { diff --git a/codegen/sdk-codegen/aws-models/networkmanager.json b/codegen/sdk-codegen/aws-models/networkmanager.json index 1a8c67f3286..2710e20fa60 100644 --- a/codegen/sdk-codegen/aws-models/networkmanager.json +++ b/codegen/sdk-codegen/aws-models/networkmanager.json @@ -8650,52 +8650,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -8703,449 +8707,168 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://networkmanager.us-west-2.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "networkmanager", + "signingRegion": "us-west-2" } - ], - "type": "tree", - "rules": [ + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ + "fn": "getAttr", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://networkmanager-fips.{Region}.api.aws", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] + "ref": "PartitionResult" }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } + "name" ] }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://networkmanager-fips.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "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://networkmanager.{Region}.api.aws", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://networkmanager.us-gov-west-1.amazonaws.com", + "properties": { + "authSchemes": [ { - "conditions": [], - "endpoint": { - "url": "https://networkmanager.us-west-2.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "networkmanager", - "signingRegion": "us-west-2" - } - ] - }, - "headers": {} - }, - "type": "endpoint" + "name": "sigv4", + "signingName": "networkmanager", + "signingRegion": "us-gov-west-1" } ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { - "fn": "stringEquals", + "fn": "booleanEquals", "argv": [ + true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "name" - ] - }, - "aws-us-gov" - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true + "supportsFIPS" ] } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://networkmanager-fips.{Region}.api.aws", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } ] }, { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ { - "ref": "UseFIPS" + "ref": "PartitionResult" }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://networkmanager-fips.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" } ] - }, - { - "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://networkmanager.{Region}.api.aws", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://networkmanager.us-gov-west-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "networkmanager", - "signingRegion": "us-gov-west-1" - } - ] - }, + "url": "https://networkmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, "headers": {} }, "type": "endpoint" @@ -9153,282 +8876,133 @@ ] }, { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://networkmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "ref": "UseFIPS" }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } + true ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://networkmanager-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "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": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://networkmanager.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://networkmanager-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://networkmanager.us-west-2.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "networkmanager", - "signingRegion": "us-west-2" - } - ] - }, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "aws-us-gov-global" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://networkmanager.us-gov-west-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "networkmanager", - "signingRegion": "us-gov-west-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://networkmanager.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://networkmanager.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://networkmanager.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -9451,9 +9025,9 @@ } }, "params": { + "Region": "aws-global", "UseFIPS": false, - "UseDualStack": false, - "Region": "aws-global" + "UseDualStack": false } }, { @@ -9464,9 +9038,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -9477,9 +9051,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -9490,9 +9064,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -9512,9 +9086,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -9525,9 +9099,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -9538,9 +9112,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -9551,9 +9125,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -9564,9 +9138,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -9586,9 +9160,9 @@ } }, "params": { + "Region": "aws-us-gov-global", "UseFIPS": false, - "UseDualStack": false, - "Region": "aws-us-gov-global" + "UseDualStack": false } }, { @@ -9599,9 +9173,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -9612,9 +9186,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -9625,9 +9199,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -9647,9 +9221,20 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-east-1" + "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 } }, { @@ -9660,9 +9245,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -9673,9 +9269,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -9686,9 +9293,20 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-isob-east-1" + "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 } }, { @@ -9699,9 +9317,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -9712,9 +9330,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -9737,9 +9355,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -9749,11 +9367,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/nimble.json b/codegen/sdk-codegen/aws-models/nimble.json index 46e1ebd0b8b..8af2f87c6da 100644 --- a/codegen/sdk-codegen/aws-models/nimble.json +++ b/codegen/sdk-codegen/aws-models/nimble.json @@ -9706,52 +9706,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -9759,13 +9763,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -9775,224 +9788,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://nimble-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://nimble-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://nimble-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://nimble-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://nimble.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://nimble.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://nimble.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://nimble.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -10007,8 +9971,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -10020,8 +9984,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -10033,8 +9997,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -10046,8 +10010,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -10059,8 +10023,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -10072,8 +10036,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -10085,8 +10049,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -10098,8 +10062,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -10111,8 +10075,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -10124,8 +10088,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -10137,8 +10101,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -10150,8 +10114,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -10163,8 +10127,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -10176,8 +10140,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -10189,8 +10153,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -10202,8 +10166,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -10215,8 +10179,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -10228,8 +10203,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -10241,8 +10227,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -10254,8 +10251,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -10267,8 +10275,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -10280,8 +10288,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -10293,8 +10301,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -10305,8 +10313,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -10317,10 +10325,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -10328,4 +10342,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/oam.json b/codegen/sdk-codegen/aws-models/oam.json index cdb73066717..6bdf61fa917 100644 --- a/codegen/sdk-codegen/aws-models/oam.json +++ b/codegen/sdk-codegen/aws-models/oam.json @@ -2048,55 +2048,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://oam-fips.us-gov-east-1.api.aws" + "url": "https://oam-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://oam-fips.us-gov-east-1.amazonaws.com" + "url": "https://oam-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://oam.us-gov-east-1.api.aws" + "url": "https://oam.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://oam.us-gov-east-1.amazonaws.com" + "url": "https://oam.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -2107,9 +2107,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -2120,9 +2120,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -2133,9 +2133,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -2146,109 +2146,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://oam-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://oam-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://oam-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://oam.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://oam.us-iso-east-1.c2s.ic.gov" + "url": "https://oam.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://oam-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://oam-fips.us-east-1.amazonaws.com" + "url": "https://oam-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://oam.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://oam.us-east-1.amazonaws.com" + "url": "https://oam.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -2257,9 +2257,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -2270,9 +2270,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -2281,9 +2281,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -2294,22 +2294,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2319,9 +2332,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2331,11 +2344,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2343,4 +2362,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/opensearch.json b/codegen/sdk-codegen/aws-models/opensearch.json index bcce7710be5..81495fe3dbb 100644 --- a/codegen/sdk-codegen/aws-models/opensearch.json +++ b/codegen/sdk-codegen/aws-models/opensearch.json @@ -714,52 +714,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -767,13 +771,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -783,224 +796,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://es-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://es-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://es.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://es.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://es.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://es.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/opensearchserverless.json b/codegen/sdk-codegen/aws-models/opensearchserverless.json index 43f5b065abc..0ad1db914c3 100644 --- a/codegen/sdk-codegen/aws-models/opensearchserverless.json +++ b/codegen/sdk-codegen/aws-models/opensearchserverless.json @@ -2572,55 +2572,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://aoss-fips.us-gov-east-1.api.aws" + "url": "https://aoss-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, - "Region": "us-gov-east-1", - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://aoss-fips.us-gov-east-1.amazonaws.com" + "url": "https://aoss-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-gov-east-1", - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://aoss.us-gov-east-1.api.aws" + "url": "https://aoss.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, - "Region": "us-gov-east-1", - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://aoss.us-gov-east-1.amazonaws.com" + "url": "https://aoss.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-gov-east-1", - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2631,9 +2631,9 @@ } }, "params": { - "UseDualStack": true, "Region": "cn-north-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2644,9 +2644,9 @@ } }, "params": { - "UseDualStack": false, "Region": "cn-north-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2657,9 +2657,9 @@ } }, "params": { - "UseDualStack": true, "Region": "cn-north-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2670,109 +2670,109 @@ } }, "params": { - "UseDualStack": false, "Region": "cn-north-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://aoss-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, - "Region": "us-iso-east-1", - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://aoss-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://aoss-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-iso-east-1", - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://aoss.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, - "Region": "us-iso-east-1", - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://aoss.us-iso-east-1.c2s.ic.gov" + "url": "https://aoss.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-iso-east-1", - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://aoss-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, - "Region": "us-east-1", - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://aoss-fips.us-east-1.amazonaws.com" + "url": "https://aoss-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, - "Region": "us-east-1", - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://aoss.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, - "Region": "us-east-1", - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://aoss.us-east-1.amazonaws.com" + "url": "https://aoss.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, - "Region": "us-east-1", - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2781,9 +2781,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, "Region": "us-isob-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2794,9 +2794,9 @@ } }, "params": { - "UseDualStack": false, "Region": "us-isob-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2805,9 +2805,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, "Region": "us-isob-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2818,22 +2818,35 @@ } }, "params": { - "UseDualStack": false, "Region": "us-isob-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseDualStack": false, "Region": "us-east-1", "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2843,9 +2856,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, "Region": "us-east-1", "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2855,11 +2868,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, "Region": "us-east-1", "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/opsworks.json b/codegen/sdk-codegen/aws-models/opsworks.json index 1735a73858e..4398a58ebf0 100644 --- a/codegen/sdk-codegen/aws-models/opsworks.json +++ b/codegen/sdk-codegen/aws-models/opsworks.json @@ -157,61 +157,79 @@ } }, "com.amazonaws.opsworks#AppAttributesKeys": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DocumentRoot", - "name": "DocumentRoot" - }, - { - "value": "RailsEnv", - "name": "RailsEnv" - }, - { - "value": "AutoBundleOnDeploy", - "name": "AutoBundleOnDeploy" - }, - { - "value": "AwsFlowRubySettings", - "name": "AwsFlowRubySettings" + "type": "enum", + "members": { + "DocumentRoot": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DocumentRoot" + } + }, + "RailsEnv": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RailsEnv" + } + }, + "AutoBundleOnDeploy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AutoBundleOnDeploy" + } + }, + "AwsFlowRubySettings": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AwsFlowRubySettings" } - ] + } } }, "com.amazonaws.opsworks#AppType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "aws-flow-ruby", - "name": "aws_flow_ruby" - }, - { - "value": "java", - "name": "java" - }, - { - "value": "rails", - "name": "rails" - }, - { - "value": "php", - "name": "php" - }, - { - "value": "nodejs", - "name": "nodejs" - }, - { - "value": "static", - "name": "static" - }, - { - "value": "other", - "name": "other" + "type": "enum", + "members": { + "aws_flow_ruby": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aws-flow-ruby" + } + }, + "java": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "java" } - ] + }, + "rails": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rails" + } + }, + "php": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "php" + } + }, + "nodejs": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "nodejs" + } + }, + "static": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "static" + } + }, + "other": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + } } }, "com.amazonaws.opsworks#Apps": { @@ -221,18 +239,20 @@ } }, "com.amazonaws.opsworks#Architecture": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "x86_64", - "name": "x86_64" - }, - { - "value": "i386", - "name": "i386" + "type": "enum", + "members": { + "x86_64": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "x86_64" + } + }, + "i386": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "i386" } - ] + } } }, "com.amazonaws.opsworks#AssignInstance": { @@ -272,6 +292,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#AssignVolume": { @@ -310,6 +333,9 @@ "smithy.api#documentation": "

The instance ID.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#AssociateElasticIp": { @@ -348,6 +374,9 @@ "smithy.api#documentation": "

The instance ID.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#AttachElasticLoadBalancer": { @@ -387,6 +416,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#AutoScalingThresholds": { @@ -440,18 +472,20 @@ } }, "com.amazonaws.opsworks#AutoScalingType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "load", - "name": "load" - }, - { - "value": "timer", - "name": "timer" + "type": "enum", + "members": { + "load": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "load" + } + }, + "timer": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "timer" } - ] + } } }, "com.amazonaws.opsworks#BlockDeviceMapping": { @@ -541,563 +575,755 @@ "SourceStackId": { "target": "com.amazonaws.opsworks#String", "traits": { - "smithy.api#documentation": "

The source stack ID.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The source stack ID.

", + "smithy.api#required": {} + } + }, + "Name": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The cloned stack name.

" + } + }, + "Region": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The cloned stack AWS region, such as \"ap-northeast-2\". For more information about AWS regions, see\n Regions and Endpoints.

" + } + }, + "VpcId": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The ID of the VPC that the cloned stack is to be launched into. It must be in the specified region. All\n instances are launched into this VPC, and you cannot change the ID later.

\n
    \n
  • \n

    If your account supports EC2 Classic, the default value is no VPC.

    \n
  • \n
  • \n

    If your account does not support EC2 Classic, the default value is the default VPC for the specified region.

    \n
  • \n
\n

If the VPC ID corresponds to a default VPC and you have specified either the\n DefaultAvailabilityZone or the DefaultSubnetId parameter only,\n AWS OpsWorks Stacks infers the value of the other parameter. If you specify neither parameter, AWS OpsWorks Stacks sets\n these parameters to the first valid Availability Zone for the specified region and the\n corresponding default VPC subnet ID, respectively.

\n

If you specify a nondefault VPC ID, note the following:

\n
    \n
  • \n

    It must belong to a VPC in your account that is in the specified region.

    \n
  • \n
  • \n

    You must specify a value for DefaultSubnetId.

    \n
  • \n
\n

For more information about how to use AWS OpsWorks Stacks with a VPC, see Running a Stack in a\n VPC. For more information about default VPC and EC2 Classic, see Supported\n Platforms.

" + } + }, + "Attributes": { + "target": "com.amazonaws.opsworks#StackAttributes", + "traits": { + "smithy.api#documentation": "

A list of stack attributes and values as key/value pairs to be added to the cloned stack.

" + } + }, + "ServiceRoleArn": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The stack AWS Identity and Access Management (IAM) role, which allows AWS OpsWorks Stacks to work with AWS\n resources on your behalf. You must set this parameter to the Amazon Resource Name (ARN) for an\n existing IAM role. If you create a stack by using the AWS OpsWorks Stacks console, it creates the role for\n you. You can obtain an existing stack's IAM ARN programmatically by calling\n DescribePermissions. For more information about IAM ARNs, see Using\n Identifiers.

\n \n

You must set this parameter to a valid service role ARN or the action will fail; there is no default value. You can specify the source stack's service role ARN, if you prefer, but you must do so explicitly.

\n
", + "smithy.api#required": {} + } + }, + "DefaultInstanceProfileArn": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack's EC2 instances.\n For more information about IAM ARNs, see Using\n Identifiers.

" + } + }, + "DefaultOs": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The stack's operating system, which must be set to one of the following.

\n
    \n
  • \n

    A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2018.03, Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux\n 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

    \n
  • \n
  • \n

    A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    \n
  • \n
  • \n

    \n CentOS Linux 7\n

    \n
  • \n
  • \n

    \n Red Hat Enterprise Linux 7\n

    \n
  • \n
  • \n

    \n Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, \n Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

    \n
  • \n
  • \n

    A custom AMI: Custom. You specify the custom AMI you want to use when\n you create instances. For more information about how to use custom AMIs with OpsWorks, see Using\n Custom AMIs.

    \n
  • \n
\n

The default option is the parent stack's operating system.\n For more information about supported operating systems,\n see AWS OpsWorks Stacks Operating Systems.

\n \n

You can specify a different Linux operating system for the cloned stack, but you cannot change from Linux to Windows or Windows to Linux.

\n
" + } + }, + "HostnameTheme": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The stack's host name theme, with spaces are replaced by underscores. The theme is used to\n generate host names for the stack's instances. By default, HostnameTheme is set\n to Layer_Dependent, which creates host names by appending integers to the layer's\n short name. The other themes are:

\n
    \n
  • \n

    \n Baked_Goods\n

    \n
  • \n
  • \n

    \n Clouds\n

    \n
  • \n
  • \n

    \n Europe_Cities\n

    \n
  • \n
  • \n

    \n Fruits\n

    \n
  • \n
  • \n

    \n Greek_Deities_and_Titans\n

    \n
  • \n
  • \n

    \n Legendary_creatures_from_Japan\n

    \n
  • \n
  • \n

    \n Planets_and_Moons\n

    \n
  • \n
  • \n

    \n Roman_Deities\n

    \n
  • \n
  • \n

    \n Scottish_Islands\n

    \n
  • \n
  • \n

    \n US_Cities\n

    \n
  • \n
  • \n

    \n Wild_Cats\n

    \n
  • \n
\n

To obtain a generated host name, call GetHostNameSuggestion, which returns a\n host name based on the current theme.

" + } + }, + "DefaultAvailabilityZone": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The cloned stack's default Availability Zone, which must be in the specified region. For more\n information, see Regions and\n Endpoints. If you also specify a value for DefaultSubnetId, the subnet must\n be in the same zone. For more information, see the VpcId parameter description.\n

" + } + }, + "DefaultSubnetId": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The stack's default VPC subnet ID. This parameter is required if you specify a value for the\n VpcId parameter. All instances are launched into this subnet unless you specify\n otherwise when you create the instance. If you also specify a value for\n DefaultAvailabilityZone, the subnet must be in that zone. For information on\n default values and when this parameter is required, see the VpcId parameter\n description.

" + } + }, + "CustomJson": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

A string that contains user-defined, custom JSON. It is used to override the corresponding default stack configuration JSON values. The string should be in the following format:

\n

\n \"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\",...}\"\n

\n

For more information about custom JSON, see Use Custom JSON to\n Modify the Stack Configuration Attributes\n

" + } + }, + "ConfigurationManager": { + "target": "com.amazonaws.opsworks#StackConfigurationManager", + "traits": { + "smithy.api#documentation": "

The configuration manager. When you clone a stack we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 12.

" + } + }, + "ChefConfiguration": { + "target": "com.amazonaws.opsworks#ChefConfiguration", + "traits": { + "smithy.api#documentation": "

A ChefConfiguration object that specifies whether to enable Berkshelf and the\n Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack.

" + } + }, + "UseCustomCookbooks": { + "target": "com.amazonaws.opsworks#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to use custom cookbooks.

" + } + }, + "UseOpsworksSecurityGroups": { + "target": "com.amazonaws.opsworks#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack's layers.

\n

AWS OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are\n associated with layers by default. With UseOpsworksSecurityGroups you can instead\n provide your own custom security groups. UseOpsworksSecurityGroups has the\n following settings:

\n
    \n
  • \n

    True - AWS OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it but you cannot delete the built-in security group.

    \n
  • \n
  • \n

    False - AWS OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate Amazon Elastic Compute Cloud (Amazon EC2) security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on creation; custom security groups are required only for those layers that need custom settings.

    \n
  • \n
\n

For more information, see Create a New\n Stack.

" + } + }, + "CustomCookbooksSource": { + "target": "com.amazonaws.opsworks#Source", + "traits": { + "smithy.api#documentation": "

Contains the information required to retrieve an app or cookbook from a repository. For more information, \n see Adding Apps or Cookbooks and Recipes.

" + } + }, + "DefaultSshKeyName": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

A default Amazon EC2 key pair name. The default value is none. If you specify a key pair name, AWS\n OpsWorks installs the public key on the instance and you can use the private key with an SSH\n client to log in to the instance. For more information, see Using SSH to\n Communicate with an Instance and Managing SSH\n Access. You can override this setting by specifying a different key pair, or no key\n pair, when you \n create an instance.

" + } + }, + "ClonePermissions": { + "target": "com.amazonaws.opsworks#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to clone the source stack's permissions.

" + } + }, + "CloneAppIds": { + "target": "com.amazonaws.opsworks#Strings", + "traits": { + "smithy.api#documentation": "

A list of source stack app IDs to be included in the cloned stack.

" + } + }, + "DefaultRootDeviceType": { + "target": "com.amazonaws.opsworks#RootDeviceType", + "traits": { + "smithy.api#documentation": "

The default root device type. This value is used by default for all instances in the cloned\n stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

" + } + }, + "AgentVersion": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The default AWS OpsWorks Stacks agent version. You have the following options:

\n
    \n
  • \n

    Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks\n automatically installs new agent versions on the stack's instances as soon as\n they are available.

    \n
  • \n
  • \n

    Fixed version - Set this parameter to your preferred agent version. To update \n the agent version, you must edit the stack configuration and specify a new version. \n AWS OpsWorks Stacks then automatically installs that version on the stack's instances.

    \n
  • \n
\n

The default setting is LATEST. To specify an agent version,\n you must use the complete version number, not the abbreviated number shown on the console.\n For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

\n \n

You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.

\n
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opsworks#CloneStackResult": { + "type": "structure", + "members": { + "StackId": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The cloned stack ID.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the response to a CloneStack request.

", + "smithy.api#output": {} + } + }, + "com.amazonaws.opsworks#CloudWatchLogsConfiguration": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.opsworks#Boolean", + "traits": { + "smithy.api#documentation": "

Whether CloudWatch Logs is enabled for a layer.

" + } + }, + "LogStreams": { + "target": "com.amazonaws.opsworks#CloudWatchLogsLogStreams", + "traits": { + "smithy.api#documentation": "

A list of configuration options for CloudWatch Logs.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the Amazon CloudWatch logs configuration for a layer.

" + } + }, + "com.amazonaws.opsworks#CloudWatchLogsEncoding": { + "type": "enum", + "members": { + "ascii": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ascii" + } + }, + "big5": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "big5" + } + }, + "big5hkscs": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "big5hkscs" + } + }, + "cp037": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp037" + } + }, + "cp424": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp424" + } + }, + "cp437": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp437" + } + }, + "cp500": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp500" + } + }, + "cp720": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp720" + } + }, + "cp737": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp737" + } + }, + "cp775": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp775" + } + }, + "cp850": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp850" + } + }, + "cp852": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp852" + } + }, + "cp855": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp855" + } + }, + "cp856": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp856" + } + }, + "cp857": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp857" + } + }, + "cp858": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp858" + } + }, + "cp860": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp860" + } + }, + "cp861": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp861" + } + }, + "cp862": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp862" + } + }, + "cp863": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp863" + } + }, + "cp864": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp864" + } + }, + "cp865": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp865" + } + }, + "cp866": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp866" + } + }, + "cp869": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp869" + } + }, + "cp874": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp874" + } + }, + "cp875": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp875" + } + }, + "cp932": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp932" + } + }, + "cp949": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp949" + } + }, + "cp950": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp950" + } + }, + "cp1006": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1006" + } + }, + "cp1026": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1026" + } + }, + "cp1140": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1140" + } + }, + "cp1250": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1250" + } + }, + "cp1251": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1251" + } + }, + "cp1252": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1252" + } + }, + "cp1253": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1253" + } + }, + "cp1254": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1254" + } + }, + "cp1255": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1255" + } + }, + "cp1256": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1256" + } + }, + "cp1257": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1257" + } + }, + "cp1258": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cp1258" + } + }, + "euc_jp": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "euc_jp" + } + }, + "euc_jis_2004": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "euc_jis_2004" + } + }, + "euc_jisx0213": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "euc_jisx0213" + } + }, + "euc_kr": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "euc_kr" + } + }, + "gb2312": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gb2312" + } + }, + "gbk": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gbk" + } + }, + "gb18030": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gb18030" + } + }, + "hz": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hz" + } + }, + "iso2022_jp": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso2022_jp" + } + }, + "iso2022_jp_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso2022_jp_1" + } + }, + "iso2022_jp_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso2022_jp_2" + } + }, + "iso2022_jp_2004": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso2022_jp_2004" + } + }, + "iso2022_jp_3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso2022_jp_3" + } + }, + "iso2022_jp_ext": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso2022_jp_ext" + } + }, + "iso2022_kr": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso2022_kr" + } + }, + "latin_1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "latin_1" + } + }, + "iso8859_2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_2" + } + }, + "iso8859_3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_3" + } + }, + "iso8859_4": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_4" + } + }, + "iso8859_5": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_5" + } + }, + "iso8859_6": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_6" + } + }, + "iso8859_7": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_7" + } + }, + "iso8859_8": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_8" + } + }, + "iso8859_9": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_9" + } + }, + "iso8859_10": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_10" + } + }, + "iso8859_13": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_13" + } + }, + "iso8859_14": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_14" + } + }, + "iso8859_15": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "iso8859_15" } }, - "Name": { - "target": "com.amazonaws.opsworks#String", + "iso8859_16": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The cloned stack name.

" + "smithy.api#enumValue": "iso8859_16" } }, - "Region": { - "target": "com.amazonaws.opsworks#String", + "johab": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The cloned stack AWS region, such as \"ap-northeast-2\". For more information about AWS regions, see\n Regions and Endpoints.

" + "smithy.api#enumValue": "johab" } }, - "VpcId": { - "target": "com.amazonaws.opsworks#String", + "koi8_r": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The ID of the VPC that the cloned stack is to be launched into. It must be in the specified region. All\n instances are launched into this VPC, and you cannot change the ID later.

\n
    \n
  • \n

    If your account supports EC2 Classic, the default value is no VPC.

    \n
  • \n
  • \n

    If your account does not support EC2 Classic, the default value is the default VPC for the specified region.

    \n
  • \n
\n

If the VPC ID corresponds to a default VPC and you have specified either the\n DefaultAvailabilityZone or the DefaultSubnetId parameter only,\n AWS OpsWorks Stacks infers the value of the other parameter. If you specify neither parameter, AWS OpsWorks Stacks sets\n these parameters to the first valid Availability Zone for the specified region and the\n corresponding default VPC subnet ID, respectively.

\n

If you specify a nondefault VPC ID, note the following:

\n
    \n
  • \n

    It must belong to a VPC in your account that is in the specified region.

    \n
  • \n
  • \n

    You must specify a value for DefaultSubnetId.

    \n
  • \n
\n

For more information about how to use AWS OpsWorks Stacks with a VPC, see Running a Stack in a\n VPC. For more information about default VPC and EC2 Classic, see Supported\n Platforms.

" + "smithy.api#enumValue": "koi8_r" } }, - "Attributes": { - "target": "com.amazonaws.opsworks#StackAttributes", + "koi8_u": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A list of stack attributes and values as key/value pairs to be added to the cloned stack.

" + "smithy.api#enumValue": "koi8_u" } }, - "ServiceRoleArn": { - "target": "com.amazonaws.opsworks#String", + "mac_cyrillic": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The stack AWS Identity and Access Management (IAM) role, which allows AWS OpsWorks Stacks to work with AWS\n resources on your behalf. You must set this parameter to the Amazon Resource Name (ARN) for an\n existing IAM role. If you create a stack by using the AWS OpsWorks Stacks console, it creates the role for\n you. You can obtain an existing stack's IAM ARN programmatically by calling\n DescribePermissions. For more information about IAM ARNs, see Using\n Identifiers.

\n \n

You must set this parameter to a valid service role ARN or the action will fail; there is no default value. You can specify the source stack's service role ARN, if you prefer, but you must do so explicitly.

\n
", - "smithy.api#required": {} + "smithy.api#enumValue": "mac_cyrillic" } }, - "DefaultInstanceProfileArn": { - "target": "com.amazonaws.opsworks#String", + "mac_greek": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack's EC2 instances.\n For more information about IAM ARNs, see Using\n Identifiers.

" + "smithy.api#enumValue": "mac_greek" } }, - "DefaultOs": { - "target": "com.amazonaws.opsworks#String", + "mac_iceland": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The stack's operating system, which must be set to one of the following.

\n
    \n
  • \n

    A supported Linux operating system: An Amazon Linux version, such as Amazon Linux 2018.03, Amazon Linux 2017.09, Amazon Linux 2017.03, Amazon Linux\n 2016.09, Amazon Linux 2016.03, Amazon Linux 2015.09, or Amazon Linux 2015.03.

    \n
  • \n
  • \n

    A supported Ubuntu operating system, such as Ubuntu 16.04 LTS, Ubuntu 14.04 LTS, or Ubuntu 12.04 LTS.

    \n
  • \n
  • \n

    \n CentOS Linux 7\n

    \n
  • \n
  • \n

    \n Red Hat Enterprise Linux 7\n

    \n
  • \n
  • \n

    \n Microsoft Windows Server 2012 R2 Base, Microsoft Windows Server 2012 R2 with SQL Server Express, \n Microsoft Windows Server 2012 R2 with SQL Server Standard, or Microsoft Windows Server 2012 R2 with SQL Server Web.

    \n
  • \n
  • \n

    A custom AMI: Custom. You specify the custom AMI you want to use when\n you create instances. For more information about how to use custom AMIs with OpsWorks, see Using\n Custom AMIs.

    \n
  • \n
\n

The default option is the parent stack's operating system.\n For more information about supported operating systems,\n see AWS OpsWorks Stacks Operating Systems.

\n \n

You can specify a different Linux operating system for the cloned stack, but you cannot change from Linux to Windows or Windows to Linux.

\n
" + "smithy.api#enumValue": "mac_iceland" } }, - "HostnameTheme": { - "target": "com.amazonaws.opsworks#String", + "mac_latin2": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The stack's host name theme, with spaces are replaced by underscores. The theme is used to\n generate host names for the stack's instances. By default, HostnameTheme is set\n to Layer_Dependent, which creates host names by appending integers to the layer's\n short name. The other themes are:

\n
    \n
  • \n

    \n Baked_Goods\n

    \n
  • \n
  • \n

    \n Clouds\n

    \n
  • \n
  • \n

    \n Europe_Cities\n

    \n
  • \n
  • \n

    \n Fruits\n

    \n
  • \n
  • \n

    \n Greek_Deities_and_Titans\n

    \n
  • \n
  • \n

    \n Legendary_creatures_from_Japan\n

    \n
  • \n
  • \n

    \n Planets_and_Moons\n

    \n
  • \n
  • \n

    \n Roman_Deities\n

    \n
  • \n
  • \n

    \n Scottish_Islands\n

    \n
  • \n
  • \n

    \n US_Cities\n

    \n
  • \n
  • \n

    \n Wild_Cats\n

    \n
  • \n
\n

To obtain a generated host name, call GetHostNameSuggestion, which returns a\n host name based on the current theme.

" + "smithy.api#enumValue": "mac_latin2" } }, - "DefaultAvailabilityZone": { - "target": "com.amazonaws.opsworks#String", + "mac_roman": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The cloned stack's default Availability Zone, which must be in the specified region. For more\n information, see Regions and\n Endpoints. If you also specify a value for DefaultSubnetId, the subnet must\n be in the same zone. For more information, see the VpcId parameter description.\n

" + "smithy.api#enumValue": "mac_roman" } }, - "DefaultSubnetId": { - "target": "com.amazonaws.opsworks#String", + "mac_turkish": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The stack's default VPC subnet ID. This parameter is required if you specify a value for the\n VpcId parameter. All instances are launched into this subnet unless you specify\n otherwise when you create the instance. If you also specify a value for\n DefaultAvailabilityZone, the subnet must be in that zone. For information on\n default values and when this parameter is required, see the VpcId parameter\n description.

" + "smithy.api#enumValue": "mac_turkish" } }, - "CustomJson": { - "target": "com.amazonaws.opsworks#String", + "ptcp154": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A string that contains user-defined, custom JSON. It is used to override the corresponding default stack configuration JSON values. The string should be in the following format:

\n

\n \"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\",...}\"\n

\n

For more information about custom JSON, see Use Custom JSON to\n Modify the Stack Configuration Attributes\n

" + "smithy.api#enumValue": "ptcp154" } }, - "ConfigurationManager": { - "target": "com.amazonaws.opsworks#StackConfigurationManager", + "shift_jis": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The configuration manager. When you clone a stack we recommend that you use the configuration manager to specify the Chef version: 12, 11.10, or 11.4 for Linux stacks, or 12.2 for Windows stacks. The default value for Linux stacks is currently 12.

" + "smithy.api#enumValue": "shift_jis" } }, - "ChefConfiguration": { - "target": "com.amazonaws.opsworks#ChefConfiguration", + "shift_jis_2004": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A ChefConfiguration object that specifies whether to enable Berkshelf and the\n Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack.

" + "smithy.api#enumValue": "shift_jis_2004" } }, - "UseCustomCookbooks": { - "target": "com.amazonaws.opsworks#Boolean", + "shift_jisx0213": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Whether to use custom cookbooks.

" + "smithy.api#enumValue": "shift_jisx0213" } }, - "UseOpsworksSecurityGroups": { - "target": "com.amazonaws.opsworks#Boolean", + "utf_32": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack's layers.

\n

AWS OpsWorks Stacks provides a standard set of built-in security groups, one for each layer, which are\n associated with layers by default. With UseOpsworksSecurityGroups you can instead\n provide your own custom security groups. UseOpsworksSecurityGroups has the\n following settings:

\n
    \n
  • \n

    True - AWS OpsWorks Stacks automatically associates the appropriate built-in security group with each layer (default setting). You can associate additional security groups with a layer after you create it but you cannot delete the built-in security group.

    \n
  • \n
  • \n

    False - AWS OpsWorks Stacks does not associate built-in security groups with layers. You must create appropriate Amazon Elastic Compute Cloud (Amazon EC2) security groups and associate a security group with each layer that you create. However, you can still manually associate a built-in security group with a layer on creation; custom security groups are required only for those layers that need custom settings.

    \n
  • \n
\n

For more information, see Create a New\n Stack.

" + "smithy.api#enumValue": "utf_32" } }, - "CustomCookbooksSource": { - "target": "com.amazonaws.opsworks#Source", + "utf_32_be": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Contains the information required to retrieve an app or cookbook from a repository. For more information, \n see Adding Apps or Cookbooks and Recipes.

" + "smithy.api#enumValue": "utf_32_be" } }, - "DefaultSshKeyName": { - "target": "com.amazonaws.opsworks#String", + "utf_32_le": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A default Amazon EC2 key pair name. The default value is none. If you specify a key pair name, AWS\n OpsWorks installs the public key on the instance and you can use the private key with an SSH\n client to log in to the instance. For more information, see Using SSH to\n Communicate with an Instance and Managing SSH\n Access. You can override this setting by specifying a different key pair, or no key\n pair, when you \n create an instance.

" + "smithy.api#enumValue": "utf_32_le" } }, - "ClonePermissions": { - "target": "com.amazonaws.opsworks#Boolean", + "utf_16": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Whether to clone the source stack's permissions.

" + "smithy.api#enumValue": "utf_16" } }, - "CloneAppIds": { - "target": "com.amazonaws.opsworks#Strings", + "utf_16_be": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A list of source stack app IDs to be included in the cloned stack.

" + "smithy.api#enumValue": "utf_16_be" } }, - "DefaultRootDeviceType": { - "target": "com.amazonaws.opsworks#RootDeviceType", + "utf_16_le": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The default root device type. This value is used by default for all instances in the cloned\n stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.

" + "smithy.api#enumValue": "utf_16_le" } }, - "AgentVersion": { - "target": "com.amazonaws.opsworks#String", + "utf_7": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The default AWS OpsWorks Stacks agent version. You have the following options:

\n
    \n
  • \n

    Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks\n automatically installs new agent versions on the stack's instances as soon as\n they are available.

    \n
  • \n
  • \n

    Fixed version - Set this parameter to your preferred agent version. To update \n the agent version, you must edit the stack configuration and specify a new version. \n AWS OpsWorks Stacks then automatically installs that version on the stack's instances.

    \n
  • \n
\n

The default setting is LATEST. To specify an agent version,\n you must use the complete version number, not the abbreviated number shown on the console.\n For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

\n \n

You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.

\n
" + "smithy.api#enumValue": "utf_7" } - } - } - }, - "com.amazonaws.opsworks#CloneStackResult": { - "type": "structure", - "members": { - "StackId": { - "target": "com.amazonaws.opsworks#String", + }, + "utf_8": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The cloned stack ID.

" + "smithy.api#enumValue": "utf_8" + } + }, + "utf_8_sig": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "utf_8_sig" } } }, "traits": { - "smithy.api#documentation": "

Contains the response to a CloneStack request.

" + "smithy.api#documentation": "

Specifies the encoding of the log file so that the file can be read correctly. The default is utf_8. Encodings supported by Python codecs.decode() can be used here.

" } }, - "com.amazonaws.opsworks#CloudWatchLogsConfiguration": { - "type": "structure", + "com.amazonaws.opsworks#CloudWatchLogsInitialPosition": { + "type": "enum", "members": { - "Enabled": { - "target": "com.amazonaws.opsworks#Boolean", + "start_of_file": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Whether CloudWatch Logs is enabled for a layer.

" + "smithy.api#enumValue": "start_of_file" } }, - "LogStreams": { - "target": "com.amazonaws.opsworks#CloudWatchLogsLogStreams", + "end_of_file": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A list of configuration options for CloudWatch Logs.

" + "smithy.api#enumValue": "end_of_file" } } }, "traits": { - "smithy.api#documentation": "

Describes the Amazon CloudWatch logs configuration for a layer.

" - } - }, - "com.amazonaws.opsworks#CloudWatchLogsEncoding": { - "type": "string", - "traits": { - "smithy.api#documentation": "

Specifies the encoding of the log file so that the file can be read correctly. The default is utf_8. Encodings supported by Python codecs.decode() can be used here.

", - "smithy.api#enum": [ - { - "value": "ascii", - "name": "ascii" - }, - { - "value": "big5", - "name": "big5" - }, - { - "value": "big5hkscs", - "name": "big5hkscs" - }, - { - "value": "cp037", - "name": "cp037" - }, - { - "value": "cp424", - "name": "cp424" - }, - { - "value": "cp437", - "name": "cp437" - }, - { - "value": "cp500", - "name": "cp500" - }, - { - "value": "cp720", - "name": "cp720" - }, - { - "value": "cp737", - "name": "cp737" - }, - { - "value": "cp775", - "name": "cp775" - }, - { - "value": "cp850", - "name": "cp850" - }, - { - "value": "cp852", - "name": "cp852" - }, - { - "value": "cp855", - "name": "cp855" - }, - { - "value": "cp856", - "name": "cp856" - }, - { - "value": "cp857", - "name": "cp857" - }, - { - "value": "cp858", - "name": "cp858" - }, - { - "value": "cp860", - "name": "cp860" - }, - { - "value": "cp861", - "name": "cp861" - }, - { - "value": "cp862", - "name": "cp862" - }, - { - "value": "cp863", - "name": "cp863" - }, - { - "value": "cp864", - "name": "cp864" - }, - { - "value": "cp865", - "name": "cp865" - }, - { - "value": "cp866", - "name": "cp866" - }, - { - "value": "cp869", - "name": "cp869" - }, - { - "value": "cp874", - "name": "cp874" - }, - { - "value": "cp875", - "name": "cp875" - }, - { - "value": "cp932", - "name": "cp932" - }, - { - "value": "cp949", - "name": "cp949" - }, - { - "value": "cp950", - "name": "cp950" - }, - { - "value": "cp1006", - "name": "cp1006" - }, - { - "value": "cp1026", - "name": "cp1026" - }, - { - "value": "cp1140", - "name": "cp1140" - }, - { - "value": "cp1250", - "name": "cp1250" - }, - { - "value": "cp1251", - "name": "cp1251" - }, - { - "value": "cp1252", - "name": "cp1252" - }, - { - "value": "cp1253", - "name": "cp1253" - }, - { - "value": "cp1254", - "name": "cp1254" - }, - { - "value": "cp1255", - "name": "cp1255" - }, - { - "value": "cp1256", - "name": "cp1256" - }, - { - "value": "cp1257", - "name": "cp1257" - }, - { - "value": "cp1258", - "name": "cp1258" - }, - { - "value": "euc_jp", - "name": "euc_jp" - }, - { - "value": "euc_jis_2004", - "name": "euc_jis_2004" - }, - { - "value": "euc_jisx0213", - "name": "euc_jisx0213" - }, - { - "value": "euc_kr", - "name": "euc_kr" - }, - { - "value": "gb2312", - "name": "gb2312" - }, - { - "value": "gbk", - "name": "gbk" - }, - { - "value": "gb18030", - "name": "gb18030" - }, - { - "value": "hz", - "name": "hz" - }, - { - "value": "iso2022_jp", - "name": "iso2022_jp" - }, - { - "value": "iso2022_jp_1", - "name": "iso2022_jp_1" - }, - { - "value": "iso2022_jp_2", - "name": "iso2022_jp_2" - }, - { - "value": "iso2022_jp_2004", - "name": "iso2022_jp_2004" - }, - { - "value": "iso2022_jp_3", - "name": "iso2022_jp_3" - }, - { - "value": "iso2022_jp_ext", - "name": "iso2022_jp_ext" - }, - { - "value": "iso2022_kr", - "name": "iso2022_kr" - }, - { - "value": "latin_1", - "name": "latin_1" - }, - { - "value": "iso8859_2", - "name": "iso8859_2" - }, - { - "value": "iso8859_3", - "name": "iso8859_3" - }, - { - "value": "iso8859_4", - "name": "iso8859_4" - }, - { - "value": "iso8859_5", - "name": "iso8859_5" - }, - { - "value": "iso8859_6", - "name": "iso8859_6" - }, - { - "value": "iso8859_7", - "name": "iso8859_7" - }, - { - "value": "iso8859_8", - "name": "iso8859_8" - }, - { - "value": "iso8859_9", - "name": "iso8859_9" - }, - { - "value": "iso8859_10", - "name": "iso8859_10" - }, - { - "value": "iso8859_13", - "name": "iso8859_13" - }, - { - "value": "iso8859_14", - "name": "iso8859_14" - }, - { - "value": "iso8859_15", - "name": "iso8859_15" - }, - { - "value": "iso8859_16", - "name": "iso8859_16" - }, - { - "value": "johab", - "name": "johab" - }, - { - "value": "koi8_r", - "name": "koi8_r" - }, - { - "value": "koi8_u", - "name": "koi8_u" - }, - { - "value": "mac_cyrillic", - "name": "mac_cyrillic" - }, - { - "value": "mac_greek", - "name": "mac_greek" - }, - { - "value": "mac_iceland", - "name": "mac_iceland" - }, - { - "value": "mac_latin2", - "name": "mac_latin2" - }, - { - "value": "mac_roman", - "name": "mac_roman" - }, - { - "value": "mac_turkish", - "name": "mac_turkish" - }, - { - "value": "ptcp154", - "name": "ptcp154" - }, - { - "value": "shift_jis", - "name": "shift_jis" - }, - { - "value": "shift_jis_2004", - "name": "shift_jis_2004" - }, - { - "value": "shift_jisx0213", - "name": "shift_jisx0213" - }, - { - "value": "utf_32", - "name": "utf_32" - }, - { - "value": "utf_32_be", - "name": "utf_32_be" - }, - { - "value": "utf_32_le", - "name": "utf_32_le" - }, - { - "value": "utf_16", - "name": "utf_16" - }, - { - "value": "utf_16_be", - "name": "utf_16_be" - }, - { - "value": "utf_16_le", - "name": "utf_16_le" - }, - { - "value": "utf_7", - "name": "utf_7" - }, - { - "value": "utf_8", - "name": "utf_8" - }, - { - "value": "utf_8_sig", - "name": "utf_8_sig" - } - ] - } - }, - "com.amazonaws.opsworks#CloudWatchLogsInitialPosition": { - "type": "string", - "traits": { - "smithy.api#documentation": "

Specifies where to start to read data (start_of_file or end_of_file). The default is start_of_file. It's only used if there is no state persisted for that log stream.

", - "smithy.api#enum": [ - { - "value": "start_of_file", - "name": "start_of_file" - }, - { - "value": "end_of_file", - "name": "end_of_file" - } - ] + "smithy.api#documentation": "

Specifies where to start to read data (start_of_file or end_of_file). The default is start_of_file. It's only used if there is no state persisted for that log stream.

" } }, "com.amazonaws.opsworks#CloudWatchLogsLogStream": { @@ -1184,19 +1410,23 @@ } }, "com.amazonaws.opsworks#CloudWatchLogsTimeZone": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The preferred time zone for logs streamed to CloudWatch Logs. Valid values are LOCAL and UTC, for Coordinated Universal Time.

", - "smithy.api#enum": [ - { - "value": "LOCAL", - "name": "LOCAL" - }, - { - "value": "UTC", - "name": "UTC" + "type": "enum", + "members": { + "LOCAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOCAL" } - ] + }, + "UTC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UTC" + } + } + }, + "traits": { + "smithy.api#documentation": "

The preferred time zone for logs streamed to CloudWatch Logs. Valid values are LOCAL and UTC, for Coordinated Universal Time.

" } }, "com.amazonaws.opsworks#Command": { @@ -1371,6 +1601,9 @@ "smithy.api#documentation": "

An array of EnvironmentVariable objects that specify environment variables to be\n associated with the app. After you deploy the app, these variables are defined on the\n associated app server instance. For more information, see Environment Variables.

\n

There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variables' names, values, and protected flag values - cannot exceed 20 KB. This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, \"Environment: is too large (maximum is 20KB).\"

\n \n

If you have specified one or more environment variables, you cannot modify the stack's Chef version.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#CreateAppResult": { @@ -1384,7 +1617,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a CreateApp request.

" + "smithy.api#documentation": "

Contains the response to a CreateApp request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#CreateDeployment": { @@ -1454,6 +1688,9 @@ "smithy.api#documentation": "

A string that contains user-defined, custom JSON. You can use this parameter to override some corresponding default stack configuration JSON values. The string should be in the following format:

\n

\n \"{\\\"key1\\\": \\\"value1\\\", \\\"key2\\\": \\\"value2\\\",...}\"\n

\n

For more information about custom JSON, see Use Custom JSON to\n Modify the Stack Configuration Attributes and \n Overriding Attributes With Custom JSON.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#CreateDeploymentResult": { @@ -1467,7 +1704,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a CreateDeployment request.

" + "smithy.api#documentation": "

Contains the response to a CreateDeployment request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#CreateInstance": { @@ -1604,6 +1842,9 @@ "smithy.api#documentation": "

The instance's tenancy option. The default option is no tenancy, or if the instance is running in a VPC, inherit tenancy settings from the VPC. The following are valid values for this parameter: dedicated, default, or host. Because there are costs associated with changes in tenancy options, we recommend that you research tenancy options before choosing them for your instances. For more information about dedicated hosts, see Dedicated Hosts Overview and Amazon EC2 Dedicated Hosts. For more information about dedicated instances, see Dedicated Instances and Amazon EC2 Dedicated Instances.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#CreateInstanceResult": { @@ -1617,7 +1858,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a CreateInstance request.

" + "smithy.api#documentation": "

Contains the response to a CreateInstance request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#CreateLayer": { @@ -1755,6 +1997,9 @@ "smithy.api#documentation": "

A LifeCycleEventConfiguration object that you can use to configure the Shutdown event to\n specify an execution timeout and enable or disable Elastic Load Balancer connection\n draining.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#CreateLayerResult": { @@ -1768,7 +2013,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a CreateLayer request.

" + "smithy.api#documentation": "

Contains the response to a CreateLayer request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#CreateStack": { @@ -1909,6 +2155,9 @@ "smithy.api#documentation": "

The default AWS OpsWorks Stacks agent version. You have the following options:

\n
    \n
  • \n

    Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks\n automatically installs new agent versions on the stack's instances as soon as\n they are available.

    \n
  • \n
  • \n

    Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. AWS OpsWorks Stacks then automatically installs that version on the stack's instances.

    \n
  • \n
\n

The default setting is the most recent release of the agent. To specify an agent version,\n you must use the complete version number, not the abbreviated number shown on the console.\n For a list of available agent version numbers, call DescribeAgentVersions. AgentVersion cannot be set to Chef 12.2.

\n \n

You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#CreateStackResult": { @@ -1922,7 +2171,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a CreateStack request.

" + "smithy.api#documentation": "

Contains the response to a CreateStack request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#CreateUserProfile": { @@ -1970,6 +2220,9 @@ "smithy.api#documentation": "

Whether users can specify their own SSH public key through the My Settings page. For more\n information, see Setting an IAM\n User's Public SSH Key.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#CreateUserProfileResult": { @@ -1983,7 +2236,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a CreateUserProfile request.

" + "smithy.api#documentation": "

Contains the response to a CreateUserProfile request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DailyAutoScalingSchedule": { @@ -2060,6 +2314,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DeleteInstance": { @@ -2104,6 +2361,9 @@ "smithy.api#documentation": "

Whether to delete the instance's Amazon EBS volumes.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DeleteLayer": { @@ -2136,6 +2396,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DeleteStack": { @@ -2168,6 +2431,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DeleteUserProfile": { @@ -2200,6 +2466,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#Deployment": { @@ -2313,58 +2582,80 @@ } }, "com.amazonaws.opsworks#DeploymentCommandName": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "install_dependencies", - "name": "install_dependencies" - }, - { - "value": "update_dependencies", - "name": "update_dependencies" - }, - { - "value": "update_custom_cookbooks", - "name": "update_custom_cookbooks" - }, - { - "value": "execute_recipes", - "name": "execute_recipes" - }, - { - "value": "configure", - "name": "configure" - }, - { - "value": "setup", - "name": "setup" - }, - { - "value": "deploy", - "name": "deploy" - }, - { - "value": "rollback", - "name": "rollback" - }, - { - "value": "start", - "name": "start" - }, - { - "value": "stop", - "name": "stop" - }, - { - "value": "restart", - "name": "restart" - }, - { - "value": "undeploy", - "name": "undeploy" + "type": "enum", + "members": { + "install_dependencies": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "install_dependencies" + } + }, + "update_dependencies": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "update_dependencies" + } + }, + "update_custom_cookbooks": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "update_custom_cookbooks" + } + }, + "execute_recipes": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "execute_recipes" + } + }, + "configure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "configure" + } + }, + "setup": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "setup" + } + }, + "deploy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "deploy" } - ] + }, + "rollback": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "rollback" + } + }, + "start": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "start" + } + }, + "stop": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "stop" + } + }, + "restart": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "restart" + } + }, + "undeploy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "undeploy" + } + } } }, "com.amazonaws.opsworks#Deployments": { @@ -2403,6 +2694,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DeregisterElasticIp": { @@ -2435,6 +2729,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DeregisterInstance": { @@ -2467,6 +2764,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DeregisterRdsDbInstance": { @@ -2499,6 +2799,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DeregisterVolume": { @@ -2531,6 +2834,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeAgentVersions": { @@ -2568,6 +2874,9 @@ "smithy.api#documentation": "

The configuration manager.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeAgentVersionsResult": { @@ -2581,7 +2890,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeAgentVersions request.

" + "smithy.api#documentation": "

Contains the response to a DescribeAgentVersions request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeApps": { @@ -2638,6 +2948,9 @@ "smithy.api#documentation": "

An array of app IDs for the apps to be described. If you use this parameter,\n DescribeApps returns a description of the specified apps. Otherwise, it returns\n a description of every app.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeAppsResult": { @@ -2651,7 +2964,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeApps request.

" + "smithy.api#documentation": "

Contains the response to a DescribeApps request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeCommands": { @@ -2695,6 +3009,9 @@ "smithy.api#documentation": "

An array of command IDs. If you include this parameter, DescribeCommands returns\n a description of the specified commands. Otherwise, it returns a description of every\n command.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeCommandsResult": { @@ -2708,7 +3025,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeCommands request.

" + "smithy.api#documentation": "

Contains the response to a DescribeCommands request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeDeployments": { @@ -2780,6 +3098,9 @@ "smithy.api#documentation": "

An array of deployment IDs to be described. If you include this parameter,\n the command returns a description of the specified deployments.\n Otherwise, it returns a description of every deployment.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeDeploymentsResult": { @@ -2793,7 +3114,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeDeployments request.

" + "smithy.api#documentation": "

Contains the response to a DescribeDeployments request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeEcsClusters": { @@ -2849,6 +3171,9 @@ "smithy.api#documentation": "

To receive a paginated response, use this parameter to specify the maximum number\n of results to be returned with a single call. If the number of available results exceeds this maximum, the\n response includes a NextToken value that you can assign\n to the NextToken request parameter to get the next set of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeEcsClustersResult": { @@ -2868,7 +3193,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeEcsClusters request.

" + "smithy.api#documentation": "

Contains the response to a DescribeEcsClusters request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeElasticIps": { @@ -2912,6 +3238,9 @@ "smithy.api#documentation": "

An array of Elastic IP addresses to be described. If you include this parameter,\n DescribeElasticIps returns a description of the specified Elastic IP addresses.\n Otherwise, it returns a description of every Elastic IP address.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeElasticIpsResult": { @@ -2925,7 +3254,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeElasticIps request.

" + "smithy.api#documentation": "

Contains the response to a DescribeElasticIps request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeElasticLoadBalancers": { @@ -2963,6 +3293,9 @@ "smithy.api#documentation": "

A list of layer IDs. The action describes the Elastic Load Balancing instances for the specified layers.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeElasticLoadBalancersResult": { @@ -2976,7 +3309,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeElasticLoadBalancers request.

" + "smithy.api#documentation": "

Contains the response to a DescribeElasticLoadBalancers request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeInstances": { @@ -3402,6 +3736,9 @@ "smithy.api#documentation": "

An array of instance IDs to be described. If you use this parameter,\n DescribeInstances returns a description of the specified instances. Otherwise,\n it returns a description of every instance.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeInstancesResult": { @@ -3415,7 +3752,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeInstances request.

" + "smithy.api#documentation": "

Contains the response to a DescribeInstances request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeLayers": { @@ -3453,6 +3791,9 @@ "smithy.api#documentation": "

An array of layer IDs that specify the layers to be described. If you omit this parameter,\n DescribeLayers returns a description of every layer in the specified stack.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeLayersResult": { @@ -3466,7 +3807,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeLayers request.

" + "smithy.api#documentation": "

Contains the response to a DescribeLayers request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeLoadBasedAutoScaling": { @@ -3499,6 +3841,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeLoadBasedAutoScalingResult": { @@ -3512,7 +3857,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeLoadBasedAutoScaling request.

" + "smithy.api#documentation": "

Contains the response to a DescribeLoadBasedAutoScaling request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeMyUserProfile": { @@ -3538,7 +3884,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeMyUserProfile request.

" + "smithy.api#documentation": "

Contains the response to a DescribeMyUserProfile request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeOperatingSystems": { @@ -3564,7 +3911,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a DescribeOperatingSystems request.

" + "smithy.api#documentation": "

The response to a DescribeOperatingSystems request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribePermissions": { @@ -3602,6 +3950,9 @@ "smithy.api#documentation": "

The stack ID.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribePermissionsResult": { @@ -3615,7 +3966,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribePermissions request.

" + "smithy.api#documentation": "

Contains the response to a DescribePermissions request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeRaidArrays": { @@ -3659,6 +4011,9 @@ "smithy.api#documentation": "

An array of RAID array IDs. If you use this parameter, DescribeRaidArrays\n returns descriptions of the specified arrays. Otherwise, it returns a description of every\n array.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeRaidArraysResult": { @@ -3672,7 +4027,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeRaidArrays request.

" + "smithy.api#documentation": "

Contains the response to a DescribeRaidArrays request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeRdsDbInstances": { @@ -3711,6 +4067,9 @@ "smithy.api#documentation": "

An array containing the ARNs of the instances to be described.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeRdsDbInstancesResult": { @@ -3724,7 +4083,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeRdsDbInstances request.

" + "smithy.api#documentation": "

Contains the response to a DescribeRdsDbInstances request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeServiceErrors": { @@ -3768,6 +4128,9 @@ "smithy.api#documentation": "

An array of service error IDs. If you use this parameter, DescribeServiceErrors\n returns descriptions of the specified errors. Otherwise, it returns a description of every\n error.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeServiceErrorsResult": { @@ -3781,7 +4144,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeServiceErrors request.

" + "smithy.api#documentation": "

Contains the response to a DescribeServiceErrors request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeStackProvisioningParameters": { @@ -3814,6 +4178,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeStackProvisioningParametersResult": { @@ -3833,7 +4200,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeStackProvisioningParameters request.

" + "smithy.api#documentation": "

Contains the response to a DescribeStackProvisioningParameters request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeStackSummary": { @@ -3866,6 +4234,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeStackSummaryResult": { @@ -3879,7 +4250,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeStackSummary request.

" + "smithy.api#documentation": "

Contains the response to a DescribeStackSummary request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeStacks": { @@ -3911,6 +4283,9 @@ "smithy.api#documentation": "

An array of stack IDs that specify the stacks to be described. If you omit this parameter,\n DescribeStacks returns a description of every stack.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeStacksResult": { @@ -3924,7 +4299,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeStacks request.

" + "smithy.api#documentation": "

Contains the response to a DescribeStacks request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeTimeBasedAutoScaling": { @@ -3957,6 +4333,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeTimeBasedAutoScalingResult": { @@ -3970,7 +4349,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeTimeBasedAutoScaling request.

" + "smithy.api#documentation": "

Contains the response to a DescribeTimeBasedAutoScaling request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeUserProfiles": { @@ -4002,6 +4382,9 @@ "smithy.api#documentation": "

An array of IAM or federated user ARNs that identify the users to be described.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeUserProfilesResult": { @@ -4015,7 +4398,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeUserProfiles request.

" + "smithy.api#documentation": "

Contains the response to a DescribeUserProfiles request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DescribeVolumes": { @@ -4065,6 +4449,9 @@ "smithy.api#documentation": "

Am array of volume IDs. If you use this parameter, DescribeVolumes returns\n descriptions of the specified volumes. Otherwise, it returns a description of every\n volume.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DescribeVolumesResult": { @@ -4078,7 +4465,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a DescribeVolumes request.

" + "smithy.api#documentation": "

Contains the response to a DescribeVolumes request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#DetachElasticLoadBalancer": { @@ -4115,6 +4503,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#DisassociateElasticIp": { @@ -4147,6 +4538,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#Double": { @@ -4404,6 +4798,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#GetHostnameSuggestionResult": { @@ -4423,7 +4820,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a GetHostnameSuggestion request.

" + "smithy.api#documentation": "

Contains the response to a GetHostnameSuggestion request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#GrantAccess": { @@ -4462,6 +4860,9 @@ "smithy.api#documentation": "

The length of time (in minutes) that the grant is valid. When the grant expires at the end of this period, the user will no longer be able to use the credentials to log in. If the user is logged in at the time, he or she automatically will be logged out.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#GrantAccessResult": { @@ -4475,7 +4876,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a GrantAccess request.

" + "smithy.api#documentation": "

Contains the response to a GrantAccess request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#Hour": { @@ -4925,288 +5327,358 @@ "smithy.api#documentation": "

The layer name.

" } }, - "Shortname": { - "target": "com.amazonaws.opsworks#String", + "Shortname": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The layer short name.

" + } + }, + "Attributes": { + "target": "com.amazonaws.opsworks#LayerAttributes", + "traits": { + "smithy.api#documentation": "

The layer attributes.

\n

For the HaproxyStatsPassword, MysqlRootPassword, and\n GangliaPassword attributes, AWS OpsWorks Stacks returns *****FILTERED*****\n instead of the actual value

\n

For an ECS Cluster layer, AWS OpsWorks Stacks the EcsClusterArn attribute is set to the cluster's ARN.

" + } + }, + "CloudWatchLogsConfiguration": { + "target": "com.amazonaws.opsworks#CloudWatchLogsConfiguration", + "traits": { + "smithy.api#documentation": "

The Amazon CloudWatch Logs configuration settings for the layer.

" + } + }, + "CustomInstanceProfileArn": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

The ARN of the default IAM profile to be used for the layer's EC2 instances. For more\n information about IAM ARNs, see Using\n Identifiers.

" + } + }, + "CustomJson": { + "target": "com.amazonaws.opsworks#String", + "traits": { + "smithy.api#documentation": "

A JSON formatted string containing the layer's custom stack configuration and deployment attributes.

" + } + }, + "CustomSecurityGroupIds": { + "target": "com.amazonaws.opsworks#Strings", + "traits": { + "smithy.api#documentation": "

An array containing the layer's custom security group IDs.

" + } + }, + "DefaultSecurityGroupNames": { + "target": "com.amazonaws.opsworks#Strings", + "traits": { + "smithy.api#documentation": "

An array containing the layer's security group names.

" + } + }, + "Packages": { + "target": "com.amazonaws.opsworks#Strings", + "traits": { + "smithy.api#documentation": "

An array of Package objects that describe the layer's packages.

" + } + }, + "VolumeConfigurations": { + "target": "com.amazonaws.opsworks#VolumeConfigurations", + "traits": { + "smithy.api#documentation": "

A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

" + } + }, + "EnableAutoHealing": { + "target": "com.amazonaws.opsworks#Boolean", + "traits": { + "smithy.api#documentation": "

Whether auto healing is disabled for the layer.

" + } + }, + "AutoAssignElasticIps": { + "target": "com.amazonaws.opsworks#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to automatically assign an Elastic IP\n address to the layer's instances. For more information, see How to Edit\n a Layer.

" + } + }, + "AutoAssignPublicIps": { + "target": "com.amazonaws.opsworks#Boolean", + "traits": { + "smithy.api#documentation": "

For stacks that are running in a VPC, whether to automatically assign a public IP address to\n the layer's instances. For more information, see How to Edit\n a Layer.

" + } + }, + "DefaultRecipes": { + "target": "com.amazonaws.opsworks#Recipes", + "traits": { + "smithy.api#documentation": "

AWS OpsWorks Stacks supports five lifecycle events: setup, configuration, \n deploy, undeploy, and shutdown.\n For each layer, AWS OpsWorks Stacks runs a set of standard recipes for each event. You can also provide \n custom recipes for any or all layers and events. AWS OpsWorks Stacks runs custom event recipes after the standard \n recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of \n the five events.

\n

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe \n name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the \n dbsetup.rb recipe in the repository's phpapp2 folder.

" + } + }, + "CustomRecipes": { + "target": "com.amazonaws.opsworks#Recipes", + "traits": { + "smithy.api#documentation": "

A LayerCustomRecipes object that specifies the layer's custom recipes.

" + } + }, + "CreatedAt": { + "target": "com.amazonaws.opsworks#DateTime", + "traits": { + "smithy.api#documentation": "

Date when the layer was created.

" + } + }, + "InstallUpdatesOnBoot": { + "target": "com.amazonaws.opsworks#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to install operating system and package updates when the instance boots. The default\n value is true. If this value is set to false, you must then update\n your instances manually by using CreateDeployment to run the\n update_dependencies stack command or manually running yum (Amazon\n Linux) or apt-get (Ubuntu) on the instances.

\n \n

We strongly recommend using the default value of true, to ensure that your\n instances have the latest security updates.

\n
" + } + }, + "UseEbsOptimizedInstances": { + "target": "com.amazonaws.opsworks#Boolean", + "traits": { + "smithy.api#documentation": "

Whether the layer uses Amazon EBS-optimized instances.

" + } + }, + "LifecycleEventConfiguration": { + "target": "com.amazonaws.opsworks#LifecycleEventConfiguration", + "traits": { + "smithy.api#documentation": "

A LifeCycleEventConfiguration object that specifies the Shutdown event\n configuration.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes a layer.

" + } + }, + "com.amazonaws.opsworks#LayerAttributes": { + "type": "map", + "key": { + "target": "com.amazonaws.opsworks#LayerAttributesKeys" + }, + "value": { + "target": "com.amazonaws.opsworks#String" + } + }, + "com.amazonaws.opsworks#LayerAttributesKeys": { + "type": "enum", + "members": { + "EcsClusterArn": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EcsClusterArn" + } + }, + "EnableHaproxyStats": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EnableHaproxyStats" + } + }, + "HaproxyStatsUrl": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HaproxyStatsUrl" + } + }, + "HaproxyStatsUser": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HaproxyStatsUser" + } + }, + "HaproxyStatsPassword": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HaproxyStatsPassword" + } + }, + "HaproxyHealthCheckUrl": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HaproxyHealthCheckUrl" + } + }, + "HaproxyHealthCheckMethod": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HaproxyHealthCheckMethod" + } + }, + "MysqlRootPassword": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MysqlRootPassword" + } + }, + "MysqlRootPasswordUbiquitous": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MysqlRootPasswordUbiquitous" + } + }, + "GangliaUrl": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GangliaUrl" + } + }, + "GangliaUser": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GangliaUser" + } + }, + "GangliaPassword": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GangliaPassword" + } + }, + "MemcachedMemory": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MemcachedMemory" + } + }, + "NodejsVersion": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NodejsVersion" + } + }, + "RubyVersion": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RubyVersion" + } + }, + "RubygemsVersion": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RubygemsVersion" + } + }, + "ManageBundler": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ManageBundler" + } + }, + "BundlerVersion": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BundlerVersion" + } + }, + "RailsStack": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RailsStack" + } + }, + "PassengerVersion": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The layer short name.

" + "smithy.api#enumValue": "PassengerVersion" } }, - "Attributes": { - "target": "com.amazonaws.opsworks#LayerAttributes", + "Jvm": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The layer attributes.

\n

For the HaproxyStatsPassword, MysqlRootPassword, and\n GangliaPassword attributes, AWS OpsWorks Stacks returns *****FILTERED*****\n instead of the actual value

\n

For an ECS Cluster layer, AWS OpsWorks Stacks the EcsClusterArn attribute is set to the cluster's ARN.

" + "smithy.api#enumValue": "Jvm" } }, - "CloudWatchLogsConfiguration": { - "target": "com.amazonaws.opsworks#CloudWatchLogsConfiguration", + "JvmVersion": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The Amazon CloudWatch Logs configuration settings for the layer.

" + "smithy.api#enumValue": "JvmVersion" } }, - "CustomInstanceProfileArn": { - "target": "com.amazonaws.opsworks#String", + "JvmOptions": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The ARN of the default IAM profile to be used for the layer's EC2 instances. For more\n information about IAM ARNs, see Using\n Identifiers.

" + "smithy.api#enumValue": "JvmOptions" } }, - "CustomJson": { - "target": "com.amazonaws.opsworks#String", + "JavaAppServer": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A JSON formatted string containing the layer's custom stack configuration and deployment attributes.

" + "smithy.api#enumValue": "JavaAppServer" } }, - "CustomSecurityGroupIds": { - "target": "com.amazonaws.opsworks#Strings", + "JavaAppServerVersion": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

An array containing the layer's custom security group IDs.

" + "smithy.api#enumValue": "JavaAppServerVersion" } - }, - "DefaultSecurityGroupNames": { - "target": "com.amazonaws.opsworks#Strings", + } + } + }, + "com.amazonaws.opsworks#LayerType": { + "type": "enum", + "members": { + "aws_flow_ruby": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

An array containing the layer's security group names.

" + "smithy.api#enumValue": "aws-flow-ruby" } }, - "Packages": { - "target": "com.amazonaws.opsworks#Strings", + "ecs_cluster": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

An array of Package objects that describe the layer's packages.

" + "smithy.api#enumValue": "ecs-cluster" } }, - "VolumeConfigurations": { - "target": "com.amazonaws.opsworks#VolumeConfigurations", + "java_app": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

" + "smithy.api#enumValue": "java-app" } }, - "EnableAutoHealing": { - "target": "com.amazonaws.opsworks#Boolean", + "lb": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Whether auto healing is disabled for the layer.

" + "smithy.api#enumValue": "lb" } }, - "AutoAssignElasticIps": { - "target": "com.amazonaws.opsworks#Boolean", + "web": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Whether to automatically assign an Elastic IP\n address to the layer's instances. For more information, see How to Edit\n a Layer.

" + "smithy.api#enumValue": "web" } }, - "AutoAssignPublicIps": { - "target": "com.amazonaws.opsworks#Boolean", + "php_app": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

For stacks that are running in a VPC, whether to automatically assign a public IP address to\n the layer's instances. For more information, see How to Edit\n a Layer.

" + "smithy.api#enumValue": "php-app" } }, - "DefaultRecipes": { - "target": "com.amazonaws.opsworks#Recipes", + "rails_app": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

AWS OpsWorks Stacks supports five lifecycle events: setup, configuration, \n deploy, undeploy, and shutdown.\n For each layer, AWS OpsWorks Stacks runs a set of standard recipes for each event. You can also provide \n custom recipes for any or all layers and events. AWS OpsWorks Stacks runs custom event recipes after the standard \n recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of \n the five events.

\n

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe \n name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the \n dbsetup.rb recipe in the repository's phpapp2 folder.

" + "smithy.api#enumValue": "rails-app" } }, - "CustomRecipes": { - "target": "com.amazonaws.opsworks#Recipes", + "nodejs_app": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A LayerCustomRecipes object that specifies the layer's custom recipes.

" + "smithy.api#enumValue": "nodejs-app" } }, - "CreatedAt": { - "target": "com.amazonaws.opsworks#DateTime", + "memcached": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Date when the layer was created.

" + "smithy.api#enumValue": "memcached" } }, - "InstallUpdatesOnBoot": { - "target": "com.amazonaws.opsworks#Boolean", + "db_master": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Whether to install operating system and package updates when the instance boots. The default\n value is true. If this value is set to false, you must then update\n your instances manually by using CreateDeployment to run the\n update_dependencies stack command or manually running yum (Amazon\n Linux) or apt-get (Ubuntu) on the instances.

\n \n

We strongly recommend using the default value of true, to ensure that your\n instances have the latest security updates.

\n
" + "smithy.api#enumValue": "db-master" } }, - "UseEbsOptimizedInstances": { - "target": "com.amazonaws.opsworks#Boolean", + "monitoring_master": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

Whether the layer uses Amazon EBS-optimized instances.

" + "smithy.api#enumValue": "monitoring-master" } }, - "LifecycleEventConfiguration": { - "target": "com.amazonaws.opsworks#LifecycleEventConfiguration", + "custom": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

A LifeCycleEventConfiguration object that specifies the Shutdown event\n configuration.

" + "smithy.api#enumValue": "custom" } } - }, - "traits": { - "smithy.api#documentation": "

Describes a layer.

" - } - }, - "com.amazonaws.opsworks#LayerAttributes": { - "type": "map", - "key": { - "target": "com.amazonaws.opsworks#LayerAttributesKeys" - }, - "value": { - "target": "com.amazonaws.opsworks#String" - } - }, - "com.amazonaws.opsworks#LayerAttributesKeys": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EcsClusterArn", - "name": "EcsClusterArn" - }, - { - "value": "EnableHaproxyStats", - "name": "EnableHaproxyStats" - }, - { - "value": "HaproxyStatsUrl", - "name": "HaproxyStatsUrl" - }, - { - "value": "HaproxyStatsUser", - "name": "HaproxyStatsUser" - }, - { - "value": "HaproxyStatsPassword", - "name": "HaproxyStatsPassword" - }, - { - "value": "HaproxyHealthCheckUrl", - "name": "HaproxyHealthCheckUrl" - }, - { - "value": "HaproxyHealthCheckMethod", - "name": "HaproxyHealthCheckMethod" - }, - { - "value": "MysqlRootPassword", - "name": "MysqlRootPassword" - }, - { - "value": "MysqlRootPasswordUbiquitous", - "name": "MysqlRootPasswordUbiquitous" - }, - { - "value": "GangliaUrl", - "name": "GangliaUrl" - }, - { - "value": "GangliaUser", - "name": "GangliaUser" - }, - { - "value": "GangliaPassword", - "name": "GangliaPassword" - }, - { - "value": "MemcachedMemory", - "name": "MemcachedMemory" - }, - { - "value": "NodejsVersion", - "name": "NodejsVersion" - }, - { - "value": "RubyVersion", - "name": "RubyVersion" - }, - { - "value": "RubygemsVersion", - "name": "RubygemsVersion" - }, - { - "value": "ManageBundler", - "name": "ManageBundler" - }, - { - "value": "BundlerVersion", - "name": "BundlerVersion" - }, - { - "value": "RailsStack", - "name": "RailsStack" - }, - { - "value": "PassengerVersion", - "name": "PassengerVersion" - }, - { - "value": "Jvm", - "name": "Jvm" - }, - { - "value": "JvmVersion", - "name": "JvmVersion" - }, - { - "value": "JvmOptions", - "name": "JvmOptions" - }, - { - "value": "JavaAppServer", - "name": "JavaAppServer" - }, - { - "value": "JavaAppServerVersion", - "name": "JavaAppServerVersion" - } - ] - } - }, - "com.amazonaws.opsworks#LayerType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "aws-flow-ruby", - "name": "aws_flow_ruby" - }, - { - "value": "ecs-cluster", - "name": "ecs_cluster" - }, - { - "value": "java-app", - "name": "java_app" - }, - { - "value": "lb", - "name": "lb" - }, - { - "value": "web", - "name": "web" - }, - { - "value": "php-app", - "name": "php_app" - }, - { - "value": "rails-app", - "name": "rails_app" - }, - { - "value": "nodejs-app", - "name": "nodejs_app" - }, - { - "value": "memcached", - "name": "memcached" - }, - { - "value": "db-master", - "name": "db_master" - }, - { - "value": "monitoring-master", - "name": "monitoring_master" - }, - { - "value": "custom", - "name": "custom" - } - ] } }, "com.amazonaws.opsworks#Layers": { @@ -5272,6 +5744,9 @@ "smithy.api#documentation": "

Do not use. A validation exception occurs if you add a NextToken parameter to a ListTagsRequest call.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#ListTagsResult": { @@ -5291,7 +5766,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a ListTags request.

" + "smithy.api#documentation": "

Contains the response to a ListTags request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#LoadBasedAutoScalingConfiguration": { @@ -5736,52 +6212,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -5789,13 +6269,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -5805,224 +6294,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://opsworks-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://opsworks-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], "type": "tree", "rules": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://opsworks-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, + "conditions": [], + "endpoint": { + "url": "https://opsworks-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } + "ref": "UseDualStack" + }, + true ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://opsworks.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://opsworks.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://opsworks.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://opsworks.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -6037,8 +6477,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6050,8 +6490,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6063,8 +6503,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6076,8 +6516,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6089,8 +6529,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6102,8 +6542,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6115,8 +6555,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6128,8 +6568,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6141,8 +6581,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6154,8 +6594,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6167,8 +6607,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6180,8 +6620,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6193,8 +6633,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6206,8 +6646,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6219,8 +6659,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6232,8 +6672,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -6245,8 +6685,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -6258,8 +6698,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -6271,8 +6711,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -6284,8 +6724,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -6297,8 +6737,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -6310,8 +6750,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6323,8 +6763,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -6336,8 +6776,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -6349,8 +6789,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -6362,8 +6802,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -6375,8 +6826,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -6388,8 +6850,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -6401,8 +6874,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -6414,8 +6898,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -6427,8 +6911,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -6440,8 +6924,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -6452,8 +6936,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -6464,10 +6948,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -6717,6 +7207,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#Recipes": { @@ -6794,6 +7287,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#RegisterEcsClusterResult": { @@ -6807,7 +7303,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a RegisterEcsCluster request.

" + "smithy.api#documentation": "

Contains the response to a RegisterEcsCluster request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#RegisterElasticIp": { @@ -6847,6 +7344,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#RegisterElasticIpResult": { @@ -6860,7 +7360,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a RegisterElasticIp request.

" + "smithy.api#documentation": "

Contains the response to a RegisterElasticIp request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#RegisterInstance": { @@ -6929,6 +7430,9 @@ "smithy.api#documentation": "

An InstanceIdentity object that contains the instance's identity.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#RegisterInstanceResult": { @@ -6942,7 +7446,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a RegisterInstanceResult request.

" + "smithy.api#documentation": "

Contains the response to a RegisterInstanceResult request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#RegisterRdsDbInstance": { @@ -6996,6 +7501,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#RegisterVolume": { @@ -7034,6 +7542,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#RegisterVolumeResult": { @@ -7047,7 +7558,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response to a RegisterVolume request.

" + "smithy.api#documentation": "

Contains the response to a RegisterVolume request.

", + "smithy.api#output": {} } }, "com.amazonaws.opsworks#ReportedOs": { @@ -7095,18 +7607,20 @@ } }, "com.amazonaws.opsworks#RootDeviceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ebs", - "name": "ebs" - }, - { - "value": "instance-store", - "name": "instance_store" + "type": "enum", + "members": { + "ebs": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ebs" } - ] + }, + "instance_store": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "instance-store" + } + } } }, "com.amazonaws.opsworks#SelfUserProfile": { @@ -7239,6 +7753,9 @@ "smithy.api#documentation": "

An AutoScalingThresholds object with the downscaling threshold configuration. If\n the load falls below these thresholds for a specified amount of time, AWS OpsWorks Stacks stops a specified\n number of instances.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#SetPermission": { @@ -7296,6 +7813,9 @@ "smithy.api#documentation": "

The user's permission level, which must be set to one of the following strings. You cannot set your own permissions level.

\n
    \n
  • \n

    \n deny\n

    \n
  • \n
  • \n

    \n show\n

    \n
  • \n
  • \n

    \n deploy\n

    \n
  • \n
  • \n

    \n manage\n

    \n
  • \n
  • \n

    \n iam_only\n

    \n
  • \n
\n

For more information about the permissions associated with these levels, see Managing User Permissions.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#SetTimeBasedAutoScaling": { @@ -7334,6 +7854,9 @@ "smithy.api#documentation": "

An AutoScalingSchedule with the instance schedule.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#ShutdownEventConfiguration": { @@ -7401,26 +7924,32 @@ } }, "com.amazonaws.opsworks#SourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "git", - "name": "git" - }, - { - "value": "svn", - "name": "svn" - }, - { - "value": "archive", - "name": "archive" - }, - { - "value": "s3", - "name": "s3" + "type": "enum", + "members": { + "git": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "git" + } + }, + "svn": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "svn" + } + }, + "archive": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "archive" + } + }, + "s3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "s3" } - ] + } } }, "com.amazonaws.opsworks#SslConfiguration": { @@ -7601,14 +8130,14 @@ } }, "com.amazonaws.opsworks#StackAttributesKeys": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Color", - "name": "Color" + "type": "enum", + "members": { + "Color": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Color" } - ] + } } }, "com.amazonaws.opsworks#StackConfigurationManager": { @@ -7711,6 +8240,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#StartStack": { @@ -7743,6 +8275,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#StopInstance": { @@ -7781,6 +8316,9 @@ "smithy.api#documentation": "

Specifies whether to force an instance to stop. If the instance's root device type is ebs, or EBS-backed, \n adding the Force parameter to the StopInstances API call disassociates the AWS OpsWorks Stacks instance from EC2, and forces deletion of only the OpsWorks Stacks instance. \n You must also delete the formerly-associated instance in EC2 after troubleshooting and replacing the AWS OpsWorks Stacks instance with a new one.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#StopStack": { @@ -7813,6 +8351,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#String": { @@ -7873,6 +8414,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#TagValue": { @@ -7975,6 +8519,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UnassignVolume": { @@ -8007,6 +8554,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UntagResource": { @@ -8046,6 +8596,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UpdateApp": { @@ -8138,6 +8691,9 @@ "smithy.api#documentation": "

An array of EnvironmentVariable objects that specify environment variables to be\n associated with the app. After you deploy the app, these variables are defined on the\n associated app server instances.For more information, see Environment Variables.

\n

There is no specific limit on the number of environment variables. However, the size of the associated data structure - which includes the variables' names, values, and protected flag values - cannot exceed 20 KB. This limit should accommodate most if not all use cases. Exceeding it will cause an exception with the message, \"Environment: is too large (maximum is 20 KB).\"

\n \n

If you have specified one or more environment variables, you cannot modify the stack's Chef version.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UpdateElasticIp": { @@ -8176,6 +8732,9 @@ "smithy.api#documentation": "

The new name.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UpdateInstance": { @@ -8274,6 +8833,9 @@ "smithy.api#documentation": "

The default AWS OpsWorks Stacks agent version. You have the following options:

\n
    \n
  • \n

    \n INHERIT - Use the stack's default agent version setting.

    \n
  • \n
  • \n

    \n version_number - Use the specified agent version.\n This value overrides the stack's default setting.\n To update the agent version, you must edit the instance configuration and specify a\n new version.\n AWS OpsWorks Stacks then automatically installs that version on the instance.

    \n
  • \n
\n

The default setting is INHERIT. To specify an agent version,\n you must use the complete version number, not the abbreviated number shown on the console.\n For a list of available agent version numbers, call DescribeAgentVersions.

\n

AgentVersion cannot be set to Chef 12.2.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UpdateLayer": { @@ -8402,6 +8964,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UpdateMyUserProfile": { @@ -8430,6 +8995,9 @@ "smithy.api#documentation": "

The user's SSH public key.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UpdateRdsDbInstance": { @@ -8474,6 +9042,9 @@ "smithy.api#documentation": "

The database password.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UpdateStack": { @@ -8608,6 +9179,9 @@ "smithy.api#documentation": "

The default AWS OpsWorks Stacks agent version. You have the following options:

\n
    \n
  • \n

    Auto-update - Set this parameter to LATEST. AWS OpsWorks Stacks\n automatically installs new agent versions on the stack's instances as soon as\n they are available.

    \n
  • \n
  • \n

    Fixed version - Set this parameter to your preferred agent version. To update the agent version, you must edit the stack configuration and specify a new version. AWS OpsWorks Stacks then automatically installs that version on the stack's instances.

    \n
  • \n
\n

The default setting is LATEST. To specify an agent version,\n you must use the complete version number, not the abbreviated number shown on the console.\n For a list of available agent version numbers, call DescribeAgentVersions. \n AgentVersion cannot be set to Chef 12.2.

\n \n

You can also specify an agent version when you create or update an instance, which overrides the stack's default setting.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UpdateUserProfile": { @@ -8658,6 +9232,9 @@ "smithy.api#documentation": "

Whether users can specify their own SSH public key through the My Settings page. For more\n information, see Managing User\n Permissions.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UpdateVolume": { @@ -8702,6 +9279,9 @@ "smithy.api#documentation": "

The new mount point.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworks#UserProfile": { @@ -8773,18 +9353,20 @@ } }, "com.amazonaws.opsworks#VirtualizationType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "paravirtual", - "name": "paravirtual" - }, - { - "value": "hvm", - "name": "hvm" + "type": "enum", + "members": { + "paravirtual": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "paravirtual" } - ] + }, + "hvm": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hvm" + } + } } }, "com.amazonaws.opsworks#Volume": { @@ -8939,22 +9521,26 @@ } }, "com.amazonaws.opsworks#VolumeType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "gp2", - "name": "gp2" - }, - { - "value": "io1", - "name": "io1" - }, - { - "value": "standard", - "name": "standard" + "type": "enum", + "members": { + "gp2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gp2" + } + }, + "io1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "io1" } - ] + }, + "standard": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "standard" + } + } } }, "com.amazonaws.opsworks#Volumes": { diff --git a/codegen/sdk-codegen/aws-models/opsworkscm.json b/codegen/sdk-codegen/aws-models/opsworkscm.json index 2db2e37eec8..33c41f2a3d6 100644 --- a/codegen/sdk-codegen/aws-models/opsworkscm.json +++ b/codegen/sdk-codegen/aws-models/opsworkscm.json @@ -32,7 +32,7 @@ "com.amazonaws.opsworkscm#AWSOpsWorksCMResourceArn": { "type": "string", "traits": { - "smithy.api#pattern": "arn:aws.*:opsworks-cm:.*:[0-9]{12}:.*" + "smithy.api#pattern": "^arn:aws.*:opsworks-cm:.*:[0-9]{12}:" } }, "com.amazonaws.opsworkscm#AccountAttribute": { @@ -117,6 +117,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#AssociateNodeResponse": { @@ -128,6 +131,9 @@ "smithy.api#documentation": "

Contains a token which can be passed to the DescribeNodeAssociationStatus API call to get the status of the association request.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#AttributeName": { @@ -137,7 +143,7 @@ "min": 1, "max": 64 }, - "smithy.api#pattern": "[A-Z][A-Z0-9_]*" + "smithy.api#pattern": "^[A-Z][A-Z0-9_]*$" } }, "com.amazonaws.opsworkscm#AttributeValue": { @@ -147,7 +153,7 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "(?s).*" + "smithy.api#pattern": "^(?s)" } }, "com.amazonaws.opsworkscm#Backup": { @@ -311,7 +317,7 @@ "min": 0, "max": 79 }, - "smithy.api#pattern": "[a-zA-Z][a-zA-Z0-9\\-\\.\\:]*" + "smithy.api#pattern": "^[a-zA-Z][a-zA-Z0-9\\-\\.\\:]*$" } }, "com.amazonaws.opsworkscm#BackupRetentionCountDefinition": { @@ -323,41 +329,49 @@ } }, "com.amazonaws.opsworkscm#BackupStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "OK", - "name": "OK" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "DELETING", - "name": "DELETING" + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" } - ] + }, + "OK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OK" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + } } }, "com.amazonaws.opsworkscm#BackupType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AUTOMATED", - "name": "AUTOMATED" - }, - { - "value": "MANUAL", - "name": "MANUAL" + "type": "enum", + "members": { + "AUTOMATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUTOMATED" + } + }, + "MANUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MANUAL" } - ] + } } }, "com.amazonaws.opsworkscm#Backups": { @@ -417,6 +431,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values to attach to an AWS OpsWorks-CM server backup.

\n
    \n
  • \n

    The key cannot be empty.

    \n
  • \n
  • \n

    The key can be a maximum of 127 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /\n

    \n
  • \n
  • \n

    The value can be a maximum 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /\n

    \n
  • \n
  • \n

    Leading and trailing white spaces are trimmed from both the key and value.

    \n
  • \n
  • \n

    A maximum of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM resources.

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#CreateBackupResponse": { @@ -428,6 +445,9 @@ "smithy.api#documentation": "

Backup created by request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#CreateServer": { @@ -590,6 +610,9 @@ "smithy.api#documentation": "

\n If you specify this field, AWS OpsWorks CM creates the server by using the backup represented by BackupId.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#CreateServerResponse": { @@ -601,6 +624,9 @@ "smithy.api#documentation": "

The server that is created by the request.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#CustomCertificate": { @@ -610,7 +636,7 @@ "min": 0, "max": 2097152 }, - "smithy.api#pattern": "(?s)\\s*-----BEGIN CERTIFICATE-----.+-----END CERTIFICATE-----\\s*" + "smithy.api#pattern": "^(?s)\\s*-----BEGIN CERTIFICATE-----.+-----END CERTIFICATE-----\\s*$" } }, "com.amazonaws.opsworkscm#CustomDomain": { @@ -630,7 +656,7 @@ "min": 0, "max": 4096 }, - "smithy.api#pattern": "(?ms)\\s*^-----BEGIN (?-s:.*)PRIVATE KEY-----$.*?^-----END (?-s:.*)PRIVATE KEY-----$\\s*", + "smithy.api#pattern": "^(?ms)\\s*^-----BEGIN (?-s:.*)PRIVATE KEY-----$.*?^-----END (?-s:.*)PRIVATE KEY-----$\\s*$", "smithy.api#sensitive": {} } }, @@ -667,11 +693,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#DeleteBackupResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.opsworkscm#DeleteServer": { "type": "operation", @@ -706,11 +738,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#DeleteServerResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.opsworkscm#DescribeAccountAttributes": { "type": "operation", @@ -726,7 +764,10 @@ }, "com.amazonaws.opsworkscm#DescribeAccountAttributesRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.opsworkscm#DescribeAccountAttributesResponse": { "type": "structure", @@ -737,6 +778,9 @@ "smithy.api#documentation": "

\n The attributes that are currently set for the account.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#DescribeBackups": { @@ -795,6 +839,9 @@ "smithy.api#documentation": "

This is not currently implemented for DescribeBackups requests.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#DescribeBackupsResponse": { @@ -812,6 +859,9 @@ "smithy.api#documentation": "

This is not currently implemented for DescribeBackups requests.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#DescribeEvents": { @@ -865,6 +915,9 @@ "smithy.api#documentation": "

To receive a paginated response, use this parameter to specify the maximum number\n of results to be returned with a single call. If the number of available results exceeds\n this maximum, the response includes a NextToken value that you can assign to the NextToken\n request parameter to get the next set of results.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#DescribeEventsResponse": { @@ -882,6 +935,9 @@ "smithy.api#documentation": "

NextToken is a string that is returned in some command responses. It indicates that\n not all entries have been returned, and that you must run at least one more request to get remaining\n items. To get remaining results, call DescribeEvents again, and assign the token from the previous\n results as the value of the nextToken parameter. If there are no more results,\n the response object's nextToken parameter value is null.\n Setting a nextToken value that was not returned in\n your previous results causes an InvalidNextTokenException to occur.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#DescribeNodeAssociationStatus": { @@ -949,6 +1005,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#DescribeNodeAssociationStatusResponse": { @@ -966,6 +1025,9 @@ "smithy.api#documentation": "

Attributes specific to the node association. \n In Puppet, the attibute PUPPET_NODE_CERT contains the signed certificate (the result of the CSR).\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#DescribeServers": { @@ -1018,6 +1080,9 @@ "smithy.api#documentation": "

This is not currently implemented for DescribeServers requests.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#DescribeServersResponse": { @@ -1035,6 +1100,9 @@ "smithy.api#documentation": "

This is not currently implemented for DescribeServers requests.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#DisassociateNode": { @@ -1083,6 +1151,9 @@ "smithy.api#documentation": "

Engine attributes that are used for disassociating the node. No attributes are required for Puppet.\n

\n

\n Attributes required in a DisassociateNode request for Chef\n

\n
    \n
  • \n

    \n CHEF_ORGANIZATION: The Chef organization\n with which the node was associated. By default only one organization\n named default can exist.\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#DisassociateNodeResponse": { @@ -1094,6 +1165,9 @@ "smithy.api#documentation": "

Contains a token which can be passed to the\n DescribeNodeAssociationStatus API call to get the status of\n the disassociation request.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#EngineAttribute": { @@ -1123,7 +1197,7 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "(?s).*" + "smithy.api#pattern": "^(?s)" } }, "com.amazonaws.opsworkscm#EngineAttributeValue": { @@ -1133,7 +1207,7 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "(?s).*", + "smithy.api#pattern": "^(?s)", "smithy.api#sensitive": {} } }, @@ -1189,6 +1263,9 @@ "smithy.api#documentation": "

The list of engine attributes. The list type is EngineAttribute. An EngineAttribute list item \n is a pair that includes an attribute name and its value. For the Userdata ExportAttributeName, the following are \n supported engine attribute names.

\n
    \n
  • \n

    \n RunList In Chef, a list of roles or recipes that are run in the specified order. \n In Puppet, this parameter is ignored.

    \n
  • \n
  • \n

    \n OrganizationName In Chef, an organization name. AWS OpsWorks for Chef Automate \n always creates the organization default. In Puppet, this parameter is ignored.

    \n
  • \n
  • \n

    \n NodeEnvironment In Chef, a node environment (for example, development, staging, or one-box). \n In Puppet, this parameter is ignored.

    \n
  • \n
  • \n

    \n NodeClientVersion In Chef, the version of the Chef engine (three numbers separated \n by dots, such as 13.8.5). If this attribute is empty, OpsWorks for Chef Automate uses the most current version. In Puppet, \n this parameter is ignored.

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#ExportServerEngineAttributeResponse": { @@ -1206,6 +1283,9 @@ "smithy.api#documentation": "

The server name used in the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#InstanceProfileArn": { @@ -1215,7 +1295,7 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "arn:aws:iam::[0-9]{12}:instance-profile/.*" + "smithy.api#pattern": "^arn:aws:iam::[0-9]{12}:instance-profile/" } }, "com.amazonaws.opsworkscm#Integer": { @@ -1324,6 +1404,9 @@ "smithy.api#documentation": "

To receive a paginated response, use this parameter to specify the maximum number\n of results to be returned with a single call. If the number of available results exceeds\n this maximum, the response includes a NextToken value that you can assign to the NextToken\n request parameter to get the next set of results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#ListTagsForResourceResponse": { @@ -1341,21 +1424,26 @@ "smithy.api#documentation": "

A token that you can use as the value of NextToken in subsequent calls to the API to show more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#MaintenanceStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUCCESS", - "name": "SUCCESS" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + } } }, "com.amazonaws.opsworkscm#MaxResults": { @@ -1373,27 +1461,33 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "(?s).*" + "smithy.api#pattern": "^(?s)" } }, "com.amazonaws.opsworkscm#NodeAssociationStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The status of the association or disassociation request.\n

\n

\n Possible values:\n

\n
    \n
  • \n

    \n SUCCESS: The association or disassociation succeeded.\n

    \n
  • \n
  • \n

    \n FAILED: The association or disassociation failed.\n

    \n
  • \n
  • \n

    \n IN_PROGRESS: The association or disassociation is still in progress.\n

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "SUCCESS", - "name": "SUCCESS" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" + "type": "enum", + "members": { + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" } - ] + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + } + }, + "traits": { + "smithy.api#documentation": "

The status of the association or disassociation request.\n

\n

\n Possible values:\n

\n
    \n
  • \n

    \n SUCCESS: The association or disassociation succeeded.\n

    \n
  • \n
  • \n

    \n FAILED: The association or disassociation failed.\n

    \n
  • \n
  • \n

    \n IN_PROGRESS: The association or disassociation is still in progress.\n

    \n
  • \n
" } }, "com.amazonaws.opsworkscm#NodeAssociationStatusToken": { @@ -1403,7 +1497,7 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "(?s).*" + "smithy.api#pattern": "^(?s)" } }, "com.amazonaws.opsworkscm#NodeName": { @@ -1556,52 +1650,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1609,13 +1707,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1625,224 +1732,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://opsworks-cm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://opsworks-cm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://opsworks-cm-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://opsworks-cm-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://opsworks-cm.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://opsworks-cm.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://opsworks-cm.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://opsworks-cm.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1857,8 +1915,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1870,8 +1928,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1883,8 +1941,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1896,8 +1954,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1909,8 +1967,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1922,8 +1980,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1935,8 +1993,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1948,8 +2006,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1961,8 +2019,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1974,8 +2032,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1987,8 +2045,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2000,8 +2058,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2013,8 +2071,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2026,8 +2084,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2039,8 +2097,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2052,8 +2110,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2065,8 +2123,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2078,8 +2136,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2091,8 +2149,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2104,8 +2162,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2117,8 +2186,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2130,8 +2210,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2143,8 +2234,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2156,8 +2258,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2169,8 +2271,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2182,8 +2284,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2194,8 +2296,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2206,10 +2308,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2298,6 +2406,9 @@ "smithy.api#documentation": "

The name of the key pair to set on the new EC2 instance. This can be helpful\n if the administrator no longer has the SSH key.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#RestoreServerResponse": { @@ -2306,6 +2417,9 @@ "Server": { "target": "com.amazonaws.opsworkscm#Server" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#Server": { @@ -2505,66 +2619,90 @@ "min": 1, "max": 40 }, - "smithy.api#pattern": "[a-zA-Z][a-zA-Z0-9\\-]*" + "smithy.api#pattern": "^[a-zA-Z][a-zA-Z0-9\\-]*$" } }, "com.amazonaws.opsworkscm#ServerStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BACKING_UP", - "name": "BACKING_UP" - }, - { - "value": "CONNECTION_LOST", - "name": "CONNECTION_LOST" - }, - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "DELETING", - "name": "DELETING" - }, - { - "value": "MODIFYING", - "name": "MODIFYING" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "HEALTHY", - "name": "HEALTHY" - }, - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "RESTORING", - "name": "RESTORING" - }, - { - "value": "SETUP", - "name": "SETUP" - }, - { - "value": "UNDER_MAINTENANCE", - "name": "UNDER_MAINTENANCE" - }, - { - "value": "UNHEALTHY", - "name": "UNHEALTHY" - }, - { - "value": "TERMINATED", - "name": "TERMINATED" + "type": "enum", + "members": { + "BACKING_UP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BACKING_UP" } - ] + }, + "CONNECTION_LOST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONNECTION_LOST" + } + }, + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "MODIFYING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MODIFYING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "HEALTHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HEALTHY" + } + }, + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "RESTORING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESTORING" + } + }, + "SETUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SETUP" + } + }, + "UNDER_MAINTENANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNDER_MAINTENANCE" + } + }, + "UNHEALTHY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNHEALTHY" + } + }, + "TERMINATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TERMINATED" + } + } } }, "com.amazonaws.opsworkscm#Servers": { @@ -2580,7 +2718,7 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "arn:aws:iam::[0-9]{12}:role/.*" + "smithy.api#pattern": "^arn:aws:iam::[0-9]{12}:role/" } }, "com.amazonaws.opsworkscm#StartMaintenance": { @@ -2622,6 +2760,9 @@ "smithy.api#documentation": "

Engine attributes that are specific to the server on which you want to run maintenance.

\n

\n Attributes accepted in a StartMaintenance request for Chef\n

\n " } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#StartMaintenanceResponse": { @@ -2633,6 +2774,9 @@ "smithy.api#documentation": "

Contains the response to a StartMaintenance request.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#String": { @@ -2642,7 +2786,7 @@ "min": 0, "max": 10000 }, - "smithy.api#pattern": "(?s).*" + "smithy.api#pattern": "^(?s)" } }, "com.amazonaws.opsworkscm#Strings": { @@ -2747,11 +2891,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.opsworkscm#TagValue": { "type": "string", @@ -2817,11 +2967,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.opsworkscm#UpdateServer": { "type": "operation", @@ -2892,6 +3048,9 @@ "smithy.api#documentation": "

The value to set for the attribute.\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#UpdateServerEngineAttributesResponse": { @@ -2903,6 +3062,9 @@ "smithy.api#documentation": "

Contains the response to an UpdateServerEngineAttributes request.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#UpdateServerRequest": { @@ -2933,6 +3095,9 @@ "PreferredBackupWindow": { "target": "com.amazonaws.opsworkscm#TimeWindowDefinition" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.opsworkscm#UpdateServerResponse": { @@ -2944,6 +3109,9 @@ "smithy.api#documentation": "

Contains the response to a UpdateServer request.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.opsworkscm#ValidationException": { diff --git a/codegen/sdk-codegen/aws-models/osis.json b/codegen/sdk-codegen/aws-models/osis.json index 75a5765211c..750f34814f6 100644 --- a/codegen/sdk-codegen/aws-models/osis.json +++ b/codegen/sdk-codegen/aws-models/osis.json @@ -459,55 +459,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://osis-fips.us-gov-east-1.api.aws" + "url": "https://osis-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, - "Region": "us-gov-east-1", - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://osis-fips.us-gov-east-1.amazonaws.com" + "url": "https://osis-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-gov-east-1", - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://osis.us-gov-east-1.api.aws" + "url": "https://osis.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, - "Region": "us-gov-east-1", - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://osis.us-gov-east-1.amazonaws.com" + "url": "https://osis.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-gov-east-1", - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -518,9 +518,9 @@ } }, "params": { - "UseDualStack": true, "Region": "cn-north-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -531,9 +531,9 @@ } }, "params": { - "UseDualStack": false, "Region": "cn-north-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -544,9 +544,9 @@ } }, "params": { - "UseDualStack": true, "Region": "cn-north-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -557,109 +557,109 @@ } }, "params": { - "UseDualStack": false, "Region": "cn-north-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://osis-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, - "Region": "us-iso-east-1", - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://osis-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://osis-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-iso-east-1", - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://osis.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, - "Region": "us-iso-east-1", - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://osis.us-iso-east-1.c2s.ic.gov" + "url": "https://osis.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-iso-east-1", - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://osis-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, - "Region": "us-east-1", - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://osis-fips.us-east-1.amazonaws.com" + "url": "https://osis-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, - "Region": "us-east-1", - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://osis.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, - "Region": "us-east-1", - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://osis.us-east-1.amazonaws.com" + "url": "https://osis.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, - "Region": "us-east-1", - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -668,9 +668,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, "Region": "us-isob-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -681,9 +681,9 @@ } }, "params": { - "UseDualStack": false, "Region": "us-isob-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -692,9 +692,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, "Region": "us-isob-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -705,22 +705,35 @@ } }, "params": { - "UseDualStack": false, "Region": "us-isob-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseDualStack": false, "Region": "us-east-1", "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -730,9 +743,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, "Region": "us-east-1", "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -742,11 +755,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, "Region": "us-east-1", "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/outposts.json b/codegen/sdk-codegen/aws-models/outposts.json index d9a8e4662f3..cbfac2153db 100644 --- a/codegen/sdk-codegen/aws-models/outposts.json +++ b/codegen/sdk-codegen/aws-models/outposts.json @@ -3080,52 +3080,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3133,13 +3137,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3149,92 +3162,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://outposts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://outposts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -3243,155 +3247,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://outposts.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://outposts-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://outposts.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://outposts-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://outposts.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://outposts.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://outposts.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://outposts.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/panorama.json b/codegen/sdk-codegen/aws-models/panorama.json index 19c1e1b6216..8715320d872 100644 --- a/codegen/sdk-codegen/aws-models/panorama.json +++ b/codegen/sdk-codegen/aws-models/panorama.json @@ -4618,52 +4618,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -4671,13 +4675,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -4687,224 +4700,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://panorama-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://panorama-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://panorama-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://panorama-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://panorama.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://panorama.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://panorama.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://panorama.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -4919,8 +4883,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4932,8 +4896,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4945,8 +4909,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4958,8 +4922,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4971,8 +4935,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4984,8 +4948,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4997,8 +4961,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -5010,8 +4974,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -5023,8 +4987,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -5036,8 +5000,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -5049,8 +5013,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -5062,8 +5026,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -5075,8 +5050,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -5088,8 +5074,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -5101,8 +5098,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -5114,8 +5122,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -5127,8 +5135,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -5140,8 +5148,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -5152,8 +5160,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -5164,10 +5172,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -6629,4 +6643,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/payment-cryptography.json b/codegen/sdk-codegen/aws-models/payment-cryptography.json index 2ca3c2dded2..2123d20e8b4 100644 --- a/codegen/sdk-codegen/aws-models/payment-cryptography.json +++ b/codegen/sdk-codegen/aws-models/payment-cryptography.json @@ -2397,54 +2397,54 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://controlplane.payment-cryptography-fips.us-gov-east-1.api.aws" + "url": "https://controlplane.payment-cryptography-fips.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://controlplane.payment-cryptography-fips.us-gov-east-1.amazonaws.com" + "url": "https://controlplane.payment-cryptography-fips.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://controlplane.payment-cryptography.us-gov-east-1.api.aws" + "url": "https://controlplane.payment-cryptography.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://controlplane.payment-cryptography.us-gov-east-1.amazonaws.com" + "url": "https://controlplane.payment-cryptography.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": false } }, @@ -2456,8 +2456,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -2469,8 +2469,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -2482,8 +2482,8 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -2495,108 +2495,108 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://controlplane.payment-cryptography-fips.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://controlplane.payment-cryptography-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://controlplane.payment-cryptography-fips.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://controlplane.payment-cryptography.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://controlplane.payment-cryptography.us-iso-east-1.c2s.ic.gov" + "url": "https://controlplane.payment-cryptography.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://controlplane.payment-cryptography-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://controlplane.payment-cryptography-fips.us-east-1.amazonaws.com" + "url": "https://controlplane.payment-cryptography-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://controlplane.payment-cryptography.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://controlplane.payment-cryptography.us-east-1.amazonaws.com" + "url": "https://controlplane.payment-cryptography.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": false } }, @@ -2606,8 +2606,8 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -2619,8 +2619,8 @@ } }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -2630,8 +2630,8 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -2643,21 +2643,34 @@ } }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -2668,8 +2681,8 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -2680,11 +2693,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/personalize-events.json b/codegen/sdk-codegen/aws-models/personalize-events.json index 0e5636d85ba..52857554b61 100644 --- a/codegen/sdk-codegen/aws-models/personalize-events.json +++ b/codegen/sdk-codegen/aws-models/personalize-events.json @@ -117,52 +117,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -170,13 +174,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -186,224 +199,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://personalize-events-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://personalize-events-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://personalize-events-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://personalize-events-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://personalize-events.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://personalize-events.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://personalize-events.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://personalize-events.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -418,8 +382,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -431,8 +395,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -444,8 +408,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -457,8 +421,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -470,8 +434,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -483,8 +447,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -496,8 +460,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -509,8 +473,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -522,8 +486,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -535,8 +499,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -548,8 +512,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -561,8 +525,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -574,8 +549,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -587,8 +573,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -600,8 +597,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -613,8 +621,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -626,8 +634,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -639,8 +647,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -651,8 +659,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -663,10 +671,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -720,7 +734,7 @@ "properties": { "target": "com.amazonaws.personalizeevents#SynthesizedJsonEventPropertiesJSON", "traits": { - "smithy.api#documentation": "

A string map of event-specific data that you might choose to record. For example, if a\n user rates a movie on your site, other than movie ID (itemId) and rating (eventValue)\n , you might also send the number of movie ratings made by the user.

\n

Each item in the map consists of a key-value pair. For example,

\n \n

\n {\"numberOfRatings\": \"12\"}\n

\n

The keys use camel case names that match the fields in the Interactions\n schema. In the above example, the numberOfRatings would match the\n 'NUMBER_OF_RATINGS' field defined in the Interactions schema.

" + "smithy.api#documentation": "

A string map of event-specific data that you might choose to record. For example, if a\n user rates a movie on your site, other than movie ID (itemId) and rating (eventValue)\n , you might also send the number of movie ratings made by the user.

\n

Each item in the map consists of a key-value pair. For example,

\n

\n {\"numberOfRatings\": \"12\"}\n

\n

The keys use camel case names that match the fields in the Interactions\n schema. In the above example, the numberOfRatings would match the\n 'NUMBER_OF_RATINGS' field defined in the Interactions schema.

" } }, "sentAt": { @@ -914,6 +928,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.personalizeevents#PutItems": { @@ -961,6 +978,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.personalizeevents#PutUsers": { @@ -1008,6 +1028,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.personalizeevents#RecommendationId": { diff --git a/codegen/sdk-codegen/aws-models/personalize-runtime.json b/codegen/sdk-codegen/aws-models/personalize-runtime.json index 4c60e103a1c..57e5370694c 100644 --- a/codegen/sdk-codegen/aws-models/personalize-runtime.json +++ b/codegen/sdk-codegen/aws-models/personalize-runtime.json @@ -114,52 +114,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -167,13 +171,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -183,224 +196,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://personalize-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://personalize-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://personalize-runtime-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://personalize-runtime-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://personalize-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://personalize-runtime.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://personalize-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://personalize-runtime.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -415,8 +379,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -428,8 +392,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -441,8 +405,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -454,8 +418,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -467,8 +431,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -480,8 +444,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -493,8 +457,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -506,8 +470,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -519,8 +483,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -532,8 +496,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -545,8 +509,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -558,8 +522,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -571,8 +546,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -584,8 +570,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -597,8 +594,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -610,8 +618,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -623,8 +631,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -636,8 +644,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -648,8 +656,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -660,10 +668,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -818,9 +832,12 @@ "filterValues": { "target": "com.amazonaws.personalizeruntime#FilterValues", "traits": { - "smithy.api#documentation": "

The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case)\n as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.\n

\n

For filter expressions that use an INCLUDE element to include items,\n you must provide values for all parameters that are defined in the expression. For\n filters with expressions that use an EXCLUDE element to exclude items, you\n can omit the filter-values.In this case, Amazon Personalize doesn't use that portion of\n the expression to filter recommendations.

\n

For more information, see\n Filtering Recommendations.

" + "smithy.api#documentation": "

The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case)\n as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.\n

\n

For filter expressions that use an INCLUDE element to include items,\n you must provide values for all parameters that are defined in the expression. For\n filters with expressions that use an EXCLUDE element to exclude items, you\n can omit the filter-values.In this case, Amazon Personalize doesn't use that portion of\n the expression to filter recommendations.

\n

For more information, see\n Filtering Recommendations.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.personalizeruntime#GetPersonalizedRankingResponse": { @@ -838,6 +855,9 @@ "smithy.api#documentation": "

The ID of the recommendation.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.personalizeruntime#GetRecommendations": { @@ -909,7 +929,7 @@ "filterValues": { "target": "com.amazonaws.personalizeruntime#FilterValues", "traits": { - "smithy.api#documentation": "

The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case)\n as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.\n

\n

For filter expressions that use an INCLUDE element to include items,\n you must provide values for all parameters that are defined in the expression. For\n filters with expressions that use an EXCLUDE element to exclude items, you\n can omit the filter-values.In this case, Amazon Personalize doesn't use that portion of\n the expression to filter recommendations.

\n

For more information, see\n Filtering recommendations and user segments.

" + "smithy.api#documentation": "

The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case)\n as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.\n

\n

For filter expressions that use an INCLUDE element to include items,\n you must provide values for all parameters that are defined in the expression. For\n filters with expressions that use an EXCLUDE element to exclude items, you\n can omit the filter-values.In this case, Amazon Personalize doesn't use that portion of\n the expression to filter recommendations.

\n

For more information, see\n Filtering recommendations and user segments.

" } }, "recommenderArn": { @@ -924,6 +944,9 @@ "smithy.api#documentation": "

The promotions to apply to the recommendation request. \n A promotion defines additional business rules that apply to a configurable subset of recommended items.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.personalizeruntime#GetRecommendationsResponse": { @@ -941,6 +964,9 @@ "smithy.api#documentation": "

The ID of the recommendation.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.personalizeruntime#InputList": { diff --git a/codegen/sdk-codegen/aws-models/personalize.json b/codegen/sdk-codegen/aws-models/personalize.json index a1c62d3218b..c6b9840b2cb 100644 --- a/codegen/sdk-codegen/aws-models/personalize.json +++ b/codegen/sdk-codegen/aws-models/personalize.json @@ -407,52 +407,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -460,13 +464,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -476,224 +489,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://personalize-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://personalize-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://personalize-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://personalize-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://personalize.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://personalize.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://personalize.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://personalize.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/pinpoint-email.json b/codegen/sdk-codegen/aws-models/pinpoint-email.json index 92121e00083..a4d3c61d698 100644 --- a/codegen/sdk-codegen/aws-models/pinpoint-email.json +++ b/codegen/sdk-codegen/aws-models/pinpoint-email.json @@ -260,52 +260,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -313,13 +317,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -329,224 +342,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://email-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://email-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://email.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://email.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://email.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://email.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -561,8 +525,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -574,8 +538,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -587,8 +551,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -600,8 +564,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -613,8 +577,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -626,8 +590,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -639,8 +603,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -652,8 +616,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -665,8 +629,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -678,8 +642,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -691,8 +655,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -704,8 +668,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -717,8 +681,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -730,8 +694,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -743,8 +707,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -756,8 +720,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -769,8 +733,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -782,8 +746,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -795,8 +759,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -808,8 +772,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -821,8 +785,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -834,8 +798,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -847,8 +811,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -860,8 +824,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -873,8 +837,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -886,8 +850,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -899,8 +863,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -912,8 +876,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -925,8 +889,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -938,8 +902,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -951,8 +915,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -964,8 +928,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -977,8 +941,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -990,8 +954,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1003,8 +978,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1016,8 +1002,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1029,8 +1026,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1042,8 +1050,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1055,8 +1063,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1068,8 +1076,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1080,8 +1088,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1092,10 +1100,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1119,19 +1133,23 @@ } }, "com.amazonaws.pinpointemail#BehaviorOnMxFailure": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The action that you want Amazon Pinpoint to take if it can't read the required MX record for a\n custom MAIL FROM domain. When you set this value to UseDefaultValue, Amazon Pinpoint\n uses amazonses.com as the MAIL FROM domain. When you set this value\n to RejectMessage, Amazon Pinpoint returns a MailFromDomainNotVerified\n error, and doesn't attempt to deliver the email.

\n

These behaviors are taken when the custom MAIL FROM domain configuration is in the\n Pending, Failed, and TemporaryFailure\n states.

", - "smithy.api#enum": [ - { - "value": "USE_DEFAULT_VALUE", - "name": "USE_DEFAULT_VALUE" - }, - { - "value": "REJECT_MESSAGE", - "name": "REJECT_MESSAGE" + "type": "enum", + "members": { + "USE_DEFAULT_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "USE_DEFAULT_VALUE" } - ] + }, + "REJECT_MESSAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REJECT_MESSAGE" + } + } + }, + "traits": { + "smithy.api#documentation": "

The action that you want Amazon Pinpoint to take if it can't read the required MX record for a\n custom MAIL FROM domain. When you set this value to UseDefaultValue, Amazon Pinpoint\n uses amazonses.com as the MAIL FROM domain. When you set this value\n to RejectMessage, Amazon Pinpoint returns a MailFromDomainNotVerified\n error, and doesn't attempt to deliver the email.

\n

These behaviors are taken when the custom MAIL FROM domain configuration is in the\n Pending, Failed, and TemporaryFailure\n states.

" } }, "com.amazonaws.pinpointemail#BlacklistEntries": { @@ -1413,14 +1431,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to add an event destination to a configuration set.

" + "smithy.api#documentation": "

A request to add an event destination to a configuration set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#CreateConfigurationSetEventDestinationResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#CreateConfigurationSetRequest": { @@ -1465,14 +1485,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to create a configuration set.

" + "smithy.api#documentation": "

A request to create a configuration set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#CreateConfigurationSetResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#CreateDedicatedIpPool": { @@ -1527,14 +1549,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to create a new dedicated IP pool.

" + "smithy.api#documentation": "

A request to create a new dedicated IP pool.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#CreateDedicatedIpPoolResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#CreateDeliverabilityTestReport": { @@ -1614,7 +1638,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to perform a predictive inbox placement test. Predictive inbox placement tests can help you predict how your messages will\n be handled by various email providers around the world. When you perform a predictive inbox placement test, you\n provide a sample message that contains the content that you plan to send to your\n customers. Amazon Pinpoint then sends that message to special email addresses spread across\n several major email providers. After about 24 hours, the test is complete, and you can\n use the GetDeliverabilityTestReport operation to view the results of the\n test.

" + "smithy.api#documentation": "

A request to perform a predictive inbox placement test. Predictive inbox placement tests can help you predict how your messages will\n be handled by various email providers around the world. When you perform a predictive inbox placement test, you\n provide a sample message that contains the content that you plan to send to your\n customers. Amazon Pinpoint then sends that message to special email addresses spread across\n several major email providers. After about 24 hours, the test is complete, and you can\n use the GetDeliverabilityTestReport operation to view the results of the\n test.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#CreateDeliverabilityTestReportResponse": { @@ -1636,7 +1661,8 @@ } }, "traits": { - "smithy.api#documentation": "

Information about the predictive inbox placement test that you created.

" + "smithy.api#documentation": "

Information about the predictive inbox placement test that you created.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#CreateEmailIdentity": { @@ -1688,7 +1714,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to begin the verification process for an email identity (an email address or\n domain).

" + "smithy.api#documentation": "

A request to begin the verification process for an email identity (an email address or\n domain).

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#CreateEmailIdentityResponse": { @@ -1715,7 +1742,8 @@ } }, "traits": { - "smithy.api#documentation": "

If the email identity is a domain, this object contains tokens that you can use to\n create a set of CNAME records. To sucessfully verify your domain, you have to add these\n records to the DNS configuration for your domain.

\n

If the email identity is an email address, this object is empty.

" + "smithy.api#documentation": "

If the email identity is a domain, this object contains tokens that you can use to\n create a set of CNAME records. To sucessfully verify your domain, you have to add these\n records to the DNS configuration for your domain.

\n

If the email identity is an email address, this object is empty.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#CustomRedirectDomain": { @@ -1886,14 +1914,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to delete an event destination from a configuration set.

" + "smithy.api#documentation": "

A request to delete an event destination from a configuration set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#DeleteConfigurationSetEventDestinationResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#DeleteConfigurationSetRequest": { @@ -1909,14 +1939,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to delete a configuration set.

" + "smithy.api#documentation": "

A request to delete a configuration set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#DeleteConfigurationSetResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#DeleteDedicatedIpPool": { @@ -1963,14 +1995,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to delete a dedicated IP pool.

" + "smithy.api#documentation": "

A request to delete a dedicated IP pool.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#DeleteDedicatedIpPoolResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#DeleteEmailIdentity": { @@ -2017,34 +2051,42 @@ } }, "traits": { - "smithy.api#documentation": "

A request to delete an existing email identity. When you delete an identity, you lose\n the ability to use Amazon Pinpoint to send email from that identity. You can restore your ability\n to send email by completing the verification process for the identity again.

" + "smithy.api#documentation": "

A request to delete an existing email identity. When you delete an identity, you lose\n the ability to use Amazon Pinpoint to send email from that identity. You can restore your ability\n to send email by completing the verification process for the identity again.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#DeleteEmailIdentityResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#DeliverabilityDashboardAccountStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The current status of your Deliverability dashboard subscription. If this value is\n PENDING_EXPIRATION, your subscription is scheduled to expire at the end\n of the current calendar month.

", - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "PENDING_EXPIRATION", - "name": "PENDING_EXPIRATION" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" } - ] + }, + "PENDING_EXPIRATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_EXPIRATION" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + }, + "traits": { + "smithy.api#documentation": "

The current status of your Deliverability dashboard subscription. If this value is\n PENDING_EXPIRATION, your subscription is scheduled to expire at the end\n of the current calendar month.

" } }, "com.amazonaws.pinpointemail#DeliverabilityTestReport": { @@ -2098,19 +2140,23 @@ } }, "com.amazonaws.pinpointemail#DeliverabilityTestStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The status of a predictive inbox placement test. If the status is IN_PROGRESS, then the predictive inbox placement test is\n currently running. Predictive inbox placement tests are usually complete within 24 hours of creating the test.\n If the status is COMPLETE, then the test is finished, and you can use the\n GetDeliverabilityTestReport operation to view the results of the\n test.

", - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "COMPLETED", - "name": "COMPLETED" + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" } - ] + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + } + }, + "traits": { + "smithy.api#documentation": "

The status of a predictive inbox placement test. If the status is IN_PROGRESS, then the predictive inbox placement test is\n currently running. Predictive inbox placement tests are usually complete within 24 hours of creating the test.\n If the status is COMPLETE, then the test is finished, and you can use the\n GetDeliverabilityTestReport operation to view the results of the\n test.

" } }, "com.amazonaws.pinpointemail#DeliverabilityTestSubject": { @@ -2172,23 +2218,29 @@ } }, "com.amazonaws.pinpointemail#DimensionValueSource": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The location where Amazon Pinpoint finds the value of a dimension to publish to Amazon CloudWatch. If you\n want Amazon Pinpoint to use the message tags that you specify using an X-SES-MESSAGE-TAGS header\n or a parameter to the SendEmail/SendRawEmail API, choose messageTag. If you\n want Amazon Pinpoint to use your own email headers, choose emailHeader. If you want\n Amazon Pinpoint to use link tags, choose linkTags.

", - "smithy.api#enum": [ - { - "value": "MESSAGE_TAG", - "name": "MESSAGE_TAG" - }, - { - "value": "EMAIL_HEADER", - "name": "EMAIL_HEADER" - }, - { - "value": "LINK_TAG", - "name": "LINK_TAG" + "type": "enum", + "members": { + "MESSAGE_TAG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MESSAGE_TAG" + } + }, + "EMAIL_HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EMAIL_HEADER" + } + }, + "LINK_TAG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LINK_TAG" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

The location where Amazon Pinpoint finds the value of a dimension to publish to Amazon CloudWatch. If you\n want Amazon Pinpoint to use the message tags that you specify using an X-SES-MESSAGE-TAGS header\n or a parameter to the SendEmail/SendRawEmail API, choose messageTag. If you\n want Amazon Pinpoint to use your own email headers, choose emailHeader. If you want\n Amazon Pinpoint to use link tags, choose linkTags.

" } }, "com.amazonaws.pinpointemail#DkimAttributes": { @@ -2219,31 +2271,41 @@ } }, "com.amazonaws.pinpointemail#DkimStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The DKIM authentication status of the identity. The status can be one of the\n following:

\n
    \n
  • \n

    \n PENDING – The DKIM verification process was initiated, and\n Amazon Pinpoint is still waiting for the required CNAME records to appear in the DNS\n configuration for the domain.

    \n
  • \n
  • \n

    \n SUCCESS – The DKIM authentication process completed\n successfully.

    \n
  • \n
  • \n

    \n FAILED – The DKIM authentication process failed. This can\n happen when Amazon Pinpoint fails to find the required CNAME records in the DNS\n configuration of the domain.

    \n
  • \n
  • \n

    \n TEMPORARY_FAILURE – A temporary issue is preventing Amazon Pinpoint\n from determining the DKIM authentication status of the domain.

    \n
  • \n
  • \n

    \n NOT_STARTED – The DKIM verification process hasn't been\n initiated for the domain.

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "PENDING" - }, - { - "value": "SUCCESS", - "name": "SUCCESS" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "TEMPORARY_FAILURE", - "name": "TEMPORARY_FAILURE" - }, - { - "value": "NOT_STARTED", - "name": "NOT_STARTED" + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "TEMPORARY_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEMPORARY_FAILURE" + } + }, + "NOT_STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_STARTED" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

The DKIM authentication status of the identity. The status can be one of the\n following:

\n
    \n
  • \n

    \n PENDING – The DKIM verification process was initiated, and\n Amazon Pinpoint is still waiting for the required CNAME records to appear in the DNS\n configuration for the domain.

    \n
  • \n
  • \n

    \n SUCCESS – The DKIM authentication process completed\n successfully.

    \n
  • \n
  • \n

    \n FAILED – The DKIM authentication process failed. This can\n happen when Amazon Pinpoint fails to find the required CNAME records in the DNS\n configuration of the domain.

    \n
  • \n
  • \n

    \n TEMPORARY_FAILURE – A temporary issue is preventing Amazon Pinpoint\n from determining the DKIM authentication status of the domain.

    \n
  • \n
  • \n

    \n NOT_STARTED – The DKIM verification process hasn't been\n initiated for the domain.

    \n
  • \n
" } }, "com.amazonaws.pinpointemail#DnsToken": { @@ -2602,43 +2664,59 @@ } }, "com.amazonaws.pinpointemail#EventType": { - "type": "string", - "traits": { - "smithy.api#documentation": "

An email sending event type. For example, email sends, opens, and bounces are all\n email events.

", - "smithy.api#enum": [ - { - "value": "SEND", - "name": "SEND" - }, - { - "value": "REJECT", - "name": "REJECT" - }, - { - "value": "BOUNCE", - "name": "BOUNCE" - }, - { - "value": "COMPLAINT", - "name": "COMPLAINT" - }, - { - "value": "DELIVERY", - "name": "DELIVERY" - }, - { - "value": "OPEN", - "name": "OPEN" - }, - { - "value": "CLICK", - "name": "CLICK" - }, - { - "value": "RENDERING_FAILURE", - "name": "RENDERING_FAILURE" + "type": "enum", + "members": { + "SEND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SEND" } - ] + }, + "REJECT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REJECT" + } + }, + "BOUNCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOUNCE" + } + }, + "COMPLAINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLAINT" + } + }, + "DELIVERY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELIVERY" + } + }, + "OPEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OPEN" + } + }, + "CLICK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLICK" + } + }, + "RENDERING_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RENDERING_FAILURE" + } + } + }, + "traits": { + "smithy.api#documentation": "

An email sending event type. For example, email sends, opens, and bounces are all\n email events.

" } }, "com.amazonaws.pinpointemail#EventTypes": { @@ -2679,7 +2757,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

A request to obtain information about the email-sending capabilities of your Amazon Pinpoint\n account.

" + "smithy.api#documentation": "

A request to obtain information about the email-sending capabilities of your Amazon Pinpoint\n account.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetAccountResponse": { @@ -2720,7 +2799,8 @@ } }, "traits": { - "smithy.api#documentation": "

A list of details about the email-sending capabilities of your Amazon Pinpoint account in the\n current AWS Region.

" + "smithy.api#documentation": "

A list of details about the email-sending capabilities of your Amazon Pinpoint account in the\n current AWS Region.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetBlacklistReports": { @@ -2764,7 +2844,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to retrieve a list of the blacklists that your dedicated IP addresses appear\n on.

" + "smithy.api#documentation": "

A request to retrieve a list of the blacklists that your dedicated IP addresses appear\n on.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetBlacklistReportsResponse": { @@ -2779,7 +2860,8 @@ } }, "traits": { - "smithy.api#documentation": "

An object that contains information about blacklist events.

" + "smithy.api#documentation": "

An object that contains information about blacklist events.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetConfigurationSet": { @@ -2851,7 +2933,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to obtain information about the event destinations for a configuration\n set.

" + "smithy.api#documentation": "

A request to obtain information about the event destinations for a configuration\n set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetConfigurationSetEventDestinationsResponse": { @@ -2865,7 +2948,8 @@ } }, "traits": { - "smithy.api#documentation": "

Information about an event destination for a configuration set.

" + "smithy.api#documentation": "

Information about an event destination for a configuration set.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetConfigurationSetRequest": { @@ -2881,7 +2965,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to obtain information about a configuration set.

" + "smithy.api#documentation": "

A request to obtain information about a configuration set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetConfigurationSetResponse": { @@ -2925,7 +3010,8 @@ } }, "traits": { - "smithy.api#documentation": "

Information about a configuration set.

" + "smithy.api#documentation": "

Information about a configuration set.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetDedicatedIp": { @@ -2969,7 +3055,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to obtain more information about a dedicated IP address.

" + "smithy.api#documentation": "

A request to obtain more information about a dedicated IP address.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetDedicatedIpResponse": { @@ -2983,7 +3070,8 @@ } }, "traits": { - "smithy.api#documentation": "

Information about a dedicated IP address.

" + "smithy.api#documentation": "

Information about a dedicated IP address.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetDedicatedIps": { @@ -3045,7 +3133,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to obtain more information about dedicated IP pools.

" + "smithy.api#documentation": "

A request to obtain more information about dedicated IP pools.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetDedicatedIpsResponse": { @@ -3065,7 +3154,8 @@ } }, "traits": { - "smithy.api#documentation": "

Information about the dedicated IP addresses that are associated with your Amazon Pinpoint\n account.

" + "smithy.api#documentation": "

Information about the dedicated IP addresses that are associated with your Amazon Pinpoint\n account.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetDeliverabilityDashboardOptions": { @@ -3100,7 +3190,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Retrieve information about the status of the Deliverability dashboard for your Amazon Pinpoint account.\n When the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and\n other metrics for the domains that you use to send email using Amazon Pinpoint. You also gain the\n ability to perform predictive inbox placement tests.

\n

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon Pinpoint. For more information about the\n features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

" + "smithy.api#documentation": "

Retrieve information about the status of the Deliverability dashboard for your Amazon Pinpoint account.\n When the Deliverability dashboard is enabled, you gain access to reputation, deliverability, and\n other metrics for the domains that you use to send email using Amazon Pinpoint. You also gain the\n ability to perform predictive inbox placement tests.

\n

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon Pinpoint. For more information about the\n features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetDeliverabilityDashboardOptionsResponse": { @@ -3140,7 +3231,8 @@ } }, "traits": { - "smithy.api#documentation": "

An object that shows the status of the Deliverability dashboard for your Amazon Pinpoint account.

" + "smithy.api#documentation": "

An object that shows the status of the Deliverability dashboard for your Amazon Pinpoint account.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetDeliverabilityTestReport": { @@ -3184,7 +3276,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to retrieve the results of a predictive inbox placement test.

" + "smithy.api#documentation": "

A request to retrieve the results of a predictive inbox placement test.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetDeliverabilityTestReportResponse": { @@ -3225,7 +3318,8 @@ } }, "traits": { - "smithy.api#documentation": "

The results of the predictive inbox placement test.

" + "smithy.api#documentation": "

The results of the predictive inbox placement test.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetDomainDeliverabilityCampaign": { @@ -3269,7 +3363,8 @@ } }, "traits": { - "smithy.api#documentation": "

Retrieve all the deliverability data for a specific campaign. This data is available\n for a campaign only if the campaign sent email by using a domain that the\n Deliverability dashboard is enabled for (PutDeliverabilityDashboardOption\n operation).

" + "smithy.api#documentation": "

Retrieve all the deliverability data for a specific campaign. This data is available\n for a campaign only if the campaign sent email by using a domain that the\n Deliverability dashboard is enabled for (PutDeliverabilityDashboardOption\n operation).

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetDomainDeliverabilityCampaignResponse": { @@ -3284,7 +3379,8 @@ } }, "traits": { - "smithy.api#documentation": "

An object that contains all the deliverability data for a specific campaign. This data\n is available for a campaign only if the campaign sent email by using a domain that the\n Deliverability dashboard is enabled for (PutDeliverabilityDashboardOption\n operation).

" + "smithy.api#documentation": "

An object that contains all the deliverability data for a specific campaign. This data\n is available for a campaign only if the campaign sent email by using a domain that the\n Deliverability dashboard is enabled for (PutDeliverabilityDashboardOption\n operation).

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetDomainStatisticsReport": { @@ -3344,7 +3440,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to obtain deliverability metrics for a domain.

" + "smithy.api#documentation": "

A request to obtain deliverability metrics for a domain.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetDomainStatisticsReportResponse": { @@ -3366,7 +3463,8 @@ } }, "traits": { - "smithy.api#documentation": "

An object that includes statistics that are related to the domain that you\n specified.

" + "smithy.api#documentation": "

An object that includes statistics that are related to the domain that you\n specified.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#GetEmailIdentity": { @@ -3410,7 +3508,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to return details about an email identity.

" + "smithy.api#documentation": "

A request to return details about an email identity.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#GetEmailIdentityResponse": { @@ -3456,7 +3555,8 @@ } }, "traits": { - "smithy.api#documentation": "

Details about an email identity.

" + "smithy.api#documentation": "

Details about an email identity.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#Identity": { @@ -3496,23 +3596,29 @@ } }, "com.amazonaws.pinpointemail#IdentityType": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The email identity type. The identity type can be one of the following:

\n
    \n
  • \n

    \n EMAIL_ADDRESS – The identity is an email address.

    \n
  • \n
  • \n

    \n DOMAIN – The identity is a domain.

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "EMAIL_ADDRESS", - "name": "EMAIL_ADDRESS" - }, - { - "value": "DOMAIN", - "name": "DOMAIN" - }, - { - "value": "MANAGED_DOMAIN", - "name": "MANAGED_DOMAIN" + "type": "enum", + "members": { + "EMAIL_ADDRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EMAIL_ADDRESS" + } + }, + "DOMAIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOMAIN" + } + }, + "MANAGED_DOMAIN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MANAGED_DOMAIN" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

The email identity type. The identity type can be one of the following:

\n
    \n
  • \n

    \n EMAIL_ADDRESS – The identity is an email address.

    \n
  • \n
  • \n

    \n DOMAIN – The identity is a domain.

    \n
  • \n
" } }, "com.amazonaws.pinpointemail#ImageUrl": { @@ -3679,7 +3785,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to obtain a list of configuration sets for your Amazon Pinpoint account in the current\n AWS Region.

" + "smithy.api#documentation": "

A request to obtain a list of configuration sets for your Amazon Pinpoint account in the current\n AWS Region.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#ListConfigurationSetsResponse": { @@ -3699,7 +3806,8 @@ } }, "traits": { - "smithy.api#documentation": "

A list of configuration sets in your Amazon Pinpoint account in the current AWS Region.

" + "smithy.api#documentation": "

A list of configuration sets in your Amazon Pinpoint account in the current AWS Region.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#ListDedicatedIpPools": { @@ -3751,7 +3859,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to obtain a list of dedicated IP pools.

" + "smithy.api#documentation": "

A request to obtain a list of dedicated IP pools.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#ListDedicatedIpPoolsResponse": { @@ -3771,7 +3880,8 @@ } }, "traits": { - "smithy.api#documentation": "

A list of dedicated IP pools.

" + "smithy.api#documentation": "

A list of dedicated IP pools.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#ListDeliverabilityTestReports": { @@ -3826,7 +3936,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to list all of the predictive inbox placement tests that you've performed.

" + "smithy.api#documentation": "

A request to list all of the predictive inbox placement tests that you've performed.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#ListDeliverabilityTestReportsResponse": { @@ -3847,7 +3958,8 @@ } }, "traits": { - "smithy.api#documentation": "

A list of the predictive inbox placement test reports that are available for your account, regardless of\n whether or not those tests are complete.

" + "smithy.api#documentation": "

A list of the predictive inbox placement test reports that are available for your account, regardless of\n whether or not those tests are complete.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#ListDomainDeliverabilityCampaigns": { @@ -3926,7 +4038,8 @@ } }, "traits": { - "smithy.api#documentation": "

Retrieve deliverability data for all the campaigns that used a specific domain to send\n email during a specified time range. This data is available for a domain only if you\n enabled the Deliverability dashboard (PutDeliverabilityDashboardOption operation)\n for the domain.

" + "smithy.api#documentation": "

Retrieve deliverability data for all the campaigns that used a specific domain to send\n email during a specified time range. This data is available for a domain only if you\n enabled the Deliverability dashboard (PutDeliverabilityDashboardOption operation)\n for the domain.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#ListDomainDeliverabilityCampaignsResponse": { @@ -3947,7 +4060,8 @@ } }, "traits": { - "smithy.api#documentation": "

An array of objects that provide deliverability data for all the campaigns that used a\n specific domain to send email during a specified time range. This data is available for\n a domain only if you enabled the Deliverability dashboard\n (PutDeliverabilityDashboardOption operation) for the domain.

" + "smithy.api#documentation": "

An array of objects that provide deliverability data for all the campaigns that used a\n specific domain to send email during a specified time range. This data is available for\n a domain only if you enabled the Deliverability dashboard\n (PutDeliverabilityDashboardOption operation) for the domain.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#ListEmailIdentities": { @@ -3999,7 +4113,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to list all of the email identities associated with your Amazon Pinpoint account. This\n list includes identities that you've already verified, identities that are unverified,\n and identities that were verified in the past, but are no longer verified.

" + "smithy.api#documentation": "

A request to list all of the email identities associated with your Amazon Pinpoint account. This\n list includes identities that you've already verified, identities that are unverified,\n and identities that were verified in the past, but are no longer verified.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#ListEmailIdentitiesResponse": { @@ -4019,7 +4134,8 @@ } }, "traits": { - "smithy.api#documentation": "

A list of all of the identities that you've attempted to verify for use with Amazon Pinpoint,\n regardless of whether or not those identities were successfully verified.

" + "smithy.api#documentation": "

A list of all of the identities that you've attempted to verify for use with Amazon Pinpoint,\n regardless of whether or not those identities were successfully verified.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#ListOfDedicatedIpPools": { @@ -4070,6 +4186,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#ListTagsForResourceResponse": { @@ -4082,6 +4201,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#MailFromAttributes": { @@ -4133,27 +4255,35 @@ } }, "com.amazonaws.pinpointemail#MailFromDomainStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The status of the MAIL FROM domain. This status can have the following values:

\n
    \n
  • \n

    \n PENDING – Amazon Pinpoint hasn't started searching for the MX record\n yet.

    \n
  • \n
  • \n

    \n SUCCESS – Amazon Pinpoint detected the required MX record for the\n MAIL FROM domain.

    \n
  • \n
  • \n

    \n FAILED – Amazon Pinpoint can't find the required MX record, or the\n record no longer exists.

    \n
  • \n
  • \n

    \n TEMPORARY_FAILURE – A temporary issue occurred, which\n prevented Amazon Pinpoint from determining the status of the MAIL FROM domain.

    \n
  • \n
", - "smithy.api#enum": [ - { - "value": "PENDING", - "name": "PENDING" - }, - { - "value": "SUCCESS", - "name": "SUCCESS" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "TEMPORARY_FAILURE", - "name": "TEMPORARY_FAILURE" + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" } - ] + }, + "SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "TEMPORARY_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEMPORARY_FAILURE" + } + } + }, + "traits": { + "smithy.api#documentation": "

The status of the MAIL FROM domain. This status can have the following values:

\n
    \n
  • \n

    \n PENDING – Amazon Pinpoint hasn't started searching for the MX record\n yet.

    \n
  • \n
  • \n

    \n SUCCESS – Amazon Pinpoint detected the required MX record for the\n MAIL FROM domain.

    \n
  • \n
  • \n

    \n FAILED – Amazon Pinpoint can't find the required MX record, or the\n record no longer exists.

    \n
  • \n
  • \n

    \n TEMPORARY_FAILURE – A temporary issue occurred, which\n prevented Amazon Pinpoint from determining the status of the MAIL FROM domain.

    \n
  • \n
" } }, "com.amazonaws.pinpointemail#Max24HourSend": { @@ -4407,14 +4537,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to enable or disable the automatic IP address warm-up feature.

" + "smithy.api#documentation": "

A request to enable or disable the automatic IP address warm-up feature.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutAccountDedicatedIpWarmupAttributesResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutAccountSendingAttributes": { @@ -4454,14 +4586,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to change the ability of your account to send email.

" + "smithy.api#documentation": "

A request to change the ability of your account to send email.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutAccountSendingAttributesResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutConfigurationSetDeliveryOptions": { @@ -4517,14 +4651,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to associate a configuration set with a dedicated IP pool.

" + "smithy.api#documentation": "

A request to associate a configuration set with a dedicated IP pool.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutConfigurationSetDeliveryOptionsResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutConfigurationSetReputationOptions": { @@ -4575,14 +4711,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to enable or disable tracking of reputation metrics for a configuration\n set.

" + "smithy.api#documentation": "

A request to enable or disable tracking of reputation metrics for a configuration\n set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutConfigurationSetReputationOptionsResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutConfigurationSetSendingOptions": { @@ -4633,14 +4771,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to enable or disable the ability of Amazon Pinpoint to send emails that use a specific\n configuration set.

" + "smithy.api#documentation": "

A request to enable or disable the ability of Amazon Pinpoint to send emails that use a specific\n configuration set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutConfigurationSetSendingOptionsResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutConfigurationSetTrackingOptions": { @@ -4690,14 +4830,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to add a custom domain for tracking open and click events to a configuration\n set.

" + "smithy.api#documentation": "

A request to add a custom domain for tracking open and click events to a configuration\n set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutConfigurationSetTrackingOptionsResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutDedicatedIpInPool": { @@ -4748,14 +4890,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to move a dedicated IP address to a dedicated IP pool.

" + "smithy.api#documentation": "

A request to move a dedicated IP address to a dedicated IP pool.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutDedicatedIpInPoolResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutDedicatedIpWarmupAttributes": { @@ -4806,14 +4950,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to change the warm-up attributes for a dedicated IP address. This operation\n is useful when you want to resume the warm-up process for an existing IP address.

" + "smithy.api#documentation": "

A request to change the warm-up attributes for a dedicated IP address. This operation\n is useful when you want to resume the warm-up process for an existing IP address.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutDedicatedIpWarmupAttributesResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutDeliverabilityDashboardOption": { @@ -4869,14 +5015,16 @@ } }, "traits": { - "smithy.api#documentation": "

Enable or disable the Deliverability dashboard for your Amazon Pinpoint account. When you enable the\n Deliverability dashboard, you gain access to reputation, deliverability, and other metrics for\n the domains that you use to send email using Amazon Pinpoint. You also gain the ability to perform\n predictive inbox placement tests.

\n

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon Pinpoint. For more information about the\n features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

" + "smithy.api#documentation": "

Enable or disable the Deliverability dashboard for your Amazon Pinpoint account. When you enable the\n Deliverability dashboard, you gain access to reputation, deliverability, and other metrics for\n the domains that you use to send email using Amazon Pinpoint. You also gain the ability to perform\n predictive inbox placement tests.

\n

When you use the Deliverability dashboard, you pay a monthly subscription charge, in addition\n to any other fees that you accrue by using Amazon Pinpoint. For more information about the\n features and cost of a Deliverability dashboard subscription, see Amazon Pinpoint Pricing.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutDeliverabilityDashboardOptionResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

A response that indicates whether the Deliverability dashboard is enabled for your Amazon Pinpoint\n account.

" + "smithy.api#documentation": "

A response that indicates whether the Deliverability dashboard is enabled for your Amazon Pinpoint\n account.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutEmailIdentityDkimAttributes": { @@ -4927,14 +5075,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to enable or disable DKIM signing of email that you send from an email\n identity.

" + "smithy.api#documentation": "

A request to enable or disable DKIM signing of email that you send from an email\n identity.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutEmailIdentityDkimAttributesResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutEmailIdentityFeedbackAttributes": { @@ -4985,14 +5135,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to set the attributes that control how bounce and complaint events are\n processed.

" + "smithy.api#documentation": "

A request to set the attributes that control how bounce and complaint events are\n processed.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutEmailIdentityFeedbackAttributesResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#PutEmailIdentityMailFromAttributes": { @@ -5048,14 +5200,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to configure the custom MAIL FROM domain for a verified identity.

" + "smithy.api#documentation": "

A request to configure the custom MAIL FROM domain for a verified identity.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#PutEmailIdentityMailFromAttributesResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#RawMessage": { @@ -5210,7 +5364,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to send an email message.

" + "smithy.api#documentation": "

A request to send an email message.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#SendEmailResponse": { @@ -5224,7 +5379,8 @@ } }, "traits": { - "smithy.api#documentation": "

A unique message ID that you receive when Amazon Pinpoint accepts an email for sending.

" + "smithy.api#documentation": "

A unique message ID that you receive when Amazon Pinpoint accepts an email for sending.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#SendQuota": { @@ -5399,11 +5555,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.pinpointemail#TagValue": { "type": "string" @@ -5441,19 +5603,23 @@ "type": "timestamp" }, "com.amazonaws.pinpointemail#TlsPolicy": { - "type": "string", - "traits": { - "smithy.api#documentation": "

Specifies whether messages that use the configuration set are required to use\n Transport Layer Security (TLS). If the value is Require, messages are only\n delivered if a TLS connection can be established. If the value is Optional,\n messages can be delivered in plain text if a TLS connection can't be established.

", - "smithy.api#enum": [ - { - "value": "REQUIRE", - "name": "REQUIRE" - }, - { - "value": "OPTIONAL", - "name": "OPTIONAL" + "type": "enum", + "members": { + "REQUIRE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REQUIRE" } - ] + }, + "OPTIONAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OPTIONAL" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies whether messages that use the configuration set are required to use\n Transport Layer Security (TLS). If the value is Require, messages are only\n delivered if a TLS connection can be established. If the value is Optional,\n messages can be delivered in plain text if a TLS connection can't be established.

" } }, "com.amazonaws.pinpointemail#TooManyRequestsException": { @@ -5534,11 +5700,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.pinpointemail#UpdateConfigurationSetEventDestination": { "type": "operation", @@ -5596,14 +5768,16 @@ } }, "traits": { - "smithy.api#documentation": "

A request to change the settings for an event destination for a configuration\n set.

" + "smithy.api#documentation": "

A request to change the settings for an event destination for a configuration\n set.

", + "smithy.api#input": {} } }, "com.amazonaws.pinpointemail#UpdateConfigurationSetEventDestinationResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

" + "smithy.api#documentation": "

An HTTP 200 response if the request succeeds, or an error message if the request\n fails.

", + "smithy.api#output": {} } }, "com.amazonaws.pinpointemail#Volume": { @@ -5645,19 +5819,23 @@ } }, "com.amazonaws.pinpointemail#WarmupStatus": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The warmup status of a dedicated IP.

", - "smithy.api#enum": [ - { - "value": "IN_PROGRESS", - "name": "IN_PROGRESS" - }, - { - "value": "DONE", - "name": "DONE" + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN_PROGRESS" + } + }, + "DONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DONE" } - ] + } + }, + "traits": { + "smithy.api#documentation": "

The warmup status of a dedicated IP.

" } } } diff --git a/codegen/sdk-codegen/aws-models/pinpoint-sms-voice-v2.json b/codegen/sdk-codegen/aws-models/pinpoint-sms-voice-v2.json index da7d86af608..39be86c3a8f 100644 --- a/codegen/sdk-codegen/aws-models/pinpoint-sms-voice-v2.json +++ b/codegen/sdk-codegen/aws-models/pinpoint-sms-voice-v2.json @@ -4003,52 +4003,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -4056,13 +4060,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -4072,224 +4085,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://sms-voice-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://sms-voice-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sms-voice-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://sms-voice-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://sms-voice.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://sms-voice.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://sms-voice.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://sms-voice.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -4304,8 +4268,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4317,8 +4281,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4330,8 +4294,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4343,8 +4307,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4356,8 +4320,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4369,8 +4333,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4382,8 +4346,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4395,8 +4359,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4408,8 +4372,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4421,8 +4385,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4434,8 +4398,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4447,8 +4411,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4460,8 +4424,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4473,8 +4437,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4486,8 +4450,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4499,8 +4463,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4512,8 +4476,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4525,8 +4489,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4538,8 +4502,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4551,8 +4515,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4564,8 +4528,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4577,8 +4541,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -4590,8 +4565,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -4603,8 +4589,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -4616,8 +4613,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -4629,8 +4637,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4642,8 +4650,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4655,8 +4663,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4667,8 +4675,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4679,10 +4687,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -7454,4 +7468,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/pinpoint-sms-voice.json b/codegen/sdk-codegen/aws-models/pinpoint-sms-voice.json index 71fce0643f5..64ac8bcf3c8 100644 --- a/codegen/sdk-codegen/aws-models/pinpoint-sms-voice.json +++ b/codegen/sdk-codegen/aws-models/pinpoint-sms-voice.json @@ -56,10 +56,7 @@ } }, "com.amazonaws.pinpointsmsvoice#Boolean": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } + "type": "boolean" }, "com.amazonaws.pinpointsmsvoice#CallInstructionsMessageType": { "type": "structure", @@ -197,14 +194,16 @@ } }, "traits": { - "smithy.api#documentation": "Create a new event destination in a configuration set." + "smithy.api#documentation": "Create a new event destination in a configuration set.", + "smithy.api#input": {} } }, "com.amazonaws.pinpointsmsvoice#CreateConfigurationSetEventDestinationResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "An empty object that indicates that the event destination was created successfully." + "smithy.api#documentation": "An empty object that indicates that the event destination was created successfully.", + "smithy.api#output": {} } }, "com.amazonaws.pinpointsmsvoice#CreateConfigurationSetRequest": { @@ -218,14 +217,16 @@ } }, "traits": { - "smithy.api#documentation": "A request to create a new configuration set." + "smithy.api#documentation": "A request to create a new configuration set.", + "smithy.api#input": {} } }, "com.amazonaws.pinpointsmsvoice#CreateConfigurationSetResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "An empty object that indicates that the configuration set was successfully created." + "smithy.api#documentation": "An empty object that indicates that the configuration set was successfully created.", + "smithy.api#output": {} } }, "com.amazonaws.pinpointsmsvoice#DeleteConfigurationSet": { @@ -309,13 +310,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.pinpointsmsvoice#DeleteConfigurationSetEventDestinationResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "An empty object that indicates that the event destination was deleted successfully." + "smithy.api#documentation": "An empty object that indicates that the event destination was deleted successfully.", + "smithy.api#output": {} } }, "com.amazonaws.pinpointsmsvoice#DeleteConfigurationSetRequest": { @@ -329,13 +334,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.pinpointsmsvoice#DeleteConfigurationSetResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "An empty object that indicates that the configuration set was deleted successfully." + "smithy.api#documentation": "An empty object that indicates that the configuration set was deleted successfully.", + "smithy.api#output": {} } }, "com.amazonaws.pinpointsmsvoice#EventDestination": { @@ -347,7 +356,6 @@ "Enabled": { "target": "com.amazonaws.pinpointsmsvoice#Boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination." } }, @@ -380,7 +388,6 @@ "Enabled": { "target": "com.amazonaws.pinpointsmsvoice#Boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination." } }, @@ -408,39 +415,53 @@ } }, "com.amazonaws.pinpointsmsvoice#EventType": { - "type": "string", - "traits": { - "smithy.api#documentation": "The types of events that are sent to the event destination.", - "smithy.api#enum": [ - { - "value": "INITIATED_CALL", - "name": "INITIATED_CALL" - }, - { - "value": "RINGING", - "name": "RINGING" - }, - { - "value": "ANSWERED", - "name": "ANSWERED" - }, - { - "value": "COMPLETED_CALL", - "name": "COMPLETED_CALL" - }, - { - "value": "BUSY", - "name": "BUSY" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "NO_ANSWER", - "name": "NO_ANSWER" + "type": "enum", + "members": { + "INITIATED_CALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INITIATED_CALL" + } + }, + "RINGING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RINGING" } - ] + }, + "ANSWERED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ANSWERED" + } + }, + "COMPLETED_CALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED_CALL" + } + }, + "BUSY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BUSY" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "NO_ANSWER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NO_ANSWER" + } + } + }, + "traits": { + "smithy.api#documentation": "The types of events that are sent to the event destination." } }, "com.amazonaws.pinpointsmsvoice#EventTypes": { @@ -494,6 +515,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.pinpointsmsvoice#GetConfigurationSetEventDestinationsResponse": { @@ -504,7 +528,8 @@ } }, "traits": { - "smithy.api#documentation": "An object that contains information about an event destination." + "smithy.api#documentation": "An object that contains information about an event destination.", + "smithy.api#output": {} } }, "com.amazonaws.pinpointsmsvoice#InternalServiceErrorException": { @@ -598,6 +623,9 @@ "smithy.api#httpQuery": "PageSize" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.pinpointsmsvoice#ListConfigurationSetsResponse": { @@ -617,7 +645,8 @@ } }, "traits": { - "smithy.api#documentation": "An object that contains information about the configuration sets for your account in the current region." + "smithy.api#documentation": "An object that contains information about the configuration sets for your account in the current region.", + "smithy.api#output": {} } }, "com.amazonaws.pinpointsmsvoice#NextTokenString": { @@ -1035,55 +1064,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://sms-voice.pinpoint-fips.us-gov-east-1.api.aws" + "url": "https://sms-voice.pinpoint-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sms-voice.pinpoint-fips.us-gov-east-1.amazonaws.com" + "url": "https://sms-voice.pinpoint-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://sms-voice.pinpoint.us-gov-east-1.api.aws" + "url": "https://sms-voice.pinpoint.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sms-voice.pinpoint.us-gov-east-1.amazonaws.com" + "url": "https://sms-voice.pinpoint.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -1094,9 +1123,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1107,9 +1136,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -1120,9 +1149,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1133,109 +1162,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://sms-voice.pinpoint-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sms-voice.pinpoint-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://sms-voice.pinpoint-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://sms-voice.pinpoint.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sms-voice.pinpoint.us-iso-east-1.c2s.ic.gov" + "url": "https://sms-voice.pinpoint.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://sms-voice.pinpoint-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sms-voice.pinpoint-fips.us-east-1.amazonaws.com" + "url": "https://sms-voice.pinpoint-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://sms-voice.pinpoint.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sms-voice.pinpoint.us-east-1.amazonaws.com" + "url": "https://sms-voice.pinpoint.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -1244,9 +1273,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1257,9 +1286,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1268,9 +1297,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1281,22 +1310,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1306,9 +1348,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1318,11 +1360,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1441,7 +1489,8 @@ } }, "traits": { - "smithy.api#documentation": "SendVoiceMessageRequest" + "smithy.api#documentation": "SendVoiceMessageRequest", + "smithy.api#input": {} } }, "com.amazonaws.pinpointsmsvoice#SendVoiceMessageResponse": { @@ -1455,7 +1504,8 @@ } }, "traits": { - "smithy.api#documentation": "An object that that contains the Message ID of a Voice message that was sent successfully." + "smithy.api#documentation": "An object that that contains the Message ID of a Voice message that was sent successfully.", + "smithy.api#output": {} } }, "com.amazonaws.pinpointsmsvoice#SnsDestination": { @@ -1543,14 +1593,16 @@ } }, "traits": { - "smithy.api#documentation": "UpdateConfigurationSetEventDestinationRequest" + "smithy.api#documentation": "UpdateConfigurationSetEventDestinationRequest", + "smithy.api#input": {} } }, "com.amazonaws.pinpointsmsvoice#UpdateConfigurationSetEventDestinationResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "An empty object that indicates that the event destination was updated successfully." + "smithy.api#documentation": "An empty object that indicates that the event destination was updated successfully.", + "smithy.api#output": {} } }, "com.amazonaws.pinpointsmsvoice#VoiceMessageContent": { diff --git a/codegen/sdk-codegen/aws-models/pinpoint.json b/codegen/sdk-codegen/aws-models/pinpoint.json index 1138cdceddf..bd6e997877b 100644 --- a/codegen/sdk-codegen/aws-models/pinpoint.json +++ b/codegen/sdk-codegen/aws-models/pinpoint.json @@ -14950,52 +14950,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -15003,13 +15007,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -15019,331 +15032,282 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://pinpoint-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://pinpoint-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://pinpoint-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://pinpoint.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://pinpoint.us-east-1.amazonaws.com", + "url": "https://pinpoint-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-west-2" + "supportsDualStack" ] } - ], + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], "endpoint": { - "url": "https://pinpoint.us-west-2.amazonaws.com", + "url": "https://pinpoint.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" }, + "us-east-1" + ] + } + ], + "endpoint": { + "url": "https://pinpoint.us-east-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://pinpoint.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "Region" }, + "us-west-2" + ] + } + ], + "endpoint": { + "url": "https://pinpoint.us-west-2.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://pinpoint.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "Region" }, + "us-gov-west-1" + ] + } + ], + "endpoint": { + "url": "https://pinpoint.us-gov-west-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", { - "conditions": [ + "fn": "getAttr", + "argv": [ { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://pinpoint.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://pinpoint.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws-us-gov", { - "conditions": [], - "endpoint": { - "url": "https://pinpoint.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] } ] } - ] + ], + "endpoint": { + "url": "https://pinpoint.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://pinpoint.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/pipes.json b/codegen/sdk-codegen/aws-models/pipes.json index b22242dff4a..88960b59138 100644 --- a/codegen/sdk-codegen/aws-models/pipes.json +++ b/codegen/sdk-codegen/aws-models/pipes.json @@ -3333,54 +3333,54 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://pipes-fips.us-gov-east-1.api.aws" + "url": "https://pipes-fips.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://pipes-fips.us-gov-east-1.amazonaws.com" + "url": "https://pipes-fips.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://pipes.us-gov-east-1.api.aws" + "url": "https://pipes.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://pipes.us-gov-east-1.amazonaws.com" + "url": "https://pipes.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": false } }, @@ -3392,8 +3392,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -3405,8 +3405,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -3418,8 +3418,8 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -3431,108 +3431,108 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://pipes-fips.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://pipes-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://pipes-fips.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://pipes.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://pipes.us-iso-east-1.c2s.ic.gov" + "url": "https://pipes.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://pipes-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://pipes-fips.us-east-1.amazonaws.com" + "url": "https://pipes-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://pipes.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://pipes.us-east-1.amazonaws.com" + "url": "https://pipes.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": false } }, @@ -3542,8 +3542,8 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -3555,8 +3555,8 @@ } }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -3566,8 +3566,8 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -3579,21 +3579,34 @@ } }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -3604,8 +3617,8 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -3616,11 +3629,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/pricing.json b/codegen/sdk-codegen/aws-models/pricing.json index 2b134cfddd0..34e66964998 100644 --- a/codegen/sdk-codegen/aws-models/pricing.json +++ b/codegen/sdk-codegen/aws-models/pricing.json @@ -95,52 +95,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -148,13 +152,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -164,249 +177,200 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.pricing-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://api.pricing-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.pricing-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://api.pricing-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://api.pricing.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://api.pricing.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, { "conditions": [], "endpoint": { - "url": "https://api.pricing.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://api.pricing.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + "aws", + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + } + ] + } + ], + "endpoint": { + "url": "https://api.pricing.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://api.pricing.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/privatenetworks.json b/codegen/sdk-codegen/aws-models/privatenetworks.json index fbb6897e3f2..486a6a1a0a9 100644 --- a/codegen/sdk-codegen/aws-models/privatenetworks.json +++ b/codegen/sdk-codegen/aws-models/privatenetworks.json @@ -1154,52 +1154,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1207,13 +1211,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1223,224 +1236,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://private-networks-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://private-networks-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://private-networks-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://private-networks-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://private-networks.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://private-networks.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://private-networks.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://private-networks.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/proton.json b/codegen/sdk-codegen/aws-models/proton.json index 37a96148f2f..c03add3c310 100644 --- a/codegen/sdk-codegen/aws-models/proton.json +++ b/codegen/sdk-codegen/aws-models/proton.json @@ -321,52 +321,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -374,13 +378,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -390,224 +403,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://proton-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://proton-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://proton-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://proton-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://proton.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://proton.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://proton.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://proton.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/qldb-session.json b/codegen/sdk-codegen/aws-models/qldb-session.json index 37782b8b966..df4974f8c5d 100644 --- a/codegen/sdk-codegen/aws-models/qldb-session.json +++ b/codegen/sdk-codegen/aws-models/qldb-session.json @@ -326,7 +326,7 @@ "min": 1, "max": 32 }, - "smithy.api#pattern": "(?!^.*--)(?!^[0-9]+$)(?!^-)(?!.*-$)^[A-Za-z0-9-]+$" + "smithy.api#pattern": "^(?!^.*--)(?!^[0-9]+$)(?!^-)(?!.*-$)^[A-Za-z0-9-]+$" } }, "com.amazonaws.qldbsession#LimitExceededException": { @@ -471,52 +471,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -524,13 +528,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -540,224 +553,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://session.qldb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://session.qldb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://session.qldb-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://session.qldb-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://session.qldb.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://session.qldb.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://session.qldb.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://session.qldb.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -772,8 +736,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -785,8 +749,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -798,8 +762,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -811,8 +775,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -824,8 +788,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -837,8 +801,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -850,8 +814,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -863,8 +827,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -876,8 +840,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -889,8 +853,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -902,8 +866,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -915,8 +879,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -928,8 +892,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -941,8 +905,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -954,8 +918,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -967,8 +931,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -980,8 +944,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -993,8 +957,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1006,8 +970,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1019,8 +983,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1032,8 +996,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1045,8 +1009,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1058,8 +1022,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1071,8 +1035,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1084,8 +1059,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1097,8 +1083,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1110,8 +1107,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1123,8 +1131,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1136,8 +1144,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1149,8 +1157,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1161,8 +1169,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1173,10 +1181,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1284,6 +1298,9 @@ "smithy.api#documentation": "

Command to fetch a page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.qldbsession#SendCommandResult": { @@ -1331,6 +1348,9 @@ "smithy.api#documentation": "

Contains the details of the fetched page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.qldbsession#SessionToken": { diff --git a/codegen/sdk-codegen/aws-models/qldb.json b/codegen/sdk-codegen/aws-models/qldb.json index 272219762ed..26471be1935 100644 --- a/codegen/sdk-codegen/aws-models/qldb.json +++ b/codegen/sdk-codegen/aws-models/qldb.json @@ -171,52 +171,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -224,13 +228,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -240,224 +253,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://qldb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://qldb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://qldb-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://qldb-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://qldb.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://qldb.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://qldb.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://qldb.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/ram.json b/codegen/sdk-codegen/aws-models/ram.json index 8116db437fb..aec11a67469 100644 --- a/codegen/sdk-codegen/aws-models/ram.json +++ b/codegen/sdk-codegen/aws-models/ram.json @@ -300,52 +300,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -353,13 +357,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -369,92 +382,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ram-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://ram-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -463,155 +467,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://ram.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://ram-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://ram.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://ram-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ram.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://ram.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://ram.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://ram.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/rbin.json b/codegen/sdk-codegen/aws-models/rbin.json index a817492adb9..8749707767c 100644 --- a/codegen/sdk-codegen/aws-models/rbin.json +++ b/codegen/sdk-codegen/aws-models/rbin.json @@ -76,7 +76,7 @@ "name": "rbin" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

This is the Recycle Bin API Reference. This documentation provides \n descriptions and syntax for each of the actions and data types in Recycle Bin.

\n \n

Recycle Bin is a resource recovery feature that enables you to restore accidentally \n deleted snapshots and EBS-backed AMIs. When using Recycle Bin, if your resources are \n deleted, they are retained in the Recycle Bin for a time period that you specify.

\n \n

You can restore a resource from the Recycle Bin at any time before its retention period \n expires. After you restore a resource from the Recycle Bin, the resource is removed from the \n Recycle Bin, and you can then use it in the same way you use any other resource of that type \n in your account. If the retention period expires and the resource is not restored, the resource \n is permanently deleted from the Recycle Bin and is no longer available for recovery. For more \n information about Recycle Bin, see \n Recycle Bin in the Amazon Elastic Compute Cloud User Guide.

", + "smithy.api#documentation": "

This is the Recycle Bin API Reference. This documentation provides \n descriptions and syntax for each of the actions and data types in Recycle Bin.

\n

Recycle Bin is a resource recovery feature that enables you to restore accidentally \n deleted snapshots and EBS-backed AMIs. When using Recycle Bin, if your resources are \n deleted, they are retained in the Recycle Bin for a time period that you specify.

\n

You can restore a resource from the Recycle Bin at any time before its retention period \n expires. After you restore a resource from the Recycle Bin, the resource is removed from the \n Recycle Bin, and you can then use it in the same way you use any other resource of that type \n in your account. If the retention period expires and the resource is not restored, the resource \n is permanently deleted from the Recycle Bin and is no longer available for recovery. For more \n information about Recycle Bin, see \n Recycle Bin in the Amazon Elastic Compute Cloud User Guide.

", "smithy.api#title": "Amazon Recycle Bin", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -138,52 +138,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -191,13 +195,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -207,224 +220,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rbin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://rbin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://rbin-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://rbin-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rbin.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://rbin.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://rbin.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://rbin.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -439,8 +403,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -452,8 +416,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -465,8 +429,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -478,8 +442,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -491,8 +455,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -504,8 +468,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -517,8 +481,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -530,8 +494,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -543,8 +507,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -556,8 +520,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -569,8 +533,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -582,8 +546,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -595,8 +559,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -608,8 +572,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -621,8 +585,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -634,8 +598,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -647,8 +611,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -660,8 +624,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -673,8 +637,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -686,8 +650,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -699,8 +663,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -712,8 +676,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -725,8 +689,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -738,8 +702,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -751,8 +715,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -764,8 +728,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -777,8 +741,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -790,8 +754,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -803,8 +767,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -816,8 +780,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -829,8 +793,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -842,8 +806,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -855,8 +830,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -868,8 +854,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -881,8 +878,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -894,8 +902,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -907,8 +915,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -920,8 +928,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -932,8 +940,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -944,10 +952,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1053,6 +1067,9 @@ "smithy.api#documentation": "

Information about the retention rule lock configuration.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#CreateRuleResponse": { @@ -1109,6 +1126,9 @@ "smithy.api#documentation": "

The lock state for the retention rule.

\n
    \n
  • \n

    \n locked - The retention rule is locked and can't be modified or deleted.

    \n
  • \n
  • \n

    \n pending_unlock - The retention rule has been unlocked but it is still within \n the unlock delay period. The retention rule can be modified or deleted only after the unlock \n delay period has expired.

    \n
  • \n
  • \n

    \n unlocked - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.

    \n
  • \n
  • \n

    \n null - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the locked and unlocked states \n only; it can never transition back to null.

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.rbin#DeleteRule": { @@ -1153,11 +1173,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#DeleteRuleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.rbin#Description": { "type": "string", @@ -1207,6 +1233,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#GetRuleResponse": { @@ -1266,6 +1295,9 @@ "smithy.api#documentation": "

The date and time at which the unlock delay is set to expire. Only returned \n for retention rules that have been unlocked and that are still within the unlock \n delay period.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.rbin#InternalServerException": { @@ -1346,6 +1378,9 @@ "smithy.api#documentation": "

The lock state of the retention rules to list. Only retention rules with the specified \n lock state are returned.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#ListRulesResponse": { @@ -1363,6 +1398,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.rbin#ListTagsForResource": { @@ -1404,6 +1442,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#ListTagsForResourceResponse": { @@ -1415,6 +1456,9 @@ "smithy.api#documentation": "

Information about the tags assigned to the retention rule.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.rbin#LockConfiguration": { @@ -1481,6 +1525,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#LockRuleResponse": { @@ -1531,6 +1578,9 @@ "smithy.api#documentation": "

The lock state for the retention rule.

\n
    \n
  • \n

    \n locked - The retention rule is locked and can't be modified or deleted.

    \n
  • \n
  • \n

    \n pending_unlock - The retention rule has been unlocked but it is still within \n the unlock delay period. The retention rule can be modified or deleted only after the unlock \n delay period has expired.

    \n
  • \n
  • \n

    \n unlocked - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.

    \n
  • \n
  • \n

    \n null - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the locked and unlocked states \n only; it can never transition back to null.

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.rbin#LockState": { @@ -1911,11 +1961,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.rbin#TagValue": { "type": "string", @@ -2014,6 +2070,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#UnlockRuleResponse": { @@ -2070,6 +2129,9 @@ "smithy.api#documentation": "

The date and time at which the unlock delay is set to expire. Only returned \n for retention rules that have been unlocked and that are still within the unlock \n delay period.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.rbin#UntagResource": { @@ -2119,11 +2181,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.rbin#UpdateRule": { "type": "operation", @@ -2191,6 +2259,9 @@ "smithy.api#documentation": "

Specifies the resource tags to use to identify resources that are to be retained by a \n tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that \n have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have \n any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

\n

You can add the same tag key and value pair to a maximum or five retention rules.

\n

To create a Region-level retention rule, omit this parameter. A Region-level retention rule \n does not have any resource tags specified. It retains all deleted resources of the specified \n resource type in the Region in which the rule is created, even if the resources are not tagged.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.rbin#UpdateRuleResponse": { @@ -2241,6 +2312,9 @@ "smithy.api#documentation": "

The date and time at which the unlock delay is set to expire. Only returned \n for retention rules that have been unlocked and that are still within the unlock \n delay period.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.rbin#ValidationException": { diff --git a/codegen/sdk-codegen/aws-models/rds-data.json b/codegen/sdk-codegen/aws-models/rds-data.json index 3843dfc38ac..9f9613274eb 100644 --- a/codegen/sdk-codegen/aws-models/rds-data.json +++ b/codegen/sdk-codegen/aws-models/rds-data.json @@ -1029,52 +1029,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1082,13 +1086,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1098,224 +1111,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rds-data-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://rds-data-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rds-data-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://rds-data-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://rds-data.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://rds-data.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://rds-data.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://rds-data.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1330,8 +1294,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1343,8 +1307,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1356,8 +1320,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1369,8 +1333,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1382,8 +1346,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1395,8 +1359,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1408,8 +1372,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1421,8 +1385,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1434,8 +1398,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1447,8 +1411,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1460,8 +1424,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1473,8 +1437,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1486,8 +1461,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1499,8 +1485,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1512,8 +1509,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1525,8 +1533,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1538,8 +1546,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1551,8 +1559,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1563,8 +1571,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1575,10 +1583,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2041,4 +2055,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/redshift-data.json b/codegen/sdk-codegen/aws-models/redshift-data.json index 2b3f50a2dea..61ee5c0fc89 100644 --- a/codegen/sdk-codegen/aws-models/redshift-data.json +++ b/codegen/sdk-codegen/aws-models/redshift-data.json @@ -1509,52 +1509,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1562,13 +1566,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1578,224 +1591,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://redshift-data-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://redshift-data-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://redshift-data-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://redshift-data-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://redshift-data.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://redshift-data.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://redshift-data.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://redshift-data.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/redshift-serverless.json b/codegen/sdk-codegen/aws-models/redshift-serverless.json index 775c4699b3f..51645eb82bc 100644 --- a/codegen/sdk-codegen/aws-models/redshift-serverless.json +++ b/codegen/sdk-codegen/aws-models/redshift-serverless.json @@ -2853,52 +2853,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2906,13 +2910,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2922,224 +2935,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://redshift-serverless-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://redshift-serverless-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://redshift-serverless-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://redshift-serverless-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://redshift-serverless.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://redshift-serverless.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://redshift-serverless.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://redshift-serverless.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3154,8 +3118,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3167,8 +3131,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3180,8 +3144,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3193,8 +3157,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3206,8 +3170,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3219,8 +3183,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3232,8 +3196,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3245,8 +3209,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3258,8 +3222,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3271,8 +3235,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3284,8 +3248,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3297,8 +3261,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3310,8 +3274,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3323,8 +3287,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3336,8 +3300,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3349,8 +3313,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3362,8 +3326,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3375,8 +3339,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3388,8 +3352,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3401,8 +3365,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3414,8 +3378,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3427,8 +3391,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3440,8 +3415,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3453,8 +3439,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3466,8 +3463,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3479,8 +3487,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3492,8 +3500,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3505,8 +3513,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3517,8 +3525,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3529,10 +3537,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -5178,4 +5192,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/redshift.json b/codegen/sdk-codegen/aws-models/redshift.json index f4426a3d960..f9b86d9deca 100644 --- a/codegen/sdk-codegen/aws-models/redshift.json +++ b/codegen/sdk-codegen/aws-models/redshift.json @@ -81,6 +81,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#AcceptReservedNodeExchangeOutputMessage": { @@ -92,6 +95,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#AccessToClusterDeniedFault": { @@ -348,6 +354,9 @@ "smithy.api#documentation": "

From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified Amazon Web Services Region.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#AssociatedClusterList": { @@ -646,7 +655,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#AuthorizeClusterSecurityGroupIngressResult": { @@ -694,6 +704,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#AuthorizeEndpointAccess": { @@ -750,6 +763,9 @@ "smithy.api#documentation": "

The virtual private cloud (VPC) identifiers to grant access to.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#AuthorizeSnapshotAccess": { @@ -817,7 +833,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#AuthorizeSnapshotAccessResult": { @@ -989,6 +1006,9 @@ "smithy.api#documentation": "

A boolean value indicating whether to override an exception if the retention period\n has passed.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#BatchModifyClusterSnapshotsOutputMessage": { @@ -1006,6 +1026,9 @@ "smithy.api#documentation": "

A list of any errors returned.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#BatchSnapshotOperationErrorList": { @@ -1088,6 +1111,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#CertificateAssociation": { @@ -1583,6 +1609,9 @@ "smithy.api#documentation": "

A list of revisions.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#ClusterExtendedCredentials": { @@ -1893,7 +1922,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output from the DescribeClusterParameterGroups\n action.

" + "smithy.api#documentation": "

Contains the output from the DescribeClusterParameterGroups\n action.

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#ClusterParameterStatus": { @@ -2046,7 +2076,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#ClusterSecurityGroupNameList": { @@ -2264,7 +2295,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output from the DescribeClusterSubnetGroups action.\n

" + "smithy.api#documentation": "

Contains the output from the DescribeClusterSubnetGroups action.\n

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#ClusterSubnetGroupNotFoundFault": { @@ -2379,7 +2411,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output from the DescribeClusterVersions action.\n

" + "smithy.api#documentation": "

Contains the output from the DescribeClusterVersions action.\n

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#ClustersMessage": { @@ -2399,7 +2432,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output from the DescribeClusters action.

" + "smithy.api#documentation": "

Contains the output from the DescribeClusters action.

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#CopyClusterSnapshot": { @@ -2462,7 +2496,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CopyClusterSnapshotResult": { @@ -2533,6 +2568,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateAuthenticationProfileResult": { @@ -2848,7 +2886,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateClusterParameterGroup": { @@ -2909,7 +2948,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateClusterParameterGroupResult": { @@ -2985,7 +3025,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateClusterSecurityGroupResult": { @@ -3065,7 +3106,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateClusterSnapshotResult": { @@ -3149,7 +3191,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateClusterSubnetGroupResult": { @@ -3210,6 +3253,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateCustomDomainAssociationResult": { @@ -3323,6 +3369,9 @@ "smithy.api#documentation": "

The security group that defines the ports, protocols, and sources for inbound traffic that you are authorizing into your endpoint.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateEventSubscription": { @@ -3427,7 +3476,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateEventSubscriptionResult": { @@ -3485,7 +3535,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateHsmClientCertificateResult": { @@ -3578,7 +3629,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateHsmConfigurationResult": { @@ -3679,6 +3731,9 @@ "smithy.api#documentation": "

If true, the schedule is enabled. If false, the scheduled action does not trigger. \n For more information about state of the scheduled action, see ScheduledAction.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateSnapshotCopyGrant": { @@ -3737,7 +3792,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of the CreateSnapshotCopyGrant action.

" + "smithy.api#documentation": "

The result of the CreateSnapshotCopyGrant action.

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateSnapshotCopyGrantResult": { @@ -3822,6 +3878,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateTags": { @@ -3869,7 +3928,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output from the CreateTags action.

" + "smithy.api#documentation": "

Contains the output from the CreateTags action.

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#CreateUsageLimit": { @@ -3957,6 +4017,9 @@ "smithy.api#documentation": "

A list of tag instances.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#CustomCnameAssociationFault": { @@ -4008,6 +4071,9 @@ "smithy.api#documentation": "

The associations for the custom domain.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#CustomDomainCertificateArnString": { @@ -4047,6 +4113,9 @@ "smithy.api#documentation": "

The total amount of storage currently provisioned.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#DataShare": { @@ -4317,6 +4386,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DefaultClusterParameters": { @@ -4410,6 +4482,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteAuthenticationProfileResult": { @@ -4486,7 +4561,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteClusterParameterGroup": { @@ -4521,7 +4597,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteClusterResult": { @@ -4567,7 +4644,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteClusterSnapshot": { @@ -4666,7 +4744,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteCustomDomainAssociation": { @@ -4702,6 +4781,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteEndpointAccess": { @@ -4743,6 +4825,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteEventSubscription": { @@ -4777,7 +4862,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteHsmClientCertificate": { @@ -4812,7 +4898,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteHsmConfiguration": { @@ -4847,7 +4934,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeletePartner": { @@ -4903,6 +4991,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteSnapshotCopyGrant": { @@ -4937,7 +5028,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of the DeleteSnapshotCopyGrant action.

" + "smithy.api#documentation": "

The result of the DeleteSnapshotCopyGrant action.

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteSnapshotSchedule": { @@ -4970,6 +5062,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteTags": { @@ -5011,7 +5106,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output from the DeleteTags action.

" + "smithy.api#documentation": "

Contains the output from the DeleteTags action.

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DeleteUsageLimit": { @@ -5044,6 +5140,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DependentServiceRequestThrottlingFault": { @@ -5101,6 +5200,9 @@ "smithy.api#documentation": "

A list of attribute names.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeAuthenticationProfiles": { @@ -5132,6 +5234,9 @@ "smithy.api#documentation": "

The name of the authentication profile to describe. If not specified then all authentication profiles owned by the account are listed.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeAuthenticationProfilesResult": { @@ -5195,6 +5300,9 @@ "smithy.api#documentation": "

An optional parameter that specifies the starting point for returning a set of\n response records. When the results of a DescribeClusterDbRevisions request\n exceed the value specified in MaxRecords, Amazon Redshift returns a value\n in the marker field of the response. You can retrieve the next set of\n response records by providing the returned marker value in the\n marker parameter and retrying the request.

\n

Constraints: You can specify either the ClusterIdentifier parameter, or\n the marker parameter, but not both.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeClusterParameterGroups": { @@ -5258,7 +5366,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeClusterParameters": { @@ -5314,7 +5423,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeClusterSecurityGroups": { @@ -5378,7 +5488,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeClusterSnapshots": { @@ -5533,7 +5644,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeClusterSubnetGroups": { @@ -5597,7 +5709,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeClusterTracks": { @@ -5647,6 +5760,9 @@ "smithy.api#documentation": "

An optional parameter that specifies the starting point to return a set of response\n records. When the results of a DescribeClusterTracks request exceed the\n value specified in MaxRecords, Amazon Redshift returns a value in the\n Marker field of the response. You can retrieve the next set of response\n records by providing the returned marker value in the Marker parameter and\n retrying the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeClusterVersions": { @@ -5696,7 +5812,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeClusters": { @@ -5852,7 +5969,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeCustomDomainAssociations": { @@ -5908,6 +6026,9 @@ "smithy.api#documentation": "

The marker for the custom domain association.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeDataShares": { @@ -5983,6 +6104,9 @@ "smithy.api#documentation": "

An optional parameter that specifies the starting point to return a set of response\n records. When the results of a DescribeDataSharesForConsumer request\n exceed the value specified in MaxRecords, Amazon Web Services returns a value in the\n Marker field of the response. You can retrieve the next set of response\n records by providing the returned marker value in the Marker parameter and\n retrying the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeDataSharesForConsumerResult": { @@ -6055,6 +6179,9 @@ "smithy.api#documentation": "

An optional parameter that specifies the starting point to return a set of response\n records. When the results of a DescribeDataSharesForProducer request\n exceed the value specified in MaxRecords, Amazon Web Services returns a value in the\n Marker field of the response. You can retrieve the next set of response\n records by providing the returned marker value in the Marker parameter and\n retrying the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeDataSharesForProducerResult": { @@ -6098,6 +6225,9 @@ "smithy.api#documentation": "

An optional parameter that specifies the starting point to return a set of response records. When the results of a DescribeDataShares request exceed the value specified in MaxRecords, Amazon Web Services returns a value in the Marker field of the response. You can retrieve the next set of response records by providing the returned marker value in the Marker parameter and retrying the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeDataSharesResult": { @@ -6162,7 +6292,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeDefaultClusterParametersResult": { @@ -6244,6 +6375,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous\n DescribeEndpointAccess request. If this parameter is specified, the\n response includes only records beyond the marker, up to the value specified by the\n MaxRecords parameter.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeEndpointAuthorization": { @@ -6305,6 +6439,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous\n DescribeEndpointAuthorization request. If this parameter is specified, the\n response includes only records beyond the marker, up to the value specified by the\n MaxRecords parameter.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeEventCategories": { @@ -6330,7 +6467,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeEventSubscriptions": { @@ -6394,7 +6532,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeEvents": { @@ -6462,7 +6601,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeHsmClientCertificates": { @@ -6526,7 +6666,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeHsmConfigurations": { @@ -6590,7 +6731,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeLoggingStatus": { @@ -6622,7 +6764,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeNodeConfigurationOptions": { @@ -6713,6 +6856,9 @@ "smithy.api#documentation": "

The maximum number of response records to return in each call. If the number of\n remaining response records exceeds the specified MaxRecords value, a value\n is returned in a marker field of the response. You can retrieve the next\n set of records by retrying the command with the returned marker value.

\n

Default: 500\n

\n

Constraints: minimum 100, maximum 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeOrderableClusterOptions": { @@ -6762,7 +6908,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribePartners": { @@ -6814,6 +6961,9 @@ "smithy.api#documentation": "

The name of the partner that is being described. If partner name is not specified, then all partner integrations are described.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribePartnersOutputMessage": { @@ -6825,6 +6975,9 @@ "smithy.api#documentation": "

A list of partner integrations.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#DescribeReservedNodeExchangeStatus": { @@ -6883,6 +7036,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous DescribeReservedNodeExchangeStatus request. If this \n parameter is specified, the response includes only records beyond the marker, up to the value \n specified by the MaxRecords parameter. You can retrieve the next set of response\n records by providing the returned marker value in the Marker parameter and\n retrying the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeReservedNodeExchangeStatusOutputMessage": { @@ -6900,6 +7056,9 @@ "smithy.api#documentation": "

A pagination token provided by a previous DescribeReservedNodeExchangeStatus request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#DescribeReservedNodeOfferings": { @@ -6954,7 +7113,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeReservedNodes": { @@ -7006,7 +7166,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeResize": { @@ -7041,7 +7202,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeScheduledActions": { @@ -7121,6 +7283,9 @@ "smithy.api#documentation": "

The maximum number of response records to return in each call. If the number of\n remaining response records exceeds the specified MaxRecords value, a value\n is returned in a marker field of the response. You can retrieve the next\n set of records by retrying the command with the returned marker value.

\n

Default: 100\n

\n

Constraints: minimum 20, maximum 100.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeSnapshotCopyGrants": { @@ -7184,7 +7349,8 @@ } }, "traits": { - "smithy.api#documentation": "

The result of the DescribeSnapshotCopyGrants action.

" + "smithy.api#documentation": "

The result of the DescribeSnapshotCopyGrants action.

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeSnapshotSchedules": { @@ -7244,6 +7410,9 @@ "smithy.api#documentation": "

The maximum number or response records to return in each call. If the number of\n remaining response records exceeds the specified MaxRecords value, a value\n is returned in a marker field of the response. You can retrieve the next\n set of records by retrying the command with the returned marker\n value.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeSnapshotSchedulesOutputMessage": { @@ -7261,6 +7430,9 @@ "smithy.api#documentation": "

A value that indicates the starting point for the next set of response records in a\n subsequent request. If a value is returned in a response, you can retrieve the next set\n of records by providing this returned marker value in the marker parameter\n and retrying the command. If the marker field is empty, all response\n records have been retrieved for the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#DescribeStorage": { @@ -7330,7 +7502,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeTags": { @@ -7400,7 +7573,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DescribeUsageLimits": { @@ -7474,6 +7648,9 @@ "smithy.api#documentation": "

A tag value or values for which you want to return all matching usage limit objects\n that are associated with the specified tag value or values. For example, suppose\n that you have parameter groups that are tagged with values called admin and\n test. If you specify both of these tag values in the request, Amazon Redshift\n returns a response with the usage limit objects that have either or both of these tag\n values associated with them.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#DisableLogging": { @@ -7508,7 +7685,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DisableSnapshotCopy": { @@ -7549,7 +7727,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#DisableSnapshotCopyResult": { @@ -7611,6 +7790,9 @@ "smithy.api#documentation": "

From a datashare consumer account, removes association of a datashare from all the existing and future namespaces in the specified Amazon Web Services Region.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#Double": { @@ -7760,7 +7942,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#EnableSnapshotCopy": { @@ -7847,7 +8030,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#EnableSnapshotCopyResult": { @@ -8282,7 +8466,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#EventInfoMap": { @@ -8453,7 +8638,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#EventsMessage": { @@ -8473,7 +8659,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#ExceptionMessage": { @@ -8547,7 +8734,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request parameters to get cluster credentials.

" + "smithy.api#documentation": "

The request parameters to get cluster credentials.

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#GetClusterCredentialsWithIAM": { @@ -8597,6 +8785,9 @@ "smithy.api#documentation": "

The custom domain name for the IAM message cluster credentials.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#GetReservedNodeExchangeConfigurationOptions": { @@ -8677,6 +8868,9 @@ "smithy.api#documentation": "

An optional pagination token provided by a previous GetReservedNodeExchangeConfigurationOptions request. If this \n parameter is specified, the response includes only records beyond the marker, up to the value \n specified by the MaxRecords parameter. You can retrieve the next set of response\n records by providing the returned marker value in the Marker parameter and\n retrying the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#GetReservedNodeExchangeConfigurationOptionsOutputMessage": { @@ -8694,6 +8888,9 @@ "smithy.api#documentation": "

the configuration options for the reserved-node\n exchange. These options include information about the source reserved node and target reserved\n node. Details include the node type, the price, the node count, and the offering\n type.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#GetReservedNodeExchangeOfferings": { @@ -8758,7 +8955,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#GetReservedNodeExchangeOfferingsOutputMessage": { @@ -8776,6 +8974,9 @@ "smithy.api#documentation": "

Returns an array of ReservedNodeOffering objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#HsmClientCertificate": { @@ -8847,7 +9048,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#HsmClientCertificateNotFoundFault": { @@ -8965,7 +9167,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#HsmConfigurationNotFoundFault": { @@ -9865,6 +10068,9 @@ "smithy.api#documentation": "

This parameter is retired. Amazon Redshift automatically determines whether to use AQUA (Advanced Query Accelerator).

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyAquaOutputMessage": { @@ -9876,7 +10082,10 @@ "smithy.api#documentation": "

This parameter is retired. Amazon Redshift automatically determines whether to use AQUA (Advanced Query Accelerator).

" } } - } + }, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.redshift#ModifyAuthenticationProfile": { "type": "operation", @@ -9918,6 +10127,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyAuthenticationProfileResult": { @@ -10057,6 +10269,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyClusterDbRevisionResult": { @@ -10120,7 +10335,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyClusterIamRolesResult": { @@ -10194,6 +10410,9 @@ "smithy.api#documentation": "

An integer indicating the duration of the maintenance window in days. If you specify a\n duration, you can't specify an end time. The duration must be 45 days or less.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyClusterMaintenanceResult": { @@ -10363,7 +10582,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyClusterParameterGroup": { @@ -10405,7 +10625,8 @@ } }, "traits": { - "smithy.api#documentation": "

Describes a modify cluster parameter group operation.

" + "smithy.api#documentation": "

Describes a modify cluster parameter group operation.

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyClusterResult": { @@ -10465,6 +10686,9 @@ "smithy.api#documentation": "

A Boolean option to override an exception if the retention period has already\n passed.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyClusterSnapshotResult": { @@ -10523,6 +10747,9 @@ "smithy.api#documentation": "

A boolean to indicate whether to remove the assoiciation between the cluster and the\n schedule.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyClusterSubnetGroup": { @@ -10582,7 +10809,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyClusterSubnetGroupResult": { @@ -10641,6 +10869,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyCustomDomainAssociationResult": { @@ -10723,6 +10954,9 @@ "smithy.api#documentation": "

The complete list of VPC security groups associated with the endpoint after the endpoint is modified.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyEventSubscription": { @@ -10814,7 +11048,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyEventSubscriptionResult": { @@ -10909,6 +11144,9 @@ "smithy.api#documentation": "

A modified enable flag of the scheduled action. If true, the scheduled action is active. If false, the scheduled action is disabled.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifySnapshotCopyRetentionPeriod": { @@ -10967,7 +11205,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifySnapshotCopyRetentionPeriodResult": { @@ -11021,6 +11260,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ModifyUsageLimit": { @@ -11068,6 +11310,9 @@ "smithy.api#documentation": "

The new action that Amazon Redshift takes when the limit is reached. \n For more information about this parameter, see UsageLimit.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#NetworkInterface": { @@ -11233,6 +11478,9 @@ "smithy.api#documentation": "

A value that indicates the starting point for the next set of response records in a\n subsequent request. If a value is returned in a response, you can retrieve the next set\n of records by providing this returned marker value in the Marker parameter\n and retrying the command. If the Marker field is empty, all response\n records have been retrieved for the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#NumberOfNodesPerClusterLimitExceededFault": { @@ -11374,7 +11622,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output from the DescribeOrderableClusterOptions\n action.

" + "smithy.api#documentation": "

Contains the output from the DescribeOrderableClusterOptions\n action.

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#Parameter": { @@ -11844,7 +12093,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#PurchaseReservedNodeOfferingResult": { @@ -11890,7 +12140,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#RebootClusterResult": { @@ -12385,52 +12636,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -12438,13 +12693,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -12454,92 +12718,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://redshift-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://redshift-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -12548,155 +12803,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://redshift.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://redshift-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://redshift.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://redshift-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://redshift.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://redshift.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://redshift.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://redshift.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -13420,6 +13635,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#ReservedNode": { @@ -13875,7 +14093,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#ReservedNodeQuotaExceededFault": { @@ -13912,7 +14131,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#ResetClusterParameterGroup": { @@ -13960,7 +14180,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#ResizeCluster": { @@ -14566,7 +14787,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#RestoreFromClusterSnapshotResult": { @@ -14728,7 +14950,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#RestoreTableFromClusterSnapshotResult": { @@ -14879,7 +15102,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#RevokeClusterSecurityGroupIngressResult": { @@ -14956,6 +15180,9 @@ "smithy.api#documentation": "

Indicates whether to force the revoke action. \n If true, the Redshift-managed VPC endpoints associated with the endpoint authorization are also deleted.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#RevokeSnapshotAccess": { @@ -15014,7 +15241,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#RevokeSnapshotAccessResult": { @@ -15063,7 +15291,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.redshift#RotateEncryptionKeyResult": { @@ -15454,6 +15683,9 @@ "smithy.api#documentation": "

List of retrieved scheduled actions.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#ScheduledSnapshotTimeList": { @@ -15837,7 +16069,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#SnapshotCopyGrantNotFoundFault": { @@ -15941,7 +16174,8 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the output from the DescribeClusterSnapshots action.\n

" + "smithy.api#documentation": "

Contains the output from the DescribeClusterSnapshots action.\n

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#SnapshotSchedule": { @@ -16535,7 +16769,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#TableRestoreStatusType": { @@ -16689,7 +16924,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#output": {} } }, "com.amazonaws.redshift#TrackList": { @@ -16716,6 +16952,9 @@ "smithy.api#documentation": "

The starting point to return a set of response tracklist records. You can retrieve the\n next set of response records by providing the returned marker value in the\n Marker parameter and retrying the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.redshift#UnauthorizedOperation": { @@ -16870,6 +17109,9 @@ "smithy.api#documentation": "

The status message provided by the partner.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.redshift#UpdateTarget": { diff --git a/codegen/sdk-codegen/aws-models/resiliencehub.json b/codegen/sdk-codegen/aws-models/resiliencehub.json index a8cfaef70c8..6f00feb405b 100644 --- a/codegen/sdk-codegen/aws-models/resiliencehub.json +++ b/codegen/sdk-codegen/aws-models/resiliencehub.json @@ -1216,52 +1216,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1269,13 +1273,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1285,224 +1298,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://resiliencehub-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://resiliencehub-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://resiliencehub-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://resiliencehub-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://resiliencehub.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://resiliencehub.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://resiliencehub.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://resiliencehub.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/resource-explorer-2.json b/codegen/sdk-codegen/aws-models/resource-explorer-2.json index 9363c532738..15b7e34953b 100644 --- a/codegen/sdk-codegen/aws-models/resource-explorer-2.json +++ b/codegen/sdk-codegen/aws-models/resource-explorer-2.json @@ -1432,18 +1432,28 @@ ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1451,19 +1461,35 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ + true, { - "ref": "Region" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] } - ], - "assign": "PartitionResult" + ] } ], "type": "tree", "rules": [ { - "conditions": [], + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], "type": "tree", "rules": [ { @@ -1478,7 +1504,7 @@ { "ref": "PartitionResult" }, - "supportsDualStack" + "supportsFIPS" ] } ] @@ -1486,62 +1512,10 @@ ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://resource-explorer-2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, { "conditions": [], "endpoint": { - "url": "https://resource-explorer-2.{Region}.{PartitionResult#dualStackDnsSuffix}", + "url": "https://resource-explorer-2-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, @@ -1551,95 +1525,91 @@ }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://resource-explorer-2.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ + "fn": "getAttr", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://resource-explorer-2-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "ref": "PartitionResult" }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://resource-explorer-2.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsFIPS" ] } ] } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://resource-explorer-2-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://resource-explorer-2.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1752,6 +1722,12 @@ "UseFIPS": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/resource-groups-tagging-api.json b/codegen/sdk-codegen/aws-models/resource-groups-tagging-api.json index ad7c41d5ddf..7992be145fd 100644 --- a/codegen/sdk-codegen/aws-models/resource-groups-tagging-api.json +++ b/codegen/sdk-codegen/aws-models/resource-groups-tagging-api.json @@ -88,7 +88,7 @@ } }, "traits": { - "smithy.api#documentation": "

The request was denied because performing this operation violates a constraint.

\n

Some of the reasons in the following list might not apply to this specific\n operation.

\n
    \n
  • \n

    You must meet the prerequisites for using tag policies. For information, see\n Prerequisites and Permissions for Using Tag Policies in the\n Organizations User Guide.\n

    \n
  • \n
  • \n

    You must enable the tag policies service principal\n (tagpolicies.tag.amazonaws.com) to integrate with Organizations For\n information, see EnableAWSServiceAccess.

    \n
  • \n
  • \n

    You must have a tag policy attached to the organization root, an OU, or an\n account.

    \n
  • \n
", + "smithy.api#documentation": "

The request was denied because performing this operation violates a constraint.

\n

Some of the reasons in the following list might not apply to this specific\n operation.

\n
    \n
  • \n

    You must meet the prerequisites for using tag policies. For information, see\n Prerequisites and Permissions for Using Tag Policies in the\n Organizations User Guide.\n

    \n
  • \n
  • \n

    You must enable the tag policies service principal\n (tagpolicies.tag.amazonaws.com) to integrate with Organizations For\n information, see EnableAWSServiceAccess.

    \n
  • \n
  • \n

    You must have a tag policy attached to the organization root, an OU, or an\n account.

    \n
  • \n
", "smithy.api#error": "client" } }, @@ -115,12 +115,15 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the status of the StartReportCreation operation.

\n

You can call this operation only from the organization's \n management account and from the us-east-1 Region.

" + "smithy.api#documentation": "

Describes the status of the StartReportCreation operation.

\n

You can call this operation only from the organization's \n management account and from the us-east-1 Region.

" } }, "com.amazonaws.resourcegroupstaggingapi#DescribeReportCreationInput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.resourcegroupstaggingapi#DescribeReportCreationOutput": { "type": "structure", @@ -128,7 +131,7 @@ "Status": { "target": "com.amazonaws.resourcegroupstaggingapi#Status", "traits": { - "smithy.api#documentation": "

Reports the status of the operation.

\n

The operation status can be one of the following:

\n
    \n
  • \n

    \n RUNNING - Report creation is in progress.

    \n
  • \n
  • \n

    \n SUCCEEDED - Report creation is complete. You can open the report\n from the Amazon S3 bucket that you specified when you ran\n StartReportCreation.

    \n
  • \n
  • \n

    \n FAILED - Report creation timed out or the Amazon S3 bucket is not\n accessible.

    \n
  • \n
  • \n

    \n NO REPORT - No report was generated in the last 90 days.

    \n
  • \n
" + "smithy.api#documentation": "

Reports the status of the operation.

\n

The operation status can be one of the following:

\n
    \n
  • \n

    \n RUNNING - Report creation is in progress.

    \n
  • \n
  • \n

    \n SUCCEEDED - Report creation is complete. You can open the report\n from the Amazon S3 bucket that you specified when you ran\n StartReportCreation.

    \n
  • \n
  • \n

    \n FAILED - Report creation timed out or the Amazon S3 bucket is not\n accessible.

    \n
  • \n
  • \n

    \n NO REPORT - No report was generated in the last 90 days.

    \n
  • \n
" } }, "S3Location": { @@ -149,21 +152,26 @@ "smithy.api#documentation": "

Details of the common errors that all operations return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroupstaggingapi#ErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "InternalServiceException", - "name": "INTERNAL_SERVICE_EXCEPTION" - }, - { - "value": "InvalidParameterException", - "name": "INVALID_PARAMETER_EXCEPTION" + "type": "enum", + "members": { + "INTERNAL_SERVICE_EXCEPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalServiceException" + } + }, + "INVALID_PARAMETER_EXCEPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidParameterException" } - ] + } } }, "com.amazonaws.resourcegroupstaggingapi#ErrorMessage": { @@ -214,7 +222,7 @@ } }, "traits": { - "smithy.api#documentation": "

Information about the errors that are returned for each failed resource. This\n information can include InternalServiceException and\n InvalidParameterException errors. It can also include any valid error\n code returned by the Amazon Web Services service that hosts the resource that the ARN key\n represents.

\n

The following are common error codes that you might receive from other Amazon Web Services\n services:

\n
    \n
  • \n

    \n InternalServiceException – This can\n mean that the Resource Groups Tagging API didn't receive a response from another Amazon Web Services service. It\n can also mean that the resource type in the request is not supported by the\n Resource Groups Tagging API. In these cases, it's safe to retry the request and then call GetResources to verify the changes.

    \n
  • \n
  • \n

    \n AccessDeniedException – This can mean\n that you need permission to call the tagging operations in the Amazon Web Services service\n that contains the resource. For example, to use the Resource Groups Tagging API to tag a Amazon CloudWatch\n alarm resource, you need permission to call both \n TagResources\n \n and\n \n TagResource\n in the CloudWatch API.

    \n
  • \n
\n

For more information on errors that are generated from other Amazon Web Services services, see the\n documentation for that service.

" + "smithy.api#documentation": "

Information about the errors that are returned for each failed resource. This\n information can include InternalServiceException and\n InvalidParameterException errors. It can also include any valid error\n code returned by the Amazon Web Services service that hosts the resource that the ARN key\n represents.

\n

The following are common error codes that you might receive from other Amazon Web Services\n services:

\n
    \n
  • \n

    \n InternalServiceException – This can\n mean that the Resource Groups Tagging API didn't receive a response from another Amazon Web Services service. It\n can also mean that the resource type in the request is not supported by the\n Resource Groups Tagging API. In these cases, it's safe to retry the request and then call GetResources to verify the changes.

    \n
  • \n
  • \n

    \n AccessDeniedException – This can mean\n that you need permission to call the tagging operations in the Amazon Web Services service\n that contains the resource. For example, to use the Resource Groups Tagging API to tag a Amazon CloudWatch\n alarm resource, you need permission to call both \n TagResources\n \n and\n \n TagResource\n in the CloudWatch API.

    \n
  • \n
\n

For more information on errors that are generated from other Amazon Web Services services, see the\n documentation for that service.

" } }, "com.amazonaws.resourcegroupstaggingapi#GetComplianceSummary": { @@ -240,7 +248,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a table that shows counts of resources that are noncompliant with their tag\n policies.

\n

For more information on tag policies, see Tag Policies in\n the Organizations User Guide.\n

\n

You can call this operation only from the organization's \n management account and from the us-east-1 Region.

\n

This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

", + "smithy.api#documentation": "

Returns a table that shows counts of resources that are noncompliant with their tag\n policies.

\n

For more information on tag policies, see Tag Policies in\n the Organizations User Guide.\n

\n

You can call this operation only from the organization's \n management account and from the us-east-1 Region.

\n

This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

", "smithy.api#paginated": { "inputToken": "PaginationToken", "outputToken": "PaginationToken", @@ -267,7 +275,7 @@ "ResourceTypeFilters": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceTypeFilterList", "traits": { - "smithy.api#documentation": "

Specifies that you want the response to include information for only resources of the\n specified types. The format of each resource type is\n service[:resourceType]. For example, specifying a resource type of\n ec2 returns all Amazon EC2 resources (which includes EC2 instances).\n Specifying a resource type of ec2:instance returns only EC2\n instances.

\n

The string for each service name and resource type is the same as that embedded in a\n resource's Amazon Resource Name (ARN). Consult the \n Amazon Web Services General Reference\n \n for the following:

\n \n

You can specify multiple resource types by using a comma separated array. The array\n can include up to 100 items. Note that the length constraint requirement applies to each\n resource type filter.

" + "smithy.api#documentation": "

Specifies that you want the response to include information for only resources of the\n specified types. The format of each resource type is\n service[:resourceType]. For example, specifying a resource type of\n ec2 returns all Amazon EC2 resources (which includes EC2 instances).\n Specifying a resource type of ec2:instance returns only EC2\n instances.

\n

The string for each service name and resource type is the same as that embedded in a\n resource's Amazon Resource Name (ARN). Consult the \n Amazon Web Services General Reference\n \n for the following:

\n \n

You can specify multiple resource types by using a comma separated array. The array\n can include up to 100 items. Note that the length constraint requirement applies to each\n resource type filter.

" } }, "TagKeyFilters": { @@ -294,6 +302,9 @@ "smithy.api#documentation": "

Specifies a PaginationToken response value from a \n previous request to indicate that you want the next page of results. Leave this parameter empty \n in your initial request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroupstaggingapi#GetComplianceSummaryOutput": { @@ -311,6 +322,9 @@ "smithy.api#documentation": "

A string that indicates that there is more data available than this\n response contains. To receive the next part of the response, specify this response value \n as the PaginationToken value in the request for the next page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroupstaggingapi#GetResources": { @@ -336,7 +350,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns all the tagged or previously tagged resources that are located in the\n specified Amazon Web Services Region for the account.

\n

Depending on what information you want returned, you can also specify the\n following:

\n
    \n
  • \n

    \n Filters that specify what tags and resource types you\n want returned. The response includes all tags that are associated with the\n requested resources.

    \n
  • \n
  • \n

    Information about compliance with the account's effective tag policy. For more\n information on tag policies, see Tag\n Policies in the Organizations User Guide.\n

    \n
  • \n
\n

This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

", + "smithy.api#documentation": "

Returns all the tagged or previously tagged resources that are located in the\n specified Amazon Web Services Region for the account.

\n

Depending on what information you want returned, you can also specify the\n following:

\n
    \n
  • \n

    \n Filters that specify what tags and resource types you\n want returned. The response includes all tags that are associated with the\n requested resources.

    \n
  • \n
  • \n

    Information about compliance with the account's effective tag policy. For more\n information on tag policies, see Tag\n Policies in the Organizations User Guide.\n

    \n
  • \n
\n

This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

", "smithy.api#paginated": { "inputToken": "PaginationToken", "outputToken": "PaginationToken", @@ -357,7 +371,7 @@ "TagFilters": { "target": "com.amazonaws.resourcegroupstaggingapi#TagFilterList", "traits": { - "smithy.api#documentation": "

Specifies a list of TagFilters (keys and values) to restrict the output to only those\n resources that have tags with the specified keys and, if included, the specified values.\n Each TagFilter must contain a key with values optional. A request can\n include up to 50 keys, and each key can include up to 20 values.

\n

Note the following when deciding how to use TagFilters:

\n
    \n
  • \n

    If you don't specify a TagFilter, the\n response includes all resources that are currently tagged or ever had a tag.\n Resources that currently don't have tags are shown with an empty tag set, like\n this: \"Tags\": [].

    \n
  • \n
  • \n

    If you specify more than one filter in a single request, the response returns\n only those resources that satisfy all filters.

    \n
  • \n
  • \n

    If you specify a filter that contains more than one value for a key, the\n response returns resources that match any of the specified\n values for that key.

    \n
  • \n
  • \n

    If you don't specify a value for a key, the response returns all resources\n that are tagged with that key, with any or no value.

    \n

    For example, for the following filters: filter1= {keyA,{value1}},\n filter2={keyB,{value2,value3,value4}}, filter3=\n {keyC}:

    \n
      \n
    • \n

      \n GetResources({filter1}) returns resources tagged with\n key1=value1\n

      \n
    • \n
    • \n

      \n GetResources({filter2}) returns resources tagged with\n key2=value2 or key2=value3 or\n key2=value4\n

      \n
    • \n
    • \n

      \n GetResources({filter3}) returns resources tagged with any\n tag with the key key3, and with any or no value

      \n
    • \n
    • \n

      \n GetResources({filter1,filter2,filter3}) returns resources\n tagged with (key1=value1) and (key2=value2 or key2=value3 or\n key2=value4) and (key3, any or no value)\n

      \n
    • \n
    \n
  • \n
" + "smithy.api#documentation": "

Specifies a list of TagFilters (keys and values) to restrict the output to only those\n resources that have tags with the specified keys and, if included, the specified values.\n Each TagFilter must contain a key with values optional. A request can\n include up to 50 keys, and each key can include up to 20 values.

\n

Note the following when deciding how to use TagFilters:

\n
    \n
  • \n

    If you don't specify a TagFilter, the\n response includes all resources that are currently tagged or ever had a tag.\n Resources that currently don't have tags are shown with an empty tag set, like\n this: \"Tags\": [].

    \n
  • \n
  • \n

    If you specify more than one filter in a single request, the response returns\n only those resources that satisfy all filters.

    \n
  • \n
  • \n

    If you specify a filter that contains more than one value for a key, the\n response returns resources that match any of the specified\n values for that key.

    \n
  • \n
  • \n

    If you don't specify a value for a key, the response returns all resources\n that are tagged with that key, with any or no value.

    \n

    For example, for the following filters: filter1= {keyA,{value1}},\n filter2={keyB,{value2,value3,value4}}, filter3=\n {keyC}:

    \n
      \n
    • \n

      \n GetResources({filter1}) returns resources tagged with\n key1=value1\n

      \n
    • \n
    • \n

      \n GetResources({filter2}) returns resources tagged with\n key2=value2 or key2=value3 or\n key2=value4\n

      \n
    • \n
    • \n

      \n GetResources({filter3}) returns resources tagged with any\n tag with the key key3, and with any or no value

      \n
    • \n
    • \n

      \n GetResources({filter1,filter2,filter3}) returns resources\n tagged with (key1=value1) and (key2=value2 or key2=value3 or\n key2=value4) and (key3, any or no value)\n

      \n
    • \n
    \n
  • \n
" } }, "ResourcesPerPage": { @@ -369,13 +383,13 @@ "TagsPerPage": { "target": "com.amazonaws.resourcegroupstaggingapi#TagsPerPage", "traits": { - "smithy.api#documentation": "

Amazon Web Services recommends using ResourcesPerPage instead of this parameter.

\n

A limit that restricts the number of tags (key and value pairs) returned by\n GetResources in paginated output. A resource with no tags is counted as\n having one tag (one key and value pair).

\n

\n GetResources does not split a resource and its associated tags across\n pages. If the specified TagsPerPage would cause such a break, a\n PaginationToken is returned in place of the affected resource and its\n tags. Use that token in another request to get the remaining data. For example, if you\n specify a TagsPerPage of 100 and the account has 22 resources\n with 10 tags each (meaning that each resource has 10 key and value pairs), the output\n will consist of three pages. The first page displays the first 10 resources, each with\n its 10 tags. The second page displays the next 10 resources, each with its 10 tags. The\n third page displays the remaining 2 resources, each with its 10 tags.

\n

You can set TagsPerPage to a minimum of 100 items up to a maximum of 500\n items.

" + "smithy.api#documentation": "

Amazon Web Services recommends using ResourcesPerPage instead of this parameter.

\n

A limit that restricts the number of tags (key and value pairs) returned by\n GetResources in paginated output. A resource with no tags is counted as\n having one tag (one key and value pair).

\n

\n GetResources does not split a resource and its associated tags across\n pages. If the specified TagsPerPage would cause such a break, a\n PaginationToken is returned in place of the affected resource and its\n tags. Use that token in another request to get the remaining data. For example, if you\n specify a TagsPerPage of 100 and the account has 22 resources\n with 10 tags each (meaning that each resource has 10 key and value pairs), the output\n will consist of three pages. The first page displays the first 10 resources, each with\n its 10 tags. The second page displays the next 10 resources, each with its 10 tags. The\n third page displays the remaining 2 resources, each with its 10 tags.

\n

You can set TagsPerPage to a minimum of 100 items up to a maximum of 500\n items.

" } }, "ResourceTypeFilters": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceTypeFilterList", "traits": { - "smithy.api#documentation": "

Specifies the resource types that you want included in the response. The format of\n each resource type is service[:resourceType]. For example, specifying a\n resource type of ec2 returns all Amazon EC2 resources (which includes EC2\n instances). Specifying a resource type of ec2:instance returns only EC2\n instances.

\n

The string for each service name and resource type is the same as that embedded in a\n resource's Amazon Resource Name (ARN). For the list of services whose resources you can\n use in this parameter, see Services that support the Resource Groups Tagging API.

\n

You can specify multiple resource types by using an array. The array can include up to\n 100 items. Note that the length constraint requirement applies to each resource type\n filter. For example, the following string would limit the response to only Amazon EC2\n instances, Amazon S3 buckets, or any Audit Manager resource:

\n

\n ec2:instance,s3:bucket,auditmanager\n

" + "smithy.api#documentation": "

Specifies the resource types that you want included in the response. The format of\n each resource type is service[:resourceType]. For example, specifying a\n resource type of ec2 returns all Amazon EC2 resources (which includes EC2\n instances). Specifying a resource type of ec2:instance returns only EC2\n instances.

\n

The string for each service name and resource type is the same as that embedded in a\n resource's Amazon Resource Name (ARN). For the list of services whose resources you can\n use in this parameter, see Services that support the Resource Groups Tagging API.

\n

You can specify multiple resource types by using an array. The array can include up to\n 100 items. Note that the length constraint requirement applies to each resource type\n filter. For example, the following string would limit the response to only Amazon EC2\n instances, Amazon S3 buckets, or any Audit Manager resource:

\n

\n ec2:instance,s3:bucket,auditmanager\n

" } }, "IncludeComplianceDetails": { @@ -387,15 +401,18 @@ "ExcludeCompliantResources": { "target": "com.amazonaws.resourcegroupstaggingapi#ExcludeCompliantResources", "traits": { - "smithy.api#documentation": "

Specifies whether to exclude resources that are compliant with the tag policy. Set\n this to true if you are interested in retrieving information on\n noncompliant resources only.

\n

You can use this parameter only if the IncludeComplianceDetails parameter\n is also set to true.

" + "smithy.api#documentation": "

Specifies whether to exclude resources that are compliant with the tag policy. Set\n this to true if you are interested in retrieving information on\n noncompliant resources only.

\n

You can use this parameter only if the IncludeComplianceDetails parameter\n is also set to true.

" } }, "ResourceARNList": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceARNListForGet", "traits": { - "smithy.api#documentation": "

Specifies a list of ARNs of resources for which you want to retrieve tag data. You\n can't specify both this parameter and any of the pagination parameters\n (ResourcesPerPage, TagsPerPage,\n PaginationToken) in the same request. If you specify both, you get an\n Invalid Parameter exception.

\n

If a resource specified by this parameter doesn't exist, it doesn't generate an error;\n it simply isn't included in the response.

\n

An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the\n Amazon Web Services General Reference.

" + "smithy.api#documentation": "

Specifies a list of ARNs of resources for which you want to retrieve tag data. You\n can't specify both this parameter and any of the pagination parameters\n (ResourcesPerPage, TagsPerPage,\n PaginationToken) in the same request. If you specify both, you get an\n Invalid Parameter exception.

\n

If a resource specified by this parameter doesn't exist, it doesn't generate an error;\n it simply isn't included in the response.

\n

An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the\n Amazon Web Services General Reference.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroupstaggingapi#GetResourcesOutput": { @@ -413,6 +430,9 @@ "smithy.api#documentation": "

A list of resource ARNs and the tags (keys and values) associated with \n each.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroupstaggingapi#GetTagKeys": { @@ -438,7 +458,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling\n account.

\n

This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

", + "smithy.api#documentation": "

Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling\n account.

\n

This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

", "smithy.api#paginated": { "inputToken": "PaginationToken", "outputToken": "PaginationToken", @@ -455,6 +475,9 @@ "smithy.api#documentation": "

Specifies a PaginationToken response value from a \n previous request to indicate that you want the next page of results. Leave this parameter empty \n in your initial request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroupstaggingapi#GetTagKeysOutput": { @@ -472,6 +495,9 @@ "smithy.api#documentation": "

A list of all tag keys in the Amazon Web Services account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroupstaggingapi#GetTagValues": { @@ -497,7 +523,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns all tag values for the specified key that are used in the specified Amazon Web Services\n Region for the calling account.

\n

This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

", + "smithy.api#documentation": "

Returns all tag values for the specified key that are used in the specified Amazon Web Services\n Region for the calling account.

\n

This operation supports pagination, where the response can be sent in \n multiple pages. You should check the PaginationToken response parameter to determine\n if there are additional results available to return. Repeat the query, passing the\n PaginationToken response parameter value as an input to the next request until you\n recieve a null value. A null value for PaginationToken indicates that\n there are no more results waiting to be returned.

", "smithy.api#paginated": { "inputToken": "PaginationToken", "outputToken": "PaginationToken", @@ -521,6 +547,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroupstaggingapi#GetTagValuesOutput": { @@ -538,6 +567,9 @@ "smithy.api#documentation": "

A list of all tag values for the specified key currently used in the specified Amazon Web Services\n Region for the calling account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroupstaggingapi#GroupBy": { @@ -547,22 +579,26 @@ } }, "com.amazonaws.resourcegroupstaggingapi#GroupByAttribute": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "TARGET_ID", - "name": "TARGET_ID" - }, - { - "value": "REGION", - "name": "REGION" - }, - { - "value": "RESOURCE_TYPE", - "name": "RESOURCE_TYPE" + "type": "enum", + "members": { + "TARGET_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TARGET_ID" } - ] + }, + "REGION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REGION" + } + }, + "RESOURCE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESOURCE_TYPE" + } + } } }, "com.amazonaws.resourcegroupstaggingapi#IncludeComplianceDetails": { @@ -588,7 +624,7 @@ } }, "traits": { - "smithy.api#documentation": "

This error indicates one of the following:

\n
    \n
  • \n

    A parameter is missing.

    \n
  • \n
  • \n

    A malformed string was supplied for the request parameter.

    \n
  • \n
  • \n

    An out-of-range value was supplied for the request parameter.

    \n
  • \n
  • \n

    The target ID is invalid, unsupported, or doesn't exist.

    \n
  • \n
  • \n

    You can't access the Amazon S3 bucket for report storage. For more information, see\n Additional Requirements for Organization-wide Tag Compliance\n Reports in the Organizations User Guide.\n

    \n
  • \n
", + "smithy.api#documentation": "

This error indicates one of the following:

\n
    \n
  • \n

    A parameter is missing.

    \n
  • \n
  • \n

    A malformed string was supplied for the request parameter.

    \n
  • \n
  • \n

    An out-of-range value was supplied for the request parameter.

    \n
  • \n
  • \n

    The target ID is invalid, unsupported, or doesn't exist.

    \n
  • \n
  • \n

    You can't access the Amazon S3 bucket for report storage. For more information, see\n Additional Requirements for Organization-wide Tag Compliance\n Reports in the Organizations User Guide.\n

    \n
  • \n
", "smithy.api#error": "client" } }, @@ -723,6 +759,7 @@ "arnNamespace": "tagging", "cloudFormationName": "ResourceGroupsTaggingAPI", "cloudTrailEventSource": "resourcegroupstaggingapi.amazonaws.com", + "docId": "resourcegroupstaggingapi-2017-01-26", "endpointPrefix": "tagging" }, "aws.auth#sigv4": { @@ -791,52 +828,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -844,13 +885,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -860,224 +910,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://tagging-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://tagging-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://tagging-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://tagging-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://tagging.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://tagging.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://tagging.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://tagging.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1092,8 +1093,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1105,8 +1106,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1118,8 +1119,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1131,8 +1132,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1144,8 +1145,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1157,8 +1158,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1170,8 +1171,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1183,8 +1184,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1196,8 +1197,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1209,8 +1210,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1222,8 +1223,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1235,8 +1236,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1248,8 +1249,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1261,8 +1262,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1274,8 +1275,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1287,8 +1288,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1300,8 +1301,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1313,8 +1314,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1326,8 +1327,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1339,8 +1340,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1352,8 +1353,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1365,8 +1366,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1378,8 +1379,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1391,8 +1392,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1404,8 +1405,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1417,8 +1418,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1430,8 +1431,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1443,8 +1444,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1456,8 +1457,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1469,8 +1470,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1482,8 +1483,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1495,8 +1496,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1508,8 +1509,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1521,8 +1522,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1534,8 +1535,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1547,8 +1548,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1560,8 +1572,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1573,8 +1596,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1586,8 +1620,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1599,8 +1644,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1612,8 +1657,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1624,8 +1669,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1636,10 +1681,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1729,7 +1780,7 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a report that lists all tagged resources in the accounts across your\n organization and tells whether each resource is compliant with the effective tag policy.\n Compliance data is refreshed daily. The report is generated asynchronously.

\n

The generated report is saved to the following location:

\n

\n s3://example-bucket/AwsTagPolicies/o-exampleorgid/YYYY-MM-ddTHH:mm:ssZ/report.csv\n

\n

You can call this operation only from the organization's \n management account and from the us-east-1 Region.

" + "smithy.api#documentation": "

Generates a report that lists all tagged resources in the accounts across your\n organization and tells whether each resource is compliant with the effective tag policy.\n Compliance data is refreshed daily. The report is generated asynchronously.

\n

The generated report is saved to the following location:

\n

\n s3://example-bucket/AwsTagPolicies/o-exampleorgid/YYYY-MM-ddTHH:mm:ssZ/report.csv\n

\n

You can call this operation only from the organization's \n management account and from the us-east-1 Region.

" } }, "com.amazonaws.resourcegroupstaggingapi#StartReportCreationInput": { @@ -1738,15 +1789,21 @@ "S3Bucket": { "target": "com.amazonaws.resourcegroupstaggingapi#S3Bucket", "traits": { - "smithy.api#documentation": "

The name of the Amazon S3 bucket where the report will be stored; for example:

\n

\n awsexamplebucket\n

\n

For more information on S3 bucket requirements, including an example bucket policy,\n see the example S3 bucket policy on this page.

", + "smithy.api#documentation": "

The name of the Amazon S3 bucket where the report will be stored; for example:

\n

\n awsexamplebucket\n

\n

For more information on S3 bucket requirements, including an example bucket policy,\n see the example S3 bucket policy on this page.

", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroupstaggingapi#StartReportCreationOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.resourcegroupstaggingapi#Status": { "type": "string" @@ -1943,7 +2000,7 @@ } ], "traits": { - "smithy.api#documentation": "

Applies one or more tags to the specified resources. Note the following:

\n
    \n
  • \n

    Not all resources can have tags. For a list of services with resources that\n support tagging using this operation, see Services that support the\n Resource Groups Tagging API. If the resource doesn't yet support\n this operation, the resource's service might support tagging using its own API\n operations. For more information, refer to the documentation for that\n service.

    \n
  • \n
  • \n

    Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the Amazon Web Services General\n Reference.\n

    \n
  • \n
  • \n

    You can only tag resources that are located in the specified Amazon Web Services Region for\n the Amazon Web Services account.

    \n
  • \n
  • \n

    To add tags to a resource, you need the necessary permissions for the service\n that the resource belongs to as well as permissions for adding tags. For more\n information, see the documentation for each service.

    \n
  • \n
\n \n

Do not store personally identifiable information (PII) or other confidential or\n sensitive information in tags. We use tags to provide you with billing and\n administration services. Tags are not intended to be used for private or sensitive\n data.

\n
\n

\n Minimum permissions\n

\n

In addition to the tag:TagResources permission required by this\n operation, you must also have the tagging permission defined by the service that created\n the resource. For example, to tag an Amazon EC2 instance using the TagResources\n operation, you must have both of the following permissions:

\n
    \n
  • \n

    \n tag:TagResource\n

    \n
  • \n
  • \n

    \n ec2:CreateTags\n

    \n
  • \n
" + "smithy.api#documentation": "

Applies one or more tags to the specified resources. Note the following:

\n
    \n
  • \n

    Not all resources can have tags. For a list of services with resources that\n support tagging using this operation, see Services that support the\n Resource Groups Tagging API. If the resource doesn't yet support\n this operation, the resource's service might support tagging using its own API\n operations. For more information, refer to the documentation for that\n service.

    \n
  • \n
  • \n

    Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the Amazon Web Services General\n Reference.\n

    \n
  • \n
  • \n

    You can only tag resources that are located in the specified Amazon Web Services Region for\n the Amazon Web Services account.

    \n
  • \n
  • \n

    To add tags to a resource, you need the necessary permissions for the service\n that the resource belongs to as well as permissions for adding tags. For more\n information, see the documentation for each service.

    \n
  • \n
\n \n

Do not store personally identifiable information (PII) or other confidential or\n sensitive information in tags. We use tags to provide you with billing and\n administration services. Tags are not intended to be used for private or sensitive\n data.

\n
\n

\n Minimum permissions\n

\n

In addition to the tag:TagResources permission required by this\n operation, you must also have the tagging permission defined by the service that created\n the resource. For example, to tag an Amazon EC2 instance using the TagResources\n operation, you must have both of the following permissions:

\n
    \n
  • \n

    \n tag:TagResource\n

    \n
  • \n
  • \n

    \n ec2:CreateTags\n

    \n
  • \n
" } }, "com.amazonaws.resourcegroupstaggingapi#TagResourcesInput": { @@ -1952,7 +2009,7 @@ "ResourceARNList": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceARNListForTagUntag", "traits": { - "smithy.api#documentation": "

Specifies the list of ARNs of the resources that you want to apply tags to.

\n

An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services\n General Reference.

", + "smithy.api#documentation": "

Specifies the list of ARNs of the resources that you want to apply tags to.

\n

An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services\n General Reference.

", "smithy.api#required": {} } }, @@ -1963,6 +2020,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroupstaggingapi#TagResourcesOutput": { @@ -1974,6 +2034,9 @@ "smithy.api#documentation": "

A map containing a key-value pair for each failed item that couldn't be tagged. The\n key is the ARN of the failed resource. The value is a FailureInfo object\n that contains an error code, a status code, and an error message. If there are no\n errors, the FailedResourcesMap is empty.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroupstaggingapi#TagValue": { @@ -2030,22 +2093,26 @@ } }, "com.amazonaws.resourcegroupstaggingapi#TargetIdType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACCOUNT", - "name": "ACCOUNT" - }, - { - "value": "OU", - "name": "OU" - }, - { - "value": "ROOT", - "name": "ROOT" + "type": "enum", + "members": { + "ACCOUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCOUNT" } - ] + }, + "OU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OU" + } + }, + "ROOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROOT" + } + } } }, "com.amazonaws.resourcegroupstaggingapi#ThrottledException": { @@ -2080,7 +2147,7 @@ } ], "traits": { - "smithy.api#documentation": "

Removes the specified tags from the specified resources. When you specify a tag key,\n the action removes both that key and its associated value. The operation succeeds even\n if you attempt to remove tags from a resource that were already removed. Note the\n following:

\n
    \n
  • \n

    To remove tags from a resource, you need the necessary permissions for the\n service that the resource belongs to as well as permissions for removing tags.\n For more information, see the documentation for the service whose resource you\n want to untag.

    \n
  • \n
  • \n

    You can only tag resources that are located in the specified Amazon Web Services Region for\n the calling Amazon Web Services account.

    \n
  • \n
\n \n

\n Minimum permissions\n

\n

In addition to the tag:UntagResources permission required by this\n operation, you must also have the remove tags permission defined by the service that\n created the resource. For example, to remove the tags from an Amazon EC2 instance using the\n UntagResources operation, you must have both of the following\n permissions:

\n
    \n
  • \n

    \n tag:UntagResource\n

    \n
  • \n
  • \n

    \n ec2:DeleteTags\n

    \n
  • \n
" + "smithy.api#documentation": "

Removes the specified tags from the specified resources. When you specify a tag key,\n the action removes both that key and its associated value. The operation succeeds even\n if you attempt to remove tags from a resource that were already removed. Note the\n following:

\n
    \n
  • \n

    To remove tags from a resource, you need the necessary permissions for the\n service that the resource belongs to as well as permissions for removing tags.\n For more information, see the documentation for the service whose resource you\n want to untag.

    \n
  • \n
  • \n

    You can only tag resources that are located in the specified Amazon Web Services Region for\n the calling Amazon Web Services account.

    \n
  • \n
\n

\n Minimum permissions\n

\n

In addition to the tag:UntagResources permission required by this\n operation, you must also have the remove tags permission defined by the service that\n created the resource. For example, to remove the tags from an Amazon EC2 instance using the\n UntagResources operation, you must have both of the following\n permissions:

\n
    \n
  • \n

    \n tag:UntagResource\n

    \n
  • \n
  • \n

    \n ec2:DeleteTags\n

    \n
  • \n
" } }, "com.amazonaws.resourcegroupstaggingapi#UntagResourcesInput": { @@ -2089,7 +2156,7 @@ "ResourceARNList": { "target": "com.amazonaws.resourcegroupstaggingapi#ResourceARNListForTagUntag", "traits": { - "smithy.api#documentation": "

Specifies a list of ARNs of the resources that you want to remove tags from.

\n

An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services\n General Reference.

", + "smithy.api#documentation": "

Specifies a list of ARNs of the resources that you want to remove tags from.

\n

An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,\n see Amazon\n Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services\n General Reference.

", "smithy.api#required": {} } }, @@ -2100,6 +2167,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroupstaggingapi#UntagResourcesOutput": { @@ -2111,6 +2181,9 @@ "smithy.api#documentation": "

A map containing a key-value pair for each failed item that couldn't be untagged. The\n key is the ARN of the failed resource. The value is a FailureInfo object\n that contains an error code, a status code, and an error message. If there are no\n errors, the FailedResourcesMap is empty.

" } } + }, + "traits": { + "smithy.api#output": {} } } } diff --git a/codegen/sdk-codegen/aws-models/resource-groups.json b/codegen/sdk-codegen/aws-models/resource-groups.json index 2525f71473c..150e56baee7 100644 --- a/codegen/sdk-codegen/aws-models/resource-groups.json +++ b/codegen/sdk-codegen/aws-models/resource-groups.json @@ -188,52 +188,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -241,13 +245,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -257,92 +270,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://resource-groups-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://resource-groups-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -351,155 +355,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://resource-groups.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://resource-groups-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://resource-groups.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://resource-groups-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://resource-groups.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://resource-groups.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://resource-groups.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://resource-groups.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -514,8 +478,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -527,8 +491,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -540,8 +504,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -553,8 +517,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -566,8 +530,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -579,8 +543,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -592,8 +556,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -605,8 +569,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -618,8 +582,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -631,8 +595,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -644,8 +608,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -657,8 +621,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -670,8 +634,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -683,8 +647,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -696,8 +660,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -709,8 +673,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -722,8 +686,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -735,8 +699,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -748,8 +712,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -761,8 +725,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -774,8 +738,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -787,8 +751,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -800,8 +764,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -813,8 +777,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -826,8 +790,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -839,8 +803,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -852,8 +816,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -865,8 +829,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -878,8 +842,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -891,8 +855,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -904,8 +868,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -917,8 +881,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -930,8 +894,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -943,8 +907,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -956,8 +920,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -969,8 +933,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -982,8 +946,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -995,8 +959,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1008,8 +972,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1021,8 +996,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1034,8 +1020,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1047,8 +1044,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1060,8 +1068,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1073,8 +1081,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1086,8 +1094,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1098,8 +1106,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1110,10 +1118,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1201,6 +1215,9 @@ "smithy.api#documentation": "

A configuration associates the resource group with an Amazon Web Services service and specifies how\n the service can interact with the resources in the group. A configuration is an array of\n GroupConfigurationItem elements. For details about the syntax of\n service configurations, see Service configurations for Resource Groups.

\n \n

A resource group can contain either a Configuration or a\n ResourceQuery, but not both.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#CreateGroupOutput": { @@ -1230,6 +1247,9 @@ "smithy.api#documentation": "

The service configuration associated with the resource group. For details about the\n syntax of a service configuration, see Service configurations for Resource Groups.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#DeleteGroup": { @@ -1287,6 +1307,9 @@ "smithy.api#documentation": "

The name or the ARN of the resource group to delete.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#DeleteGroupOutput": { @@ -1298,6 +1321,9 @@ "smithy.api#documentation": "

A full description of the deleted resource group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#Description": { @@ -1416,6 +1442,9 @@ "smithy.api#documentation": "

The current settings for the optional features in Resource Groups.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#GetGroup": { @@ -1501,6 +1530,9 @@ "smithy.api#documentation": "

The name or the ARN of the resource group for which you want to retrive the service\n configuration.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#GetGroupConfigurationOutput": { @@ -1512,6 +1544,9 @@ "smithy.api#documentation": "

A structure that describes the service configuration attached with the specified\n group. For details about the service configuration syntax, see Service configurations for\n Resource Groups.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#GetGroupInput": { @@ -1532,6 +1567,9 @@ "smithy.api#documentation": "

The name or the ARN of the resource group to retrieve.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#GetGroupOutput": { @@ -1543,6 +1581,9 @@ "smithy.api#documentation": "

A structure that contains the metadata details for the specified resource group. Use\n GetGroupQuery and GetGroupConfiguration to get\n those additional details of the resource group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#GetGroupQuery": { @@ -1600,6 +1641,9 @@ "smithy.api#documentation": "

The name or the ARN of the resource group to query.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#GetGroupQueryOutput": { @@ -1611,6 +1655,9 @@ "smithy.api#documentation": "

The resource query associated with the specified group. For more information about\n resource queries, see Create\n a tag-based group in Resource Groups.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#GetTags": { @@ -1661,6 +1708,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#GetTagsOutput": { @@ -1678,6 +1728,9 @@ "smithy.api#documentation": "

The tags associated with the specified resource group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#Group": { @@ -2112,6 +2165,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#GroupResourcesOutput": { @@ -2135,6 +2191,9 @@ "smithy.api#documentation": "

A list of ARNs of any resources that this operation is still in the process adding to\n the group. These pending additions continue asynchronously. You can check the status of\n pending additions by using the \n ListGroupResources\n \n operation, and checking the Resources array in the response and the\n Status field of each object in that array.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#GroupString": { @@ -2242,6 +2301,9 @@ "smithy.api#documentation": "

The parameter for receiving additional results if you receive a\nNextToken response in a previous request. A NextToken response \nindicates that more output is available. Set this parameter to the value provided by a previous \ncall's NextToken response to indicate where the output should continue from.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#ListGroupResourcesItem": { @@ -2297,6 +2359,9 @@ "smithy.api#documentation": "

A list of QueryError objects. Each error is an object that contains\n ErrorCode and Message structures. Possible values for\n ErrorCode are CLOUDFORMATION_STACK_INACTIVE and\n CLOUDFORMATION_STACK_NOT_EXISTING.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#ListGroups": { @@ -2362,6 +2427,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#ListGroupsOutput": { @@ -2388,6 +2456,9 @@ "smithy.api#documentation": "

If present, indicates that more output is available than is \nincluded in the current response. Use this value in the NextToken request parameter \nin a subsequent call to the operation to get the next part of the output. You should repeat this \nuntil the NextToken response element comes back as null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#MaxResults": { @@ -2507,11 +2578,17 @@ "smithy.api#documentation": "

The new configuration to associate with the specified group. A configuration\n associates the resource group with an Amazon Web Services service and specifies how the service can\n interact with the resources in the group. A configuration is an array of GroupConfigurationItem elements.

\n

For information about the syntax of a service configuration, see Service configurations for\n Resource Groups.

\n \n

A resource group can contain either a Configuration or a\n ResourceQuery, but not both.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#PutGroupConfigurationOutput": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.resourcegroups#Query": { "type": "string", @@ -2822,6 +2899,9 @@ "smithy.api#documentation": "

The parameter for receiving additional results if you receive a\nNextToken response in a previous request. A NextToken response \nindicates that more output is available. Set this parameter to the value provided by a previous \ncall's NextToken response to indicate where the output should continue from.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#SearchResourcesOutput": { @@ -2845,6 +2925,9 @@ "smithy.api#documentation": "

A list of QueryError objects. Each error is an object that contains\n ErrorCode and Message structures.

\n

Possible values for ErrorCode:

\n
    \n
  • \n

    \n CLOUDFORMATION_STACK_INACTIVE\n

    \n
  • \n
  • \n

    \n CLOUDFORMATION_STACK_NOT_EXISTING\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#Tag": { @@ -2902,6 +2985,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#TagKey": { @@ -2935,6 +3021,9 @@ "smithy.api#documentation": "

The tags that have been added to the specified resource group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#TagValue": { @@ -3036,6 +3125,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#UngroupResourcesOutput": { @@ -3059,6 +3151,9 @@ "smithy.api#documentation": "

A list of any resources that are still in the process of being removed from the group\n by this operation. These pending removals continue asynchronously. You can check the\n status of pending removals by using the \n ListGroupResources\n operation. After the resource is successfully removed, it no longer\n appears in the response.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#Untag": { @@ -3116,6 +3211,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#UntagOutput": { @@ -3133,6 +3231,9 @@ "smithy.api#documentation": "

The keys of the tags that were removed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#UpdateAccountSettings": { @@ -3178,6 +3279,9 @@ "smithy.api#documentation": "

Specifies whether you want to turn group lifecycle events on or off.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#UpdateAccountSettingsOutput": { @@ -3189,6 +3293,9 @@ "smithy.api#documentation": "

A structure that displays the status of the optional features in the account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#UpdateGroup": { @@ -3252,6 +3359,9 @@ "smithy.api#documentation": "

The new description that you want to update the resource group with. Descriptions can\n contain letters, numbers, hyphens, underscores, periods, and spaces.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#UpdateGroupOutput": { @@ -3263,6 +3373,9 @@ "smithy.api#documentation": "

The update description of the resource group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.resourcegroups#UpdateGroupQuery": { @@ -3327,6 +3440,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.resourcegroups#UpdateGroupQueryOutput": { @@ -3338,6 +3454,9 @@ "smithy.api#documentation": "

The updated resource query associated with the resource group after the update.

" } } + }, + "traits": { + "smithy.api#output": {} } } } diff --git a/codegen/sdk-codegen/aws-models/robomaker.json b/codegen/sdk-codegen/aws-models/robomaker.json index fe7edeae891..d0735e918bf 100644 --- a/codegen/sdk-codegen/aws-models/robomaker.json +++ b/codegen/sdk-codegen/aws-models/robomaker.json @@ -30,22 +30,26 @@ }, "shapes": { "com.amazonaws.robomaker#Architecture": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "X86_64", - "name": "X86_64" - }, - { - "value": "ARM64", - "name": "ARM64" - }, - { - "value": "ARMHF", - "name": "ARMHF" + "type": "enum", + "members": { + "X86_64": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "X86_64" + } + }, + "ARM64": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARM64" + } + }, + "ARMHF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARMHF" } - ] + } } }, "com.amazonaws.robomaker#Arn": { @@ -108,6 +112,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#BatchDeleteWorldsResponse": { @@ -119,6 +126,9 @@ "smithy.api#documentation": "

A list of unprocessed worlds associated with the call. These worlds were not\n deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#BatchDescribeSimulationJob": { @@ -162,6 +172,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#BatchDescribeSimulationJobResponse": { @@ -179,6 +192,9 @@ "smithy.api#documentation": "

A list of unprocessed simulation job Amazon Resource Names (ARNs).

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#BatchPolicy": { @@ -261,7 +277,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CancelDeploymentJobResponse": { @@ -270,7 +287,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CancelSimulationJob": { @@ -345,11 +363,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CancelSimulationJobBatchResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#CancelSimulationJobRequest": { "type": "structure", @@ -361,11 +385,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CancelSimulationJobResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#CancelWorldExportJob": { "type": "operation", @@ -408,11 +438,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CancelWorldExportJobResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#CancelWorldGenerationJob": { "type": "operation", @@ -455,11 +491,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CancelWorldGenerationJobResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#ClientRequestToken": { "type": "string", @@ -540,18 +582,20 @@ } }, "com.amazonaws.robomaker#ComputeType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CPU", - "name": "CPU" - }, - { - "value": "GPU_AND_CPU", - "name": "GPU_AND_CPU" + "type": "enum", + "members": { + "CPU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CPU" + } + }, + "GPU_AND_CPU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GPU_AND_CPU" } - ] + } } }, "com.amazonaws.robomaker#ConcurrentDeploymentException": { @@ -651,7 +695,8 @@ "traits": { "smithy.api#deprecated": { "message": "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateDeploymentJobResponse": { @@ -715,7 +760,8 @@ "traits": { "smithy.api#deprecated": { "message": "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateFleet": { @@ -772,7 +818,8 @@ "traits": { "smithy.api#deprecated": { "message": "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateFleetResponse": { @@ -806,7 +853,8 @@ "traits": { "smithy.api#deprecated": { "message": "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateRobot": { @@ -918,6 +966,9 @@ "smithy.api#documentation": "

The object that contains that URI of the Docker image that you use for your robot\n application.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateRobotApplicationResponse": { @@ -977,6 +1028,9 @@ "smithy.api#documentation": "

An object that contains the Docker image URI used to a create your robot\n application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateRobotApplicationVersion": { @@ -1041,6 +1095,9 @@ "smithy.api#documentation": "

A SHA256 identifier for the Docker image that you use for your robot application.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateRobotApplicationVersionResponse": { @@ -1094,6 +1151,9 @@ "smithy.api#documentation": "

The object that contains the Docker image URI used to create your robot\n application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateRobotRequest": { @@ -1130,7 +1190,8 @@ "traits": { "smithy.api#deprecated": { "message": "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateRobotResponse": { @@ -1176,7 +1237,8 @@ "traits": { "smithy.api#deprecated": { "message": "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateSimulationApplication": { @@ -1264,6 +1326,9 @@ "smithy.api#documentation": "

The object that contains the Docker image URI used to create your simulation\n application.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateSimulationApplicationResponse": { @@ -1335,6 +1400,9 @@ "smithy.api#documentation": "

The object that contains the Docker image URI that you used to create your simulation\n application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateSimulationApplicationVersion": { @@ -1399,6 +1467,9 @@ "smithy.api#documentation": "

The SHA256 digest used to identify the Docker image URI used to created the simulation\n application.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateSimulationApplicationVersionResponse": { @@ -1464,6 +1535,9 @@ "smithy.api#documentation": "

The object that contains the Docker image URI used to create the simulation\n application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateSimulationJob": { @@ -1585,6 +1659,9 @@ "smithy.api#documentation": "

Compute information for the simulation job.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateSimulationJobRequests": { @@ -1712,6 +1789,9 @@ "smithy.api#documentation": "

Compute information for the simulation job.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateWorldExportJob": { @@ -1787,6 +1867,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the world export\n job.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateWorldExportJobResponse": { @@ -1837,6 +1920,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the world export\n job.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateWorldGenerationJob": { @@ -1915,6 +2001,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the generated\n worlds.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateWorldGenerationJobResponse": { @@ -1974,6 +2063,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the generated\n worlds.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreateWorldTemplate": { @@ -2046,6 +2138,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the world\n template.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#CreateWorldTemplateResponse": { @@ -2081,6 +2176,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the world\n template.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#CreatedAt": { @@ -2184,22 +2282,26 @@ } }, "com.amazonaws.robomaker#DataSourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Prefix", - "name": "Prefix" - }, - { - "value": "Archive", - "name": "Archive" - }, - { - "value": "File", - "name": "File" + "type": "enum", + "members": { + "Prefix": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Prefix" } - ] + }, + "Archive": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Archive" + } + }, + "File": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "File" + } + } } }, "com.amazonaws.robomaker#DataSources": { @@ -2253,7 +2355,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DeleteFleetResponse": { @@ -2262,7 +2365,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DeleteRobot": { @@ -2340,11 +2444,17 @@ "smithy.api#documentation": "

The version of the robot application to delete.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DeleteRobotApplicationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#DeleteRobotRequest": { "type": "structure", @@ -2360,7 +2470,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DeleteRobotResponse": { @@ -2369,7 +2480,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DeleteSimulationApplication": { @@ -2416,11 +2528,17 @@ "smithy.api#documentation": "

The version of the simulation application to delete.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DeleteSimulationApplicationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#DeleteWorldTemplate": { "type": "operation", @@ -2463,11 +2581,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DeleteWorldTemplateResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#DeploymentApplicationConfig": { "type": "structure", @@ -2599,106 +2723,152 @@ } }, "com.amazonaws.robomaker#DeploymentJobErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ResourceNotFound", - "name": "ResourceNotFound" - }, - { - "value": "EnvironmentSetupError", - "name": "EnvironmentSetupError" - }, - { - "value": "EtagMismatch", - "name": "EtagMismatch" - }, - { - "value": "FailureThresholdBreached", - "name": "FailureThresholdBreached" - }, - { - "value": "RobotDeploymentAborted", - "name": "RobotDeploymentAborted" - }, - { - "value": "RobotDeploymentNoResponse", - "name": "RobotDeploymentNoResponse" - }, - { - "value": "RobotAgentConnectionTimeout", - "name": "RobotAgentConnectionTimeout" - }, - { - "value": "GreengrassDeploymentFailed", - "name": "GreengrassDeploymentFailed" - }, - { - "value": "InvalidGreengrassGroup", - "name": "InvalidGreengrassGroup" - }, - { - "value": "MissingRobotArchitecture", - "name": "MissingRobotArchitecture" - }, - { - "value": "MissingRobotApplicationArchitecture", - "name": "MissingRobotApplicationArchitecture" - }, - { - "value": "MissingRobotDeploymentResource", - "name": "MissingRobotDeploymentResource" - }, - { - "value": "GreengrassGroupVersionDoesNotExist", - "name": "GreengrassGroupVersionDoesNotExist" - }, - { - "value": "LambdaDeleted", - "name": "LambdaDeleted" - }, - { - "value": "ExtractingBundleFailure", - "name": "ExtractingBundleFailure" - }, - { - "value": "PreLaunchFileFailure", - "name": "PreLaunchFileFailure" - }, - { - "value": "PostLaunchFileFailure", - "name": "PostLaunchFileFailure" - }, - { - "value": "BadPermissionError", - "name": "BadPermissionError" - }, - { - "value": "DownloadConditionFailed", - "name": "DownloadConditionFailed" - }, - { - "value": "BadLambdaAssociated", - "name": "BadLambdaAssociated" - }, - { - "value": "InternalServerError", - "name": "InternalServerError" - }, - { - "value": "RobotApplicationDoesNotExist", - "name": "RobotApplicationDoesNotExist" - }, - { - "value": "DeploymentFleetDoesNotExist", - "name": "DeploymentFleetDoesNotExist" - }, - { - "value": "FleetDeploymentTimeout", - "name": "FleetDeploymentTimeout" + "type": "enum", + "members": { + "ResourceNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ResourceNotFound" + } + }, + "EnvironmentSetupError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EnvironmentSetupError" + } + }, + "EtagMismatch": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EtagMismatch" + } + }, + "FailureThresholdBreached": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FailureThresholdBreached" + } + }, + "RobotDeploymentAborted": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RobotDeploymentAborted" + } + }, + "RobotDeploymentNoResponse": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RobotDeploymentNoResponse" + } + }, + "RobotAgentConnectionTimeout": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RobotAgentConnectionTimeout" + } + }, + "GreengrassDeploymentFailed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GreengrassDeploymentFailed" + } + }, + "InvalidGreengrassGroup": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidGreengrassGroup" + } + }, + "MissingRobotArchitecture": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MissingRobotArchitecture" + } + }, + "MissingRobotApplicationArchitecture": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MissingRobotApplicationArchitecture" + } + }, + "MissingRobotDeploymentResource": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MissingRobotDeploymentResource" + } + }, + "GreengrassGroupVersionDoesNotExist": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GreengrassGroupVersionDoesNotExist" + } + }, + "LambdaDeleted": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LambdaDeleted" + } + }, + "ExtractingBundleFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ExtractingBundleFailure" + } + }, + "PreLaunchFileFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PreLaunchFileFailure" + } + }, + "PostLaunchFileFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PostLaunchFileFailure" + } + }, + "BadPermissionError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BadPermissionError" + } + }, + "DownloadConditionFailed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DownloadConditionFailed" + } + }, + "BadLambdaAssociated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BadLambdaAssociated" + } + }, + "InternalServerError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalServerError" + } + }, + "RobotApplicationDoesNotExist": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RobotApplicationDoesNotExist" } - ] + }, + "DeploymentFleetDoesNotExist": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DeploymentFleetDoesNotExist" + } + }, + "FleetDeploymentTimeout": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FleetDeploymentTimeout" + } + } } }, "com.amazonaws.robomaker#DeploymentJobs": { @@ -2754,34 +2924,44 @@ } }, "com.amazonaws.robomaker#DeploymentStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Pending", - "name": "Pending" - }, - { - "value": "Preparing", - "name": "Preparing" - }, - { - "value": "InProgress", - "name": "InProgress" - }, - { - "value": "Failed", - "name": "Failed" - }, - { - "value": "Succeeded", - "name": "Succeeded" - }, - { - "value": "Canceled", - "name": "Canceled" + "type": "enum", + "members": { + "Pending": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Pending" } - ] + }, + "Preparing": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Preparing" + } + }, + "InProgress": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InProgress" + } + }, + "Failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "Succeeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Succeeded" + } + }, + "Canceled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Canceled" + } + } } }, "com.amazonaws.robomaker#DeploymentTimeout": { @@ -2852,7 +3032,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DeregisterRobotResponse": { @@ -2874,7 +3055,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeDeploymentJob": { @@ -2925,7 +3107,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeDeploymentJobResponse": { @@ -2995,7 +3178,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeFleet": { @@ -3046,7 +3230,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeFleetResponse": { @@ -3104,7 +3289,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeRobot": { @@ -3188,6 +3374,9 @@ "smithy.api#documentation": "

The version of the robot application to describe.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeRobotApplicationResponse": { @@ -3253,6 +3442,9 @@ "smithy.api#documentation": "

A SHA256 identifier for the Docker image that you use for your robot application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeRobotRequest": { @@ -3269,7 +3461,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeRobotResponse": { @@ -3339,7 +3532,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeSimulationApplication": { @@ -3389,6 +3583,9 @@ "smithy.api#documentation": "

The version of the simulation application to describe.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeSimulationApplicationResponse": { @@ -3466,6 +3663,9 @@ "smithy.api#documentation": "

A SHA256 identifier for the Docker image that you use for your simulation\n application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeSimulationJob": { @@ -3537,6 +3737,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeSimulationJobBatchResponse": { @@ -3614,6 +3817,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the simulation job\n batch.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeSimulationJobRequest": { @@ -3626,6 +3832,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeSimulationJobResponse": { @@ -3759,6 +3968,9 @@ "smithy.api#documentation": "

Compute information for the simulation job.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeWorld": { @@ -3833,6 +4045,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeWorldExportJobResponse": { @@ -3895,6 +4110,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the world export\n job.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeWorldGenerationJob": { @@ -3938,6 +4156,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeWorldGenerationJobResponse": { @@ -4009,6 +4230,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the generated\n worlds.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeWorldRequest": { @@ -4021,6 +4245,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeWorldResponse": { @@ -4062,6 +4289,9 @@ "smithy.api#documentation": "

Returns the JSON formatted string that describes the contents of your world.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#DescribeWorldTemplate": { @@ -4105,6 +4335,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#DescribeWorldTemplateResponse": { @@ -4152,6 +4385,9 @@ "smithy.api#documentation": "

The version of the world template that you're using.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#Environment": { @@ -4204,18 +4440,20 @@ } }, "com.amazonaws.robomaker#ExitBehavior": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "FAIL", - "name": "FAIL" - }, - { - "value": "RESTART", - "name": "RESTART" + "type": "enum", + "members": { + "FAIL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAIL" + } + }, + "RESTART": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESTART" } - ] + } } }, "com.amazonaws.robomaker#FailedAt": { @@ -4260,18 +4498,20 @@ } }, "com.amazonaws.robomaker#FailureBehavior": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Fail", - "name": "Fail" - }, - { - "value": "Continue", - "name": "Continue" + "type": "enum", + "members": { + "Fail": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Fail" + } + }, + "Continue": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Continue" } - ] + } } }, "com.amazonaws.robomaker#FailureSummary": { @@ -4493,6 +4733,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (arn) of the world generator job.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#GetWorldTemplateBodyResponse": { @@ -4504,6 +4747,9 @@ "smithy.api#documentation": "

The world template body.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#IamRole": { @@ -4699,6 +4945,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "deploymentJobs", "pageSize": "maxResults" } } @@ -4728,7 +4975,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListDeploymentJobsResponse": { @@ -4750,7 +4998,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListFleets": { @@ -4788,6 +5037,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "fleetDetails", "pageSize": "maxResults" } } @@ -4817,7 +5067,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListFleetsResponse": { @@ -4839,7 +5090,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListRobotApplications": { @@ -4871,6 +5123,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "robotApplicationSummaries", "pageSize": "maxResults" } } @@ -4902,6 +5155,9 @@ "smithy.api#documentation": "

Optional filters to limit results.

\n

The filter name name is supported. When filtering, you must use the\n complete value of the filtered item. You can use up to three filters.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListRobotApplicationsResponse": { @@ -4919,6 +5175,9 @@ "smithy.api#documentation": "

If the previous paginated request did not return all of the remaining results, the\n response object's nextToken parameter value is set to a token. To retrieve the\n next set of results, call ListRobotApplications again and assign that token to\n the request object's nextToken parameter. If there are no remaining results,\n the previous response object's NextToken parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListRobots": { @@ -4956,6 +5215,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "robots", "pageSize": "maxResults" } } @@ -4985,7 +5245,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListRobotsResponse": { @@ -5007,7 +5268,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListSimulationApplications": { @@ -5039,6 +5301,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "simulationApplicationSummaries", "pageSize": "maxResults" } } @@ -5070,6 +5333,9 @@ "smithy.api#documentation": "

Optional list of filters to limit results.

\n

The filter name name is supported. When filtering, you must use the\n complete value of the filtered item. You can use up to three filters.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListSimulationApplicationsResponse": { @@ -5087,6 +5353,9 @@ "smithy.api#documentation": "

If the previous paginated request did not return all of the remaining results, the\n response object's nextToken parameter value is set to a token. To retrieve the\n next set of results, call ListSimulationApplications again and assign that\n token to the request object's nextToken parameter. If there are no remaining\n results, the previous response object's NextToken parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListSimulationJobBatches": { @@ -5115,6 +5384,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "simulationJobBatchSummaries", "pageSize": "maxResults" } } @@ -5140,6 +5410,9 @@ "smithy.api#documentation": "

Optional filters to limit results.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListSimulationJobBatchesResponse": { @@ -5157,6 +5430,9 @@ "smithy.api#documentation": "

If the previous paginated request did not return all of the remaining results, the\n response object's nextToken parameter value is set to a token. To retrieve the\n next set of results, call ListSimulationJobBatches again and assign that token\n to the request object's nextToken parameter. If there are no remaining\n results, the previous response object's NextToken parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListSimulationJobs": { @@ -5188,6 +5464,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "simulationJobSummaries", "pageSize": "maxResults" } } @@ -5213,6 +5490,9 @@ "smithy.api#documentation": "

Optional filters to limit results.

\n

The filter names status and simulationApplicationName and\n robotApplicationName are supported. When filtering, you must use the\n complete value of the filtered item. You can use up to three filters, but they must be for\n the same named item. For example, if you are looking for items with the status\n Preparing or the status Running.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListSimulationJobsResponse": { @@ -5231,6 +5511,9 @@ "smithy.api#documentation": "

If the previous paginated request did not return all of the remaining results, the\n response object's nextToken parameter value is set to a token. To retrieve the\n next set of results, call ListSimulationJobs again and assign that token to\n the request object's nextToken parameter. If there are no remaining results,\n the previous response object's NextToken parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListTagsForResource": { @@ -5275,6 +5558,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListTagsForResourceResponse": { @@ -5286,6 +5572,9 @@ "smithy.api#documentation": "

The list of all tags added to the specified resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListWorldExportJobs": { @@ -5317,6 +5606,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "worldExportJobSummaries", "pageSize": "maxResults" } } @@ -5342,6 +5632,9 @@ "smithy.api#documentation": "

Optional filters to limit results. You can use generationJobId and\n templateId.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListWorldExportJobsResponse": { @@ -5360,6 +5653,9 @@ "smithy.api#documentation": "

If the previous paginated request did not return all of the remaining results, the\n response object's nextToken parameter value is set to a token. To retrieve the\n next set of results, call ListWorldExportJobsRequest again and assign that\n token to the request object's nextToken parameter. If there are no remaining\n results, the previous response object's NextToken parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListWorldGenerationJobs": { @@ -5391,6 +5687,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "worldGenerationJobSummaries", "pageSize": "maxResults" } } @@ -5416,6 +5713,9 @@ "smithy.api#documentation": "

Optional filters to limit results. You can use status and\n templateId.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListWorldGenerationJobsResponse": { @@ -5434,6 +5734,9 @@ "smithy.api#documentation": "

If the previous paginated request did not return all of the remaining results, the\n response object's nextToken parameter value is set to a token. To retrieve the\n next set of results, call ListWorldGeneratorJobsRequest again and assign that\n token to the request object's nextToken parameter. If there are no remaining\n results, the previous response object's NextToken parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListWorldTemplates": { @@ -5465,6 +5768,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "templateSummaries", "pageSize": "maxResults" } } @@ -5484,6 +5788,9 @@ "smithy.api#documentation": "

When this parameter is used, ListWorldTemplates only returns\n maxResults results in a single page along with a nextToken\n response element. The remaining results of the initial request can be seen by sending\n another ListWorldTemplates request with the returned nextToken\n value. This value can be between 1 and 100. If this parameter is not used, then\n ListWorldTemplates returns up to 100 results and a nextToken\n value if applicable.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListWorldTemplatesResponse": { @@ -5501,6 +5808,9 @@ "smithy.api#documentation": "

If the previous paginated request did not return all of the remaining results, the\n response object's nextToken parameter value is set to a token. To retrieve the\n next set of results, call ListWorldTemplates again and assign that token to\n the request object's nextToken parameter. If there are no remaining results,\n the previous response object's NextToken parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#ListWorlds": { @@ -5532,6 +5842,7 @@ "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", + "items": "worldSummaries", "pageSize": "maxResults" } } @@ -5557,6 +5868,9 @@ "smithy.api#documentation": "

Optional filters to limit results. You can use status.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#ListWorldsResponse": { @@ -5574,6 +5888,9 @@ "smithy.api#documentation": "

If the previous paginated request did not return all of the remaining results, the\n response object's nextToken parameter value is set to a token. To retrieve the\n next set of results, call ListWorlds again and assign that token to the\n request object's nextToken parameter. If there are no remaining results, the\n previous response object's NextToken parameter is set to null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#LoggingConfig": { @@ -5870,7 +6187,8 @@ "traits": { "smithy.api#deprecated": { "message": "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#RegisterRobotResponse": { @@ -5892,7 +6210,8 @@ "traits": { "smithy.api#deprecated": { "message": "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#RenderingEngine": { @@ -5916,14 +6235,14 @@ } }, "com.amazonaws.robomaker#RenderingEngineType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "OGRE", - "name": "OGRE" + "type": "enum", + "members": { + "OGRE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OGRE" } - ] + } } }, "com.amazonaws.robomaker#RenderingEngineVersionType": { @@ -6016,11 +6335,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#RestartSimulationJobResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#RevisionId": { "type": "string", @@ -6271,38 +6596,50 @@ } }, "com.amazonaws.robomaker#RobotDeploymentStep": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Validating", - "name": "ValidatingStep" - }, - { - "value": "DownloadingExtracting", - "name": "DownloadingExtractingStep" - }, - { - "value": "ExecutingDownloadCondition", - "name": "ExecutingDownloadCondition" - }, - { - "value": "ExecutingPreLaunch", - "name": "PreLaunchStep" - }, - { - "value": "Launching", - "name": "LaunchingStep" - }, - { - "value": "ExecutingPostLaunch", - "name": "PostLaunchStep" - }, - { - "value": "Finished", - "name": "FinishedStep" + "type": "enum", + "members": { + "ValidatingStep": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Validating" + } + }, + "DownloadingExtractingStep": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DownloadingExtracting" + } + }, + "ExecutingDownloadCondition": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ExecutingDownloadCondition" + } + }, + "PreLaunchStep": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ExecutingPreLaunch" + } + }, + "LaunchingStep": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Launching" + } + }, + "PostLaunchStep": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ExecutingPostLaunch" + } + }, + "FinishedStep": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Finished" } - ] + } } }, "com.amazonaws.robomaker#RobotDeploymentSummary": { @@ -6332,80 +6669,102 @@ } }, "com.amazonaws.robomaker#RobotSoftwareSuiteType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ROS", - "name": "ROS" - }, - { - "value": "ROS2", - "name": "ROS2" - }, - { - "value": "General", - "name": "General" + "type": "enum", + "members": { + "ROS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROS" + } + }, + "ROS2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROS2" + } + }, + "General": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "General" } - ] + } } }, "com.amazonaws.robomaker#RobotSoftwareSuiteVersionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Kinetic", - "name": "Kinetic" - }, - { - "value": "Melodic", - "name": "Melodic" - }, - { - "value": "Dashing", - "name": "Dashing" - }, - { - "value": "Foxy", - "name": "Foxy" + "type": "enum", + "members": { + "Kinetic": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Kinetic" + } + }, + "Melodic": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Melodic" } - ] + }, + "Dashing": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Dashing" + } + }, + "Foxy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Foxy" + } + } } }, "com.amazonaws.robomaker#RobotStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Available", - "name": "Available" - }, - { - "value": "Registered", - "name": "Registered" - }, - { - "value": "PendingNewDeployment", - "name": "PendingNewDeployment" - }, - { - "value": "Deploying", - "name": "Deploying" - }, - { - "value": "Failed", - "name": "Failed" - }, - { - "value": "InSync", - "name": "InSync" - }, - { - "value": "NoResponse", - "name": "NoResponse" + "type": "enum", + "members": { + "Available": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Available" + } + }, + "Registered": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Registered" + } + }, + "PendingNewDeployment": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PendingNewDeployment" + } + }, + "Deploying": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Deploying" + } + }, + "Failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "InSync": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InSync" } - ] + }, + "NoResponse": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NoResponse" + } + } } }, "com.amazonaws.robomaker#Robots": { @@ -6825,87 +7184,103 @@ } }, "com.amazonaws.robomaker#SimulationJobBatchErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "InternalServiceError", - "name": "InternalServiceError" + "type": "enum", + "members": { + "InternalServiceError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalServiceError" } - ] + } } }, "com.amazonaws.robomaker#SimulationJobBatchStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Pending", - "name": "Pending" - }, - { - "value": "InProgress", - "name": "InProgress" - }, - { - "value": "Failed", - "name": "Failed" - }, - { - "value": "Completed", - "name": "Completed" - }, - { - "value": "Canceled", - "name": "Canceled" - }, - { - "value": "Canceling", - "name": "Canceling" - }, - { - "value": "Completing", - "name": "Completing" - }, - { - "value": "TimingOut", - "name": "TimingOut" - }, - { - "value": "TimedOut", - "name": "TimedOut" - } - ] - } - }, - "com.amazonaws.robomaker#SimulationJobBatchSummaries": { - "type": "list", - "member": { - "target": "com.amazonaws.robomaker#SimulationJobBatchSummary" - } - }, - "com.amazonaws.robomaker#SimulationJobBatchSummary": { - "type": "structure", + "type": "enum", "members": { - "arn": { - "target": "com.amazonaws.robomaker#Arn", + "Pending": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the batch.

" + "smithy.api#enumValue": "Pending" } }, - "lastUpdatedAt": { - "target": "com.amazonaws.robomaker#LastUpdatedAt", + "InProgress": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The time, in milliseconds since the epoch, when the simulation job batch was last\n updated.

" + "smithy.api#enumValue": "InProgress" } }, - "createdAt": { - "target": "com.amazonaws.robomaker#CreatedAt", + "Failed": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

The time, in milliseconds since the epoch, when the simulation job batch was\n created.

" + "smithy.api#enumValue": "Failed" } }, - "status": { + "Completed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completed" + } + }, + "Canceled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Canceled" + } + }, + "Canceling": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Canceling" + } + }, + "Completing": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completing" + } + }, + "TimingOut": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TimingOut" + } + }, + "TimedOut": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TimedOut" + } + } + } + }, + "com.amazonaws.robomaker#SimulationJobBatchSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.robomaker#SimulationJobBatchSummary" + } + }, + "com.amazonaws.robomaker#SimulationJobBatchSummary": { + "type": "structure", + "members": { + "arn": { + "target": "com.amazonaws.robomaker#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the batch.

" + } + }, + "lastUpdatedAt": { + "target": "com.amazonaws.robomaker#LastUpdatedAt", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds since the epoch, when the simulation job batch was last\n updated.

" + } + }, + "createdAt": { + "target": "com.amazonaws.robomaker#CreatedAt", + "traits": { + "smithy.api#documentation": "

The time, in milliseconds since the epoch, when the simulation job batch was\n created.

" + } + }, + "status": { "target": "com.amazonaws.robomaker#SimulationJobBatchStatus", "traits": { "smithy.api#documentation": "

The status of the simulation job batch.

\n
\n
Pending
\n
\n

The simulation job batch request is pending.

\n
\n
InProgress
\n
\n

The simulation job batch is in progress.

\n
\n
Failed
\n
\n

The simulation job batch failed. One or more simulation job requests could not\n be completed due to an internal failure (like InternalServiceError).\n See failureCode and failureReason for more\n information.

\n
\n
Completed
\n
\n

The simulation batch job completed. A batch is complete when (1) there are no\n pending simulation job requests in the batch and none of the failed simulation job\n requests are due to InternalServiceError and (2) when all created\n simulation jobs have reached a terminal state (for example, Completed\n or Failed).

\n
\n
Canceled
\n
\n

The simulation batch job was cancelled.

\n
\n
Canceling
\n
\n

The simulation batch job is being cancelled.

\n
\n
Completing
\n
\n

The simulation batch job is completing.

\n
\n
TimingOut
\n
\n

The simulation job batch is timing out.

\n

If a batch timing out, and there are pending requests that were failing due to\n an internal failure (like InternalServiceError), the batch status\n will be Failed. If there are no such failing request, the batch\n status will be TimedOut.

\n
\n
TimedOut
\n
\n

The simulation batch job timed out.

\n
\n
" @@ -6938,134 +7313,194 @@ } }, "com.amazonaws.robomaker#SimulationJobErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "InternalServiceError", - "name": "InternalServiceError" - }, - { - "value": "RobotApplicationCrash", - "name": "RobotApplicationCrash" - }, - { - "value": "SimulationApplicationCrash", - "name": "SimulationApplicationCrash" - }, - { - "value": "RobotApplicationHealthCheckFailure", - "name": "RobotApplicationHealthCheckFailure" - }, - { - "value": "SimulationApplicationHealthCheckFailure", - "name": "SimulationApplicationHealthCheckFailure" - }, - { - "value": "BadPermissionsRobotApplication", - "name": "BadPermissionsRobotApplication" - }, - { - "value": "BadPermissionsSimulationApplication", - "name": "BadPermissionsSimulationApplication" - }, - { - "value": "BadPermissionsS3Object", - "name": "BadPermissionsS3Object" - }, - { - "value": "BadPermissionsS3Output", - "name": "BadPermissionsS3Output" - }, - { - "value": "BadPermissionsCloudwatchLogs", - "name": "BadPermissionsCloudwatchLogs" - }, - { - "value": "SubnetIpLimitExceeded", - "name": "SubnetIpLimitExceeded" - }, - { - "value": "ENILimitExceeded", - "name": "ENILimitExceeded" - }, - { - "value": "BadPermissionsUserCredentials", - "name": "BadPermissionsUserCredentials" - }, - { - "value": "InvalidBundleRobotApplication", - "name": "InvalidBundleRobotApplication" - }, - { - "value": "InvalidBundleSimulationApplication", - "name": "InvalidBundleSimulationApplication" - }, - { - "value": "InvalidS3Resource", - "name": "InvalidS3Resource" - }, - { - "value": "ThrottlingError", - "name": "ThrottlingError" - }, - { - "value": "LimitExceeded", - "name": "LimitExceeded" - }, - { - "value": "MismatchedEtag", - "name": "MismatchedEtag" - }, - { - "value": "RobotApplicationVersionMismatchedEtag", - "name": "RobotApplicationVersionMismatchedEtag" - }, - { - "value": "SimulationApplicationVersionMismatchedEtag", - "name": "SimulationApplicationVersionMismatchedEtag" - }, - { - "value": "ResourceNotFound", - "name": "ResourceNotFound" - }, - { - "value": "RequestThrottled", - "name": "RequestThrottled" - }, - { - "value": "BatchTimedOut", - "name": "BatchTimedOut" - }, - { - "value": "BatchCanceled", - "name": "BatchCanceled" - }, - { - "value": "InvalidInput", - "name": "InvalidInput" - }, - { - "value": "WrongRegionS3Bucket", - "name": "WrongRegionS3Bucket" - }, - { - "value": "WrongRegionS3Output", - "name": "WrongRegionS3Output" - }, - { - "value": "WrongRegionRobotApplication", - "name": "WrongRegionRobotApplication" - }, - { - "value": "WrongRegionSimulationApplication", - "name": "WrongRegionSimulationApplication" - }, - { - "value": "UploadContentMismatchError", - "name": "UploadContentMismatchError" + "type": "enum", + "members": { + "InternalServiceError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalServiceError" + } + }, + "RobotApplicationCrash": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RobotApplicationCrash" + } + }, + "SimulationApplicationCrash": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SimulationApplicationCrash" + } + }, + "RobotApplicationHealthCheckFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RobotApplicationHealthCheckFailure" + } + }, + "SimulationApplicationHealthCheckFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SimulationApplicationHealthCheckFailure" + } + }, + "BadPermissionsRobotApplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BadPermissionsRobotApplication" + } + }, + "BadPermissionsSimulationApplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BadPermissionsSimulationApplication" + } + }, + "BadPermissionsS3Object": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BadPermissionsS3Object" + } + }, + "BadPermissionsS3Output": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BadPermissionsS3Output" + } + }, + "BadPermissionsCloudwatchLogs": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BadPermissionsCloudwatchLogs" + } + }, + "SubnetIpLimitExceeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SubnetIpLimitExceeded" + } + }, + "ENILimitExceeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENILimitExceeded" + } + }, + "BadPermissionsUserCredentials": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BadPermissionsUserCredentials" + } + }, + "InvalidBundleRobotApplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidBundleRobotApplication" + } + }, + "InvalidBundleSimulationApplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidBundleSimulationApplication" + } + }, + "InvalidS3Resource": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidS3Resource" + } + }, + "ThrottlingError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ThrottlingError" + } + }, + "LimitExceeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LimitExceeded" + } + }, + "MismatchedEtag": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MismatchedEtag" + } + }, + "RobotApplicationVersionMismatchedEtag": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RobotApplicationVersionMismatchedEtag" + } + }, + "SimulationApplicationVersionMismatchedEtag": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SimulationApplicationVersionMismatchedEtag" + } + }, + "ResourceNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ResourceNotFound" + } + }, + "RequestThrottled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RequestThrottled" + } + }, + "BatchTimedOut": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BatchTimedOut" + } + }, + "BatchCanceled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BatchCanceled" + } + }, + "InvalidInput": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidInput" + } + }, + "WrongRegionS3Bucket": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WrongRegionS3Bucket" } - ] + }, + "WrongRegionS3Output": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WrongRegionS3Output" + } + }, + "WrongRegionRobotApplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WrongRegionRobotApplication" + } + }, + "WrongRegionSimulationApplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WrongRegionSimulationApplication" + } + }, + "UploadContentMismatchError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UploadContentMismatchError" + } + } } }, "com.amazonaws.robomaker#SimulationJobRequest": { @@ -7142,50 +7577,68 @@ } }, "com.amazonaws.robomaker#SimulationJobStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Pending", - "name": "Pending" - }, - { - "value": "Preparing", - "name": "Preparing" - }, - { - "value": "Running", - "name": "Running" - }, - { - "value": "Restarting", - "name": "Restarting" - }, - { - "value": "Completed", - "name": "Completed" - }, - { - "value": "Failed", - "name": "Failed" - }, - { - "value": "RunningFailed", - "name": "RunningFailed" - }, - { - "value": "Terminating", - "name": "Terminating" - }, - { - "value": "Terminated", - "name": "Terminated" - }, - { - "value": "Canceled", - "name": "Canceled" + "type": "enum", + "members": { + "Pending": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Pending" + } + }, + "Preparing": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Preparing" + } + }, + "Running": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Running" } - ] + }, + "Restarting": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Restarting" + } + }, + "Completed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completed" + } + }, + "Failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "RunningFailed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RunningFailed" + } + }, + "Terminating": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Terminating" + } + }, + "Terminated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Terminated" + } + }, + "Canceled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Canceled" + } + } } }, "com.amazonaws.robomaker#SimulationJobSummaries": { @@ -7283,22 +7736,26 @@ } }, "com.amazonaws.robomaker#SimulationSoftwareSuiteType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Gazebo", - "name": "Gazebo" - }, - { - "value": "RosbagPlay", - "name": "RosbagPlay" - }, - { - "value": "SimulationRuntime", - "name": "SimulationRuntime" + "type": "enum", + "members": { + "Gazebo": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Gazebo" + } + }, + "RosbagPlay": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RosbagPlay" + } + }, + "SimulationRuntime": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SimulationRuntime" } - ] + } } }, "com.amazonaws.robomaker#SimulationSoftwareSuiteVersionType": { @@ -7459,6 +7916,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the deployment job\n batch.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#StartSimulationJobBatchResponse": { @@ -7530,6 +7990,9 @@ "smithy.api#documentation": "

A map that contains tag keys and tag values that are attached to the deployment job\n batch.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#Subnets": { @@ -7609,7 +8072,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#input": {} } }, "com.amazonaws.robomaker#SyncDeploymentJobResponse": { @@ -7667,7 +8131,8 @@ "traits": { "smithy.api#deprecated": { "message": "Support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html." - } + }, + "smithy.api#output": {} } }, "com.amazonaws.robomaker#TagKey": { @@ -7750,11 +8215,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#TagValue": { "type": "string", @@ -7967,11 +8438,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#UpdateRobotApplication": { "type": "operation", @@ -8042,6 +8519,9 @@ "smithy.api#documentation": "

The object that contains the Docker image URI for your robot application.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#UpdateRobotApplicationResponse": { @@ -8095,6 +8575,9 @@ "smithy.api#documentation": "

The object that contains the Docker image URI for your robot application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#UpdateSimulationApplication": { @@ -8179,6 +8662,9 @@ "smithy.api#documentation": "

The object that contains the Docker image URI for your simulation application.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#UpdateSimulationApplicationResponse": { @@ -8244,6 +8730,9 @@ "smithy.api#documentation": "

The object that contains the Docker image URI used for your simulation\n application.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.robomaker#UpdateWorldTemplate": { @@ -8305,6 +8794,9 @@ "smithy.api#documentation": "

The location of the world template.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.robomaker#UpdateWorldTemplateResponse": { @@ -8334,21 +8826,26 @@ "smithy.api#documentation": "

The time, in milliseconds since the epoch, when the world template was last\n updated.

" } } - } + }, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.robomaker#UploadBehavior": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "UPLOAD_ON_TERMINATE", - "name": "UPLOAD_ON_TERMINATE" - }, - { - "value": "UPLOAD_ROLLING_AUTO_REMOVE", - "name": "UPLOAD_ROLLING_AUTO_REMOVE" + "type": "enum", + "members": { + "UPLOAD_ON_TERMINATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPLOAD_ON_TERMINATE" + } + }, + "UPLOAD_ROLLING_AUTO_REMOVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPLOAD_ROLLING_AUTO_REMOVE" } - ] + } } }, "com.amazonaws.robomaker#UploadConfiguration": { @@ -8520,65 +9017,85 @@ } }, "com.amazonaws.robomaker#WorldExportJobErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "InternalServiceError", - "name": "InternalServiceError" - }, - { - "value": "LimitExceeded", - "name": "LimitExceeded" - }, - { - "value": "ResourceNotFound", - "name": "ResourceNotFound" - }, - { - "value": "RequestThrottled", - "name": "RequestThrottled" - }, - { - "value": "InvalidInput", - "name": "InvalidInput" - }, - { - "value": "AccessDenied", - "name": "AccessDenied" + "type": "enum", + "members": { + "InternalServiceError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalServiceError" + } + }, + "LimitExceeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LimitExceeded" } - ] + }, + "ResourceNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ResourceNotFound" + } + }, + "RequestThrottled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RequestThrottled" + } + }, + "InvalidInput": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidInput" + } + }, + "AccessDenied": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AccessDenied" + } + } } }, "com.amazonaws.robomaker#WorldExportJobStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Pending", - "name": "Pending" - }, - { - "value": "Running", - "name": "Running" - }, - { - "value": "Completed", - "name": "Completed" - }, - { - "value": "Failed", - "name": "Failed" - }, - { - "value": "Canceling", - "name": "Canceling" - }, - { - "value": "Canceled", - "name": "Canceled" + "type": "enum", + "members": { + "Pending": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Pending" + } + }, + "Running": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Running" } - ] + }, + "Completed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completed" + } + }, + "Failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "Canceling": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Canceling" + } + }, + "Canceled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Canceled" + } + } } }, "com.amazonaws.robomaker#WorldExportJobSummaries": { @@ -8668,69 +9185,91 @@ } }, "com.amazonaws.robomaker#WorldGenerationJobErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "InternalServiceError", - "name": "InternalServiceError" - }, - { - "value": "LimitExceeded", - "name": "LimitExceeded" - }, - { - "value": "ResourceNotFound", - "name": "ResourceNotFound" - }, - { - "value": "RequestThrottled", - "name": "RequestThrottled" - }, - { - "value": "InvalidInput", - "name": "InvalidInput" - }, - { - "value": "AllWorldGenerationFailed", - "name": "AllWorldGenerationFailed" + "type": "enum", + "members": { + "InternalServiceError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalServiceError" + } + }, + "LimitExceeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LimitExceeded" } - ] + }, + "ResourceNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ResourceNotFound" + } + }, + "RequestThrottled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RequestThrottled" + } + }, + "InvalidInput": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidInput" + } + }, + "AllWorldGenerationFailed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AllWorldGenerationFailed" + } + } } }, "com.amazonaws.robomaker#WorldGenerationJobStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Pending", - "name": "Pending" - }, - { - "value": "Running", - "name": "Running" - }, - { - "value": "Completed", - "name": "Completed" - }, - { - "value": "Failed", - "name": "Failed" - }, - { - "value": "PartialFailed", - "name": "PartialFailed" - }, - { - "value": "Canceling", - "name": "Canceling" - }, - { - "value": "Canceled", - "name": "Canceled" + "type": "enum", + "members": { + "Pending": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Pending" + } + }, + "Running": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Running" } - ] + }, + "Completed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completed" + } + }, + "Failed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "PartialFailed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PartialFailed" + } + }, + "Canceling": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Canceling" + } + }, + "Canceled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Canceled" + } + } } }, "com.amazonaws.robomaker#WorldGenerationJobSummaries": { @@ -9088,52 +9627,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -9141,13 +9684,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -9157,224 +9709,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://robomaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://robomaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://robomaker-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://robomaker-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://robomaker.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://robomaker.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://robomaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://robomaker.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -9389,8 +9892,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9402,8 +9905,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9415,8 +9918,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9428,8 +9931,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9441,8 +9944,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9454,8 +9957,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9467,8 +9970,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9480,8 +9983,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -9493,8 +9996,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -9506,8 +10009,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -9519,8 +10022,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -9532,8 +10035,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -9545,8 +10048,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -9558,8 +10061,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9571,8 +10074,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9584,8 +10087,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -9597,8 +10100,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -9610,8 +10113,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -9623,8 +10126,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -9636,8 +10150,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -9649,8 +10174,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -9662,8 +10198,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -9675,8 +10222,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -9688,8 +10235,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -9701,8 +10248,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -9713,8 +10260,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -9725,10 +10272,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/rolesanywhere.json b/codegen/sdk-codegen/aws-models/rolesanywhere.json index 9c734c6555c..04f5c106422 100644 --- a/codegen/sdk-codegen/aws-models/rolesanywhere.json +++ b/codegen/sdk-codegen/aws-models/rolesanywhere.json @@ -1735,52 +1735,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1788,13 +1792,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1804,224 +1817,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://rolesanywhere-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://rolesanywhere-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rolesanywhere-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://rolesanywhere-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rolesanywhere.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://rolesanywhere.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://rolesanywhere.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://rolesanywhere.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/route-53-domains.json b/codegen/sdk-codegen/aws-models/route-53-domains.json index 6b6b6756e5a..7a4006f5240 100644 --- a/codegen/sdk-codegen/aws-models/route-53-domains.json +++ b/codegen/sdk-codegen/aws-models/route-53-domains.json @@ -4899,6 +4899,7 @@ "arnNamespace": "route53domains", "cloudFormationName": "Route53Domains", "cloudTrailEventSource": "route53domains.amazonaws.com", + "docId": "route53domains-2014-05-15", "endpointPrefix": "route53domains" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/route-53.json b/codegen/sdk-codegen/aws-models/route-53.json index 388346dd5b7..cb171eb7c42 100644 --- a/codegen/sdk-codegen/aws-models/route-53.json +++ b/codegen/sdk-codegen/aws-models/route-53.json @@ -263,6 +263,7 @@ "arnNamespace": "route53", "cloudFormationName": "Route53", "cloudTrailEventSource": "route53.amazonaws.com", + "docId": "route53-2013-04-01", "endpointPrefix": "route53" }, "aws.auth#sigv4": { @@ -334,52 +335,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -387,597 +392,557 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://route53.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "route53", - "signingRegion": "us-east-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://route53.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-east-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://route53-fips.amazonaws.com", + "properties": { + "authSchemes": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-east-1" } - ], - "endpoint": { - "url": "https://route53-fips.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "route53", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-cn" + "name" ] }, + "aws-cn" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://route53.amazonaws.com.cn", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "route53", - "signingRegion": "cn-northwest-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://route53.amazonaws.com.cn", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "cn-northwest-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-us-gov" + "name" ] }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://route53.us-gov.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "route53", - "signingRegion": "us-gov-west-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://route53.us-gov.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-gov-west-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-us-gov" + "name" ] }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] + "ref": "UseFIPS" }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://route53.us-gov.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-gov-west-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", "argv": [ { - "ref": "UseDualStack" + "ref": "PartitionResult" }, - false - ] - } - ], - "endpoint": { - "url": "https://route53.us-gov.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "route53", - "signingRegion": "us-gov-west-1" - } + "name" ] }, - "headers": {} - }, - "type": "endpoint" + "aws-iso" + ] }, { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://route53.c2s.ic.gov", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-iso-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-iso" + "name" ] }, + "aws-iso-b" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://route53.sc2s.sgov.gov", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53", + "signingRegion": "us-isob-east-1" } - ], - "endpoint": { - "url": "https://route53.c2s.ic.gov", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "route53", - "signingRegion": "us-iso-east-1" - } - ] + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" }, - "headers": {} - }, - "type": "endpoint" + true + ] }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { - "fn": "stringEquals", + "fn": "booleanEquals", "argv": [ + true, { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "name" + "supportsFIPS" ] - }, - "aws-iso-b" - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://route53.sc2s.sgov.gov", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "route53", - "signingRegion": "us-isob-east-1" } ] }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://route53-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://route53.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://route53.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1753,6 +1718,28 @@ ], "traits": { "smithy.api#documentation": "

Associates an Amazon VPC with a private hosted zone.

\n \n

To perform the association, the VPC and the private hosted zone must already\n\t\t\t\texist. You can't convert a public hosted zone into a private hosted zone.

\n
\n \n

If you want to associate a VPC that was created by using one Amazon Web Services account with a private hosted zone that was created by using a\n\t\t\t\tdifferent account, the Amazon Web Services account that created the private hosted\n\t\t\t\tzone must first submit a CreateVPCAssociationAuthorization request.\n\t\t\t\tThen the account that created the VPC must submit an\n\t\t\t\t\tAssociateVPCWithHostedZone request.

\n
\n \n

When granting access, the hosted zone and the Amazon VPC must belong to\n\t\t\t\tthe same partition. A partition is a group of Amazon Web Services Regions. Each\n\t\t\t\t\tAmazon Web Services account is scoped to one partition.

\n

The following are the supported partitions:

\n
    \n
  • \n

    \n aws - Amazon Web Services Regions

    \n
  • \n
  • \n

    \n aws-cn - China Regions

    \n
  • \n
  • \n

    \n aws-us-gov - Amazon Web Services GovCloud (US) Region

    \n
  • \n
\n

For more information, see Access Management\n\t\t\t\tin the Amazon Web Services General Reference.

\n
", + "smithy.api#examples": [ + { + "title": "To associate a VPC with a hosted zone", + "documentation": "The following example associates the VPC with ID vpc-1a2b3c4d with the hosted zone with ID Z3M3LMPEXAMPLE.", + "input": { + "HostedZoneId": "Z3M3LMPEXAMPLE", + "VPC": { + "VPCId": "vpc-1a2b3c4d", + "VPCRegion": "us-east-2" + }, + "Comment": "" + }, + "output": { + "ChangeInfo": { + "Status": "INSYNC", + "Comment": "", + "SubmittedAt": "2017-01-31T01:36:41.958Z", + "Id": "/change/C3HC6WDB2UANE2" + } + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/hostedzone/{HostedZoneId}/associatevpc", @@ -2024,6 +2011,41 @@ ], "traits": { "smithy.api#documentation": "

Creates, changes, or deletes a resource record set, which contains authoritative DNS\n\t\t\tinformation for a specified domain name or subdomain name. For example, you can use\n\t\t\t\tChangeResourceRecordSets to create a resource record set that routes\n\t\t\ttraffic for test.example.com to a web server that has an IP address of\n\t\t\t192.0.2.44.

\n

\n Deleting Resource Record Sets\n

\n

To delete a resource record set, you must specify all the same values that you\n\t\t\tspecified when you created it.

\n

\n Change Batches and Transactional Changes\n

\n

The request body must include a document with a\n\t\t\t\tChangeResourceRecordSetsRequest element. The request body contains a\n\t\t\tlist of change items, known as a change batch. Change batches are considered\n\t\t\ttransactional changes. Route 53 validates the changes in the request and then either\n\t\t\tmakes all or none of the changes in the change batch request. This ensures that DNS\n\t\t\trouting isn't adversely affected by partial changes to the resource record sets in a\n\t\t\thosted zone.

\n

For example, suppose a change batch request contains two changes: it deletes the\n\t\t\t\tCNAME resource record set for www.example.com and creates an alias\n\t\t\tresource record set for www.example.com. If validation for both records succeeds, Route\n\t\t\t53 deletes the first resource record set and creates the second resource record set in a\n\t\t\tsingle operation. If validation for either the DELETE or the\n\t\t\t\tCREATE action fails, then the request is canceled, and the original\n\t\t\t\tCNAME record continues to exist.

\n \n

If you try to delete the same resource record set more than once in a single\n\t\t\t\tchange batch, Route 53 returns an InvalidChangeBatch error.

\n
\n

\n Traffic Flow\n

\n

To create resource record sets for complex routing configurations, use either the\n\t\t\ttraffic flow visual editor in the Route 53 console or the API actions for traffic\n\t\t\tpolicies and traffic policy instances. Save the configuration as a traffic policy, then\n\t\t\tassociate the traffic policy with one or more domain names (such as example.com) or\n\t\t\tsubdomain names (such as www.example.com), in the same hosted zone or in multiple hosted\n\t\t\tzones. You can roll back the updates if the new configuration isn't performing as\n\t\t\texpected. For more information, see Using Traffic Flow to Route\n\t\t\t\tDNS Traffic in the Amazon Route 53 Developer\n\t\t\tGuide.

\n

\n Create, Delete, and Upsert\n

\n

Use ChangeResourceRecordsSetsRequest to perform the following\n\t\t\tactions:

\n
    \n
  • \n

    \n CREATE: Creates a resource record set that has the specified\n\t\t\t\t\tvalues.

    \n
  • \n
  • \n

    \n DELETE: Deletes an existing resource record set that has the\n\t\t\t\t\tspecified values.

    \n
  • \n
  • \n

    \n UPSERT: If a resource set exists Route 53 updates it with the\n\t\t\t\t\tvalues in the request.

    \n
  • \n
\n

\n Syntaxes for Creating, Updating, and Deleting Resource Record\n\t\t\t\tSets\n

\n

The syntax for a request depends on the type of resource record set that you want to\n\t\t\tcreate, delete, or update, such as weighted, alias, or failover. The XML elements in\n\t\t\tyour request must appear in the order listed in the syntax.

\n

For an example for each type of resource record set, see \"Examples.\"

\n

Don't refer to the syntax in the \"Parameter Syntax\" section, which includes\n\t\t\tall of the elements for every kind of resource record set that you can create, delete,\n\t\t\tor update by using ChangeResourceRecordSets.

\n

\n Change Propagation to Route 53 DNS Servers\n

\n

When you submit a ChangeResourceRecordSets request, Route 53 propagates your\n\t\t\tchanges to all of the Route 53 authoritative DNS servers managing the hosted zone. While\n\t\t\tyour changes are propagating, GetChange returns a status of\n\t\t\t\tPENDING. When propagation is complete, GetChange returns a\n\t\t\tstatus of INSYNC. Changes generally propagate to all Route 53 name servers\n\t\t\tmanaging the hosted zone within 60 seconds. For more information, see GetChange.

\n

\n Limits on ChangeResourceRecordSets Requests\n

\n

For information about the limits on a ChangeResourceRecordSets request,\n\t\t\tsee Limits in the Amazon Route 53 Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create a basic resource record set", + "documentation": "The following example creates a resource record set that routes Internet traffic to a resource with an IP address of 192.0.2.44.", + "input": { + "HostedZoneId": "Z3M3LMPEXAMPLE", + "ChangeBatch": { + "Comment": "Web server for example.com", + "Changes": [ + { + "Action": "CREATE", + "ResourceRecordSet": { + "Name": "example.com", + "Type": "A", + "TTL": 60, + "ResourceRecords": [ + { + "Value": "192.0.2.44" + } + ] + } + } + ] + } + }, + "output": { + "ChangeInfo": { + "Comment": "Web server for example.com", + "Id": "/change/C2682N5HXP0BZ4", + "Status": "PENDING", + "SubmittedAt": "2017-02-10T01:36:41.958Z" + } + } + } + ], "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/hostedzone/{HostedZoneId}/rrset", @@ -2115,6 +2137,30 @@ ], "traits": { "smithy.api#documentation": "

Adds, edits, or deletes tags for a health check or a hosted zone.

\n

For information about using tags for cost allocation, see Using Cost Allocation\n\t\t\t\tTags in the Billing and Cost Management User Guide.

", + "smithy.api#examples": [ + { + "title": "To add or remove tags from a hosted zone or health check", + "documentation": "The following example adds two tags and removes one tag from the hosted zone with ID Z3M3LMPEXAMPLE.", + "input": { + "ResourceType": "hostedzone", + "ResourceId": "Z3M3LMPEXAMPLE", + "AddTags": [ + { + "Key": "apex", + "Value": "3874" + }, + { + "Key": "acme", + "Value": "4938" + } + ], + "RemoveTagKeys": [ + "Nadir" + ] + }, + "output": {} + } + ], "smithy.api#http": { "method": "POST", "uri": "/2013-04-01/tags/{ResourceType}/{ResourceId}", @@ -5578,6 +5624,34 @@ ], "traits": { "smithy.api#documentation": "

Gets information about a specified hosted zone including the four name servers\n\t\t\tassigned to the hosted zone.

", + "smithy.api#examples": [ + { + "title": "To get information about a hosted zone", + "documentation": "The following example gets information about the Z3M3LMPEXAMPLE hosted zone.", + "input": { + "Id": "Z3M3LMPEXAMPLE" + }, + "output": { + "HostedZone": { + "ResourceRecordSetCount": 8, + "CallerReference": "C741617D-04E4-F8DE-B9D7-0D150FC61C2E", + "Config": { + "PrivateZone": false + }, + "Id": "/hostedzone/Z3M3LMPEXAMPLE", + "Name": "myawsbucket.com." + }, + "DelegationSet": { + "NameServers": [ + "ns-2048.awsdns-64.com", + "ns-2049.awsdns-65.net", + "ns-2050.awsdns-66.org", + "ns-2051.awsdns-67.co.uk" + ] + } + } + } + ], "smithy.api#http": { "method": "GET", "uri": "/2013-04-01/hostedzone/{Id}", diff --git a/codegen/sdk-codegen/aws-models/route53-recovery-cluster.json b/codegen/sdk-codegen/aws-models/route53-recovery-cluster.json index a09889df69e..b50c000fb50 100644 --- a/codegen/sdk-codegen/aws-models/route53-recovery-cluster.json +++ b/codegen/sdk-codegen/aws-models/route53-recovery-cluster.json @@ -147,7 +147,7 @@ } ], "traits": { - "smithy.api#documentation": "

Get the state for a routing control. A routing control is a simple on/off switch that you\n\t\t\t\tcan use to route traffic to cells. When a routing control state is On, traffic flows to a cell. When\n\t\t\t\tthe state is Off, traffic does not flow.

\n\t\t\t

Before you can create a routing control, you must first create a cluster, and then host the control\n\t\t\t\tin a control panel on the cluster. For more information, see \n\t\t\t\t\tCreate routing control structures in the Amazon Route 53 Application Recovery Controller Developer Guide. \n\t\t\t\tYou access one of the endpoints for the cluster to get or update the routing control state to\n\t\t\t\tredirect traffic for your application.

\n\t\t\t

\n You must specify Regional endpoints when you work with API cluster operations \n\t\t\t\tto get or update routing control states in Route 53 ARC.\n

\n\t\t\t

To see a code example for getting a routing control state, including accessing Regional cluster endpoints\n\t\t\t\tin sequence, see API examples\n\t\t\t\tin the Amazon Route 53 Application Recovery Controller Developer Guide.

\n\t\t\t

Learn more about working with routing controls in the following topics in the \n\t\t\t\tAmazon Route 53 Application Recovery Controller Developer Guide:

\n\t\t\t " + "smithy.api#documentation": "

Get the state for a routing control. A routing control is a simple on/off switch that you\n\t\t\t\tcan use to route traffic to cells. When a routing control state is On, traffic flows to a cell. When\n\t\t\t\tthe state is Off, traffic does not flow.

\n

Before you can create a routing control, you must first create a cluster, and then host the control\n\t\t\t\tin a control panel on the cluster. For more information, see \n\t\t\t\t\tCreate routing control structures in the Amazon Route 53 Application Recovery Controller Developer Guide. \n\t\t\t\tYou access one of the endpoints for the cluster to get or update the routing control state to\n\t\t\t\tredirect traffic for your application.

\n

\n You must specify Regional endpoints when you work with API cluster operations \n\t\t\t\tto get or update routing control states in Route 53 ARC.\n

\n

To see a code example for getting a routing control state, including accessing Regional cluster endpoints\n\t\t\t\tin sequence, see API examples\n\t\t\t\tin the Amazon Route 53 Application Recovery Controller Developer Guide.

\n

Learn more about working with routing controls in the following topics in the \n\t\t\t\tAmazon Route 53 Application Recovery Controller Developer Guide:

\n " } }, "com.amazonaws.route53recoverycluster#GetRoutingControlStateRequest": { @@ -160,6 +160,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycluster#GetRoutingControlStateResponse": { @@ -185,6 +188,9 @@ "smithy.api#documentation": "

The routing control name.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycluster#InternalServerException": { @@ -239,10 +245,11 @@ } ], "traits": { - "smithy.api#documentation": "

List routing control names and Amazon Resource Names (ARNs), as well as the routing control \n\t\t\tstate for each routing control, along with the control panel name and control panel ARN for the routing controls.\n\t\t\tIf you specify a control panel ARN, this call lists the routing controls in the control panel. Otherwise, it lists\n\t\t\tall the routing controls in the cluster.

\n\t\t

A routing control is a simple on/off switch in Route 53 ARC that you\n\t\t\tcan use to route traffic to cells. When a routing control state is On, traffic flows to a cell. When\n\t\t\tthe state is Off, traffic does not flow.

\n\t\t

Before you can create a routing control, you must first create a cluster, and then host the control\n\t\t\tin a control panel on the cluster. For more information, see \n\t\t\t\tCreate routing control structures in the Amazon Route 53 Application Recovery Controller Developer Guide. \n\t\t\tYou access one of the endpoints for the cluster to get or update the routing control state to\n\t\t\tredirect traffic for your application.

\n\t\t

\n You must specify Regional endpoints when you work with API cluster operations \n\t\t\tto use this API operation to list routing controls in Route 53 ARC.\n

\n\t\t

Learn more about working with routing controls in the following topics in the \n\t\t\tAmazon Route 53 Application Recovery Controller Developer Guide:

\n\t\t ", + "smithy.api#documentation": "

List routing control names and Amazon Resource Names (ARNs), as well as the routing control \n\t\t\tstate for each routing control, along with the control panel name and control panel ARN for the routing controls.\n\t\t\tIf you specify a control panel ARN, this call lists the routing controls in the control panel. Otherwise, it lists\n\t\t\tall the routing controls in the cluster.

\n

A routing control is a simple on/off switch in Route 53 ARC that you\n\t\t\tcan use to route traffic to cells. When a routing control state is On, traffic flows to a cell. When\n\t\t\tthe state is Off, traffic does not flow.

\n

Before you can create a routing control, you must first create a cluster, and then host the control\n\t\t\tin a control panel on the cluster. For more information, see \n\t\t\t\tCreate routing control structures in the Amazon Route 53 Application Recovery Controller Developer Guide. \n\t\t\tYou access one of the endpoints for the cluster to get or update the routing control state to\n\t\t\tredirect traffic for your application.

\n

\n You must specify Regional endpoints when you work with API cluster operations \n\t\t\tto use this API operation to list routing controls in Route 53 ARC.\n

\n

Learn more about working with routing controls in the following topics in the \n\t\t\tAmazon Route 53 Application Recovery Controller Developer Guide:

\n ", "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "RoutingControls", "pageSize": "MaxResults" } } @@ -269,6 +276,9 @@ "smithy.api#documentation": "

The number of routing controls objects that you want to return with this call. The default value is 500.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycluster#ListRoutingControlsResponse": { @@ -287,6 +297,9 @@ "smithy.api#documentation": "

The token for the next set of results. You receive this token from a previous call.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycluster#MaxResults": { @@ -394,18 +407,20 @@ } }, "com.amazonaws.route53recoverycluster#RoutingControlState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "On", - "name": "On" - }, - { - "value": "Off", - "name": "Off" + "type": "enum", + "members": { + "On": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "On" + } + }, + "Off": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Off" } - ] + } } }, "com.amazonaws.route53recoverycluster#RoutingControls": { @@ -511,7 +526,7 @@ "name": "route53-recovery-cluster" }, "aws.protocols#awsJson1_0": {}, - "smithy.api#documentation": "

Welcome to the Routing Control (Recovery Cluster) API Reference Guide for Amazon Route 53 Application Recovery Controller.

\n\t\t\t

With Route 53 ARC, you can use routing control with extreme reliability to\n\t\t\trecover applications by rerouting traffic across\n\t\t\tAvailability Zones or Amazon Web Services Regions. Routing controls are simple on/off switches hosted\n\t\t\ton a highly available cluster in Route 53 ARC. A cluster provides a set of five redundant Regional endpoints against which you\n\t\t\tcan run API calls to get or update the state of routing controls. To implement failover, you set \n\t\t\tone routing control On and another one Off, to reroute traffic from one Availability Zone or Amazon Web Services Region \n\t\t\tto another.

\n\t\t\t

\n Be aware that you must specify a Regional endpoint for a cluster when you work with API cluster operations \n\t\t\t\tto get or update routing control states in Route 53 ARC. In addition, you must specify the US West (Oregon) Region \n\t\t\t\tfor Route 53 ARC API calls. For example, use the parameter --region us-west-2 with AWS CLI commands.\n\t\t\t\tFor more information, see\n\t\t\t\t\n\t\t\t\t\tGet and update routing control states using the API in the Amazon Route 53 Application Recovery Controller Developer Guide.

\n\t\t

This API guide includes information about the API operations for how to get and update routing control states\n\t\t\tin Route 53 ARC. To work with routing control in Route 53 ARC, you must first create the required components (clusters, control \n\t\t\tpanels, and routing controls) using the recovery cluster configuration API.

\n\t\t\t

For more information about working with routing control in Route 53 ARC, see the following:

\n\t\t ", + "smithy.api#documentation": "

Welcome to the Routing Control (Recovery Cluster) API Reference Guide for Amazon Route 53 Application Recovery Controller.

\n

With Route 53 ARC, you can use routing control with extreme reliability to\n\t\t\trecover applications by rerouting traffic across\n\t\t\tAvailability Zones or Amazon Web Services Regions. Routing controls are simple on/off switches hosted\n\t\t\ton a highly available cluster in Route 53 ARC. A cluster provides a set of five redundant Regional endpoints against which you\n\t\t\tcan run API calls to get or update the state of routing controls. To implement failover, you set \n\t\t\tone routing control On and another one Off, to reroute traffic from one Availability Zone or Amazon Web Services Region \n\t\t\tto another.

\n

\n Be aware that you must specify a Regional endpoint for a cluster when you work with API cluster operations \n\t\t\t\tto get or update routing control states in Route 53 ARC. In addition, you must specify the US West (Oregon) Region \n\t\t\t\tfor Route 53 ARC API calls. For example, use the parameter --region us-west-2 with AWS CLI commands.\n\t\t\t\tFor more information, see\n\t\t\t\t\n\t\t\t\t\tGet and update routing control states using the API in the Amazon Route 53 Application Recovery Controller Developer Guide.

\n

This API guide includes information about the API operations for how to get and update routing control states\n\t\t\tin Route 53 ARC. To work with routing control in Route 53 ARC, you must first create the required components (clusters, control \n\t\t\tpanels, and routing controls) using the recovery cluster configuration API.

\n

For more information about working with routing control in Route 53 ARC, see the following:

\n ", "smithy.api#title": "Route53 Recovery Cluster", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -573,52 +588,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -626,13 +645,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -642,224 +670,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53-recovery-cluster-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://route53-recovery-cluster-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53-recovery-cluster-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://route53-recovery-cluster-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://route53-recovery-cluster.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://route53-recovery-cluster.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://route53-recovery-cluster.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://route53-recovery-cluster.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -874,8 +853,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -887,8 +866,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -900,8 +879,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -913,8 +892,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -926,8 +905,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -939,8 +918,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -952,8 +931,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -965,8 +944,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -978,8 +957,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -991,8 +970,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1004,8 +983,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1017,8 +996,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1030,8 +1020,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1043,8 +1044,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1056,8 +1068,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1069,8 +1092,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1082,8 +1105,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1095,8 +1118,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1107,8 +1130,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1119,10 +1142,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1161,7 +1190,7 @@ } ], "traits": { - "smithy.api#documentation": "

Set the state of the routing control to reroute traffic. You can set the value to be On or\n\t\t\tOff. When the state is On, traffic flows to a cell. When the state is Off, traffic does not\n\t\t\tflow.

\n\t\t\t

With Route 53 ARC, you can add safety rules for routing controls, which are safeguards for routing \n\t\t\t\tcontrol state updates that help prevent unexpected outcomes, like fail open traffic routing. However, \n\t\t\t\tthere are scenarios when you might want to bypass the routing control safeguards that are enforced with \n\t\t\t\tsafety rules that you've configured. For example, you might want to fail over quickly for disaster recovery, \n\t\t\t\tand one or more safety rules might be unexpectedly preventing you from updating a routing control state to \n\t\t\t\treroute traffic. In a \"break glass\" scenario like this, you can override one or more safety rules to change \n\t\t\t\ta routing control state and fail over your application.

\n\t\t\t

The SafetyRulesToOverride property enables you override one or more safety rules and \n\t\t\t\tupdate routing control states. For more information, see \n\t\t\t\t\n\t\t\t\t\tOverride safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide.

\n\t\t\t

\n You must specify Regional endpoints when you work with API cluster operations \n\t\t\t\tto get or update routing control states in Route 53 ARC.\n

\n\t\t\t

To see a code example for getting a routing control state, including accessing Regional cluster endpoints\n\t\t\t\tin sequence, see API examples\n\t\t\t\tin the Amazon Route 53 Application Recovery Controller Developer Guide.

\n\t\t\t " + "smithy.api#documentation": "

Set the state of the routing control to reroute traffic. You can set the value to be On or\n\t\t\tOff. When the state is On, traffic flows to a cell. When the state is Off, traffic does not\n\t\t\tflow.

\n

With Route 53 ARC, you can add safety rules for routing controls, which are safeguards for routing \n\t\t\t\tcontrol state updates that help prevent unexpected outcomes, like fail open traffic routing. However, \n\t\t\t\tthere are scenarios when you might want to bypass the routing control safeguards that are enforced with \n\t\t\t\tsafety rules that you've configured. For example, you might want to fail over quickly for disaster recovery, \n\t\t\t\tand one or more safety rules might be unexpectedly preventing you from updating a routing control state to \n\t\t\t\treroute traffic. In a \"break glass\" scenario like this, you can override one or more safety rules to change \n\t\t\t\ta routing control state and fail over your application.

\n

The SafetyRulesToOverride property enables you override one or more safety rules and \n\t\t\t\tupdate routing control states. For more information, see \n\t\t\t\t\n\t\t\t\t\tOverride safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide.

\n

\n You must specify Regional endpoints when you work with API cluster operations \n\t\t\t\tto get or update routing control states in Route 53 ARC.\n

\n

To see a code example for getting a routing control state, including accessing Regional cluster endpoints\n\t\t\t\tin sequence, see API examples\n\t\t\t\tin the Amazon Route 53 Application Recovery Controller Developer Guide.

\n " } }, "com.amazonaws.route53recoverycluster#UpdateRoutingControlStateEntries": { @@ -1212,14 +1241,20 @@ "SafetyRulesToOverride": { "target": "com.amazonaws.route53recoverycluster#Arns", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) for the safety rules that you want to override when you're updating the state of\n\t\t\ta routing control. You can override one safety rule or multiple safety rules by including one or more ARNs, separated \n\t\t\tby commas.

\n\t\t

For more information, see \n\t\t\tOverride safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide.

" + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) for the safety rules that you want to override when you're updating the state of\n\t\t\ta routing control. You can override one safety rule or multiple safety rules by including one or more ARNs, separated \n\t\t\tby commas.

\n

For more information, see \n\t\t\tOverride safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycluster#UpdateRoutingControlStateResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoverycluster#UpdateRoutingControlStates": { "type": "operation", @@ -1256,7 +1291,7 @@ } ], "traits": { - "smithy.api#documentation": "

Set multiple routing control states. You can set the value for each state to be On or Off.\n\t\t\tWhen the state is On, traffic flows to a cell. When it's Off, traffic does not\n\t\t\tflow.

\n\t\t\t

With Route 53 ARC, you can add safety rules for routing controls, which are safeguards for routing \n\t\t\t\tcontrol state updates that help prevent unexpected outcomes, like fail open traffic routing. However, \n\t\t\t\tthere are scenarios when you might want to bypass the routing control safeguards that are enforced with \n\t\t\t\tsafety rules that you've configured. For example, you might want to fail over quickly for disaster recovery, \n\t\t\t\tand one or more safety rules might be unexpectedly preventing you from updating a routing control state to \n\t\t\t\treroute traffic. In a \"break glass\" scenario like this, you can override one or more safety rules to change \n\t\t\t\ta routing control state and fail over your application.

\n\t\t\t

The SafetyRulesToOverride property enables you override one or more safety rules and \n\t\t\t\tupdate routing control states. For more information, see \n\t\t\t\t\n\t\t\t\t\tOverride safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide.

\t\t\t\n

\n You must specify Regional endpoints when you work with API cluster operations \n\t\t\t\tto get or update routing control states in Route 53 ARC.\n

\n\t\t\t

To see a code example for getting a routing control state, including accessing Regional cluster endpoints\n\t\t\t\tin sequence, see API examples\n\t\t\t\tin the Amazon Route 53 Application Recovery Controller Developer Guide.

\n\t\t\t " + "smithy.api#documentation": "

Set multiple routing control states. You can set the value for each state to be On or Off.\n\t\t\tWhen the state is On, traffic flows to a cell. When it's Off, traffic does not\n\t\t\tflow.

\n

With Route 53 ARC, you can add safety rules for routing controls, which are safeguards for routing \n\t\t\t\tcontrol state updates that help prevent unexpected outcomes, like fail open traffic routing. However, \n\t\t\t\tthere are scenarios when you might want to bypass the routing control safeguards that are enforced with \n\t\t\t\tsafety rules that you've configured. For example, you might want to fail over quickly for disaster recovery, \n\t\t\t\tand one or more safety rules might be unexpectedly preventing you from updating a routing control state to \n\t\t\t\treroute traffic. In a \"break glass\" scenario like this, you can override one or more safety rules to change \n\t\t\t\ta routing control state and fail over your application.

\n

The SafetyRulesToOverride property enables you override one or more safety rules and \n\t\t\t\tupdate routing control states. For more information, see \n\t\t\t\t\n\t\t\t\t\tOverride safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide.

\n

\n You must specify Regional endpoints when you work with API cluster operations \n\t\t\t\tto get or update routing control states in Route 53 ARC.\n

\n

To see a code example for getting a routing control state, including accessing Regional cluster endpoints\n\t\t\t\tin sequence, see API examples\n\t\t\t\tin the Amazon Route 53 Application Recovery Controller Developer Guide.

\n " } }, "com.amazonaws.route53recoverycluster#UpdateRoutingControlStatesRequest": { @@ -1272,14 +1307,20 @@ "SafetyRulesToOverride": { "target": "com.amazonaws.route53recoverycluster#Arns", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARNs) for the safety rules that you want to override when you're updating routing\n\t\t\tcontrol states. You can override one safety rule or multiple safety rules by including one or more ARNs, separated \n\t\t\tby commas.

\n\t\t

For more information, see \n\t\t\tOverride safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide.

" + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) for the safety rules that you want to override when you're updating routing\n\t\t\tcontrol states. You can override one safety rule or multiple safety rules by including one or more ARNs, separated \n\t\t\tby commas.

\n

For more information, see \n\t\t\tOverride safety rules to reroute traffic in the Amazon Route 53 Application Recovery Controller Developer Guide.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycluster#UpdateRoutingControlStatesResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoverycluster#ValidationException": { "type": "structure", @@ -1335,27 +1376,35 @@ } }, "com.amazonaws.route53recoverycluster#ValidationExceptionReason": { - "type": "string", - "traits": { - "smithy.api#documentation": "Reason the request failed validation", - "smithy.api#enum": [ - { - "value": "unknownOperation", - "name": "UNKNOWN_OPERATION" - }, - { - "value": "cannotParse", - "name": "CANNOT_PARSE" - }, - { - "value": "fieldValidationFailed", - "name": "FIELD_VALIDATION_FAILED" - }, - { - "value": "other", - "name": "OTHER" + "type": "enum", + "members": { + "UNKNOWN_OPERATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unknownOperation" + } + }, + "CANNOT_PARSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cannotParse" } - ] + }, + "FIELD_VALIDATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fieldValidationFailed" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "other" + } + } + }, + "traits": { + "smithy.api#documentation": "Reason the request failed validation" } } } diff --git a/codegen/sdk-codegen/aws-models/route53-recovery-control-config.json b/codegen/sdk-codegen/aws-models/route53-recovery-control-config.json index 2f5f1ca422c..8e429edd649 100644 --- a/codegen/sdk-codegen/aws-models/route53-recovery-control-config.json +++ b/codegen/sdk-codegen/aws-models/route53-recovery-control-config.json @@ -94,7 +94,6 @@ "WaitPeriodMs": { "target": "com.amazonaws.route53recoverycontrolconfig#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent \"flapping\" of state. The wait period is 5000 ms by default, but you can choose a custom value.

", "smithy.api#required": {} } @@ -124,7 +123,6 @@ "WaitPeriodMs": { "target": "com.amazonaws.route53recoverycontrolconfig#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent \"flapping\" of state. The wait period is 5000 ms by default, but you can choose a custom value.

", "smithy.api#required": {} } @@ -221,7 +219,6 @@ "DefaultControlPanel": { "target": "com.amazonaws.route53recoverycontrolconfig#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

A flag that Amazon Route 53 Application Recovery Controller sets to true to designate the default control panel for a cluster. When you create a cluster, Amazon Route 53 Application Recovery Controller creates a control panel, and sets this flag for that control panel. If you create a control panel yourself, this flag is set to false.

" } }, @@ -234,7 +231,6 @@ "RoutingControlCount": { "target": "com.amazonaws.route53recoverycontrolconfig#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of routing controls in the control panel.

" } }, @@ -314,7 +310,8 @@ } }, "traits": { - "smithy.api#documentation": "

Creates a cluster.

" + "smithy.api#documentation": "

Creates a cluster.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#CreateClusterResponse": { @@ -326,6 +323,9 @@ "smithy.api#documentation": "

The cluster that was created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#CreateControlPanel": { @@ -400,7 +400,8 @@ } }, "traits": { - "smithy.api#documentation": "

The details of the control panel that you're creating.

" + "smithy.api#documentation": "

The details of the control panel that you're creating.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#CreateControlPanelResponse": { @@ -412,6 +413,9 @@ "smithy.api#documentation": "

Information about a control panel.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#CreateRoutingControl": { @@ -486,7 +490,8 @@ } }, "traits": { - "smithy.api#documentation": "

The details of the routing control that you're creating.

" + "smithy.api#documentation": "

The details of the routing control that you're creating.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#CreateRoutingControlResponse": { @@ -498,6 +503,9 @@ "smithy.api#documentation": "

The routing control that is created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#CreateSafetyRule": { @@ -555,7 +563,8 @@ } }, "traits": { - "smithy.api#documentation": "

The request body that you include when you create a safety rule.

" + "smithy.api#documentation": "

The request body that you include when you create a safety rule.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#CreateSafetyRuleResponse": { @@ -573,6 +582,9 @@ "smithy.api#documentation": "

The gating rule created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#DeleteCluster": { @@ -623,11 +635,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#DeleteClusterResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoverycontrolconfig#DeleteControlPanel": { "type": "operation", @@ -677,11 +695,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#DeleteControlPanelResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoverycontrolconfig#DeleteRoutingControl": { "type": "operation", @@ -731,11 +755,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#DeleteRoutingControlResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoverycontrolconfig#DeleteSafetyRule": { "type": "operation", @@ -776,11 +806,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#DeleteSafetyRuleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoverycontrolconfig#DescribeCluster": { "type": "operation", @@ -892,6 +928,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#DescribeClusterResponse": { @@ -903,6 +942,9 @@ "smithy.api#documentation": "

The cluster for the DescribeCluster request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#DescribeControlPanel": { @@ -1015,6 +1057,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#DescribeControlPanelResponse": { @@ -1026,6 +1071,9 @@ "smithy.api#documentation": "

Information about the control panel.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#DescribeRoutingControl": { @@ -1138,6 +1186,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#DescribeRoutingControlResponse": { @@ -1149,6 +1200,9 @@ "smithy.api#documentation": "

Information about the routing control.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#DescribeSafetyRule": { @@ -1187,6 +1241,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#DescribeSafetyRuleResponse": { @@ -1204,6 +1261,9 @@ "smithy.api#documentation": "

The gating rule in the response.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#GatingRule": { @@ -1261,7 +1321,6 @@ "WaitPeriodMs": { "target": "com.amazonaws.route53recoverycontrolconfig#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent \"flapping\" of state. The wait period is 5000 ms by default, but you can choose a custom value.

", "smithy.api#required": {} } @@ -1291,7 +1350,6 @@ "WaitPeriodMs": { "target": "com.amazonaws.route53recoverycontrolconfig#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent \"flapping\" of state. The wait period is 5000 ms by default, but you can choose a custom value.

", "smithy.api#required": {} } @@ -1358,7 +1416,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoverycontrolconfig#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "MaxResults" } @@ -1378,6 +1435,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListAssociatedRoute53HealthChecksResponse": { @@ -1395,6 +1455,9 @@ "smithy.api#documentation": "

Next token for listing health checks.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListClusters": { @@ -1443,7 +1506,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoverycontrolconfig#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "MaxResults" } @@ -1455,6 +1517,9 @@ "smithy.api#httpQuery": "NextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListClustersResponse": { @@ -1472,6 +1537,9 @@ "smithy.api#documentation": "

The token that identifies which batch of results you want to see.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListControlPanels": { @@ -1527,7 +1595,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoverycontrolconfig#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "MaxResults" } @@ -1539,6 +1606,9 @@ "smithy.api#httpQuery": "NextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListControlPanelsResponse": { @@ -1556,6 +1626,9 @@ "smithy.api#documentation": "

The token that identifies which batch of results you want to see.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListRoutingControls": { @@ -1612,7 +1685,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoverycontrolconfig#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "MaxResults" } @@ -1624,6 +1696,9 @@ "smithy.api#httpQuery": "NextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListRoutingControlsResponse": { @@ -1641,6 +1716,9 @@ "smithy.api#documentation": "

An array of routing controls.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListSafetyRules": { @@ -1697,7 +1775,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoverycontrolconfig#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "MaxResults" } @@ -1709,6 +1786,9 @@ "smithy.api#httpQuery": "NextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListSafetyRulesResponse": { @@ -1726,6 +1806,9 @@ "smithy.api#documentation": "

The list of safety rules in a control panel.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListTagsForResource": { @@ -1767,6 +1850,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#ListTagsForResourceResponse": { @@ -1778,12 +1864,14 @@ "smithy.api#documentation": "

The tags associated with the resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#MaxResults": { "type": "integer", "traits": { - "smithy.api#default": 0, "smithy.api#range": { "min": 1, "max": 1000 @@ -1824,7 +1912,6 @@ "WaitPeriodMs": { "target": "com.amazonaws.route53recoverycontrolconfig#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent \"flapping\" of state. The wait period is 5000 ms by default, but you can choose a custom value.

", "smithy.api#required": {} } @@ -1875,7 +1962,6 @@ "WaitPeriodMs": { "target": "com.amazonaws.route53recoverycontrolconfig#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

An evaluation period, in milliseconds (ms), during which any request against the target routing controls will fail. This helps prevent \"flapping\" of state. The wait period is 5000 ms by default, but you can choose a custom value.

", "smithy.api#required": {} } @@ -2050,52 +2136,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2103,13 +2193,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2119,251 +2218,202 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53-recovery-control-config-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://route53-recovery-control-config-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53-recovery-control-config-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://route53-recovery-control-config-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53-recovery-control-config.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://route53-recovery-control-config.us-west-2.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "route53-recovery-control-config", - "signingRegion": "us-west-2" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, { "conditions": [], "endpoint": { - "url": "https://route53-recovery-control-config.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://route53-recovery-control-config.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://route53-recovery-control-config.us-west-2.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "route53-recovery-control-config", + "signingRegion": "us-west-2" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://route53-recovery-control-config.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2387,8 +2437,8 @@ }, "params": { "Region": "aws-global", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2400,8 +2450,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2413,8 +2463,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2426,8 +2476,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2439,8 +2489,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2452,8 +2502,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2465,8 +2515,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2478,8 +2528,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2491,8 +2541,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2504,8 +2554,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2517,8 +2567,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2530,8 +2580,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2543,8 +2593,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2556,8 +2617,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2569,8 +2641,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2582,8 +2665,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2595,8 +2689,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2608,8 +2702,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2621,8 +2715,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2633,8 +2727,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2645,10 +2739,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2713,7 +2813,6 @@ "Inverted": { "target": "com.amazonaws.route53recoverycontrolconfig#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

Logical negation of the rule. If the rule would usually evaluate true, it's evaluated as false, and vice versa.

", "smithy.api#required": {} } @@ -2721,7 +2820,6 @@ "Threshold": { "target": "com.amazonaws.route53recoverycontrolconfig#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The value of N, when you specify an ATLEAST rule type. That is, Threshold is the number of controls that must be set when you specify an ATLEAST type.

", "smithy.api#required": {} } @@ -2855,12 +2953,16 @@ } }, "traits": { - "smithy.api#documentation": "

Request of adding tag to the resource

" + "smithy.api#documentation": "

Request of adding tag to the resource

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoverycontrolconfig#ThrottlingException": { "type": "structure", @@ -2926,11 +3028,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoverycontrolconfig#UpdateControlPanel": { "type": "operation", @@ -2988,7 +3096,8 @@ } }, "traits": { - "smithy.api#documentation": "

The details of the control panel that you're updating.

" + "smithy.api#documentation": "

The details of the control panel that you're updating.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#UpdateControlPanelResponse": { @@ -3000,6 +3109,9 @@ "smithy.api#documentation": "

The control panel to update.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#UpdateRoutingControl": { @@ -3058,7 +3170,8 @@ } }, "traits": { - "smithy.api#documentation": "

The details of the routing control that you're updating.

" + "smithy.api#documentation": "

The details of the routing control that you're updating.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#UpdateRoutingControlResponse": { @@ -3070,6 +3183,9 @@ "smithy.api#documentation": "

The routing control that was updated.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#UpdateSafetyRule": { @@ -3117,7 +3233,8 @@ } }, "traits": { - "smithy.api#documentation": "

A rule that you add to Application Recovery Controller to ensure that recovery actions don't accidentally impair your application's availability.

" + "smithy.api#documentation": "

A rule that you add to Application Recovery Controller to ensure that recovery actions don't accidentally impair your application's availability.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoverycontrolconfig#UpdateSafetyRuleResponse": { @@ -3135,6 +3252,9 @@ "smithy.api#documentation": "

The gating rule updated.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoverycontrolconfig#ValidationException": { @@ -3155,16 +3275,10 @@ } }, "com.amazonaws.route53recoverycontrolconfig#__boolean": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } + "type": "boolean" }, "com.amazonaws.route53recoverycontrolconfig#__integer": { - "type": "integer", - "traits": { - "smithy.api#default": 0 - } + "type": "integer" }, "com.amazonaws.route53recoverycontrolconfig#__listOfCluster": { "type": "list", diff --git a/codegen/sdk-codegen/aws-models/route53-recovery-readiness.json b/codegen/sdk-codegen/aws-models/route53-recovery-readiness.json index ecbe8f2a84d..a2a7e390214 100644 --- a/codegen/sdk-codegen/aws-models/route53-recovery-readiness.json +++ b/codegen/sdk-codegen/aws-models/route53-recovery-readiness.json @@ -166,6 +166,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#CreateCellResponse": { @@ -206,6 +209,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#CreateCrossAccountAuthorization": { @@ -253,6 +259,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#CreateCrossAccountAuthorizationResponse": { @@ -265,6 +274,9 @@ "smithy.api#jsonName": "crossAccountAuthorization" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#CreateReadinessCheck": { @@ -326,6 +338,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#CreateReadinessCheckResponse": { @@ -358,6 +373,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#CreateRecoveryGroup": { @@ -418,6 +436,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#CreateRecoveryGroupResponse": { @@ -451,6 +472,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#CreateResourceSet": { @@ -521,6 +545,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#CreateResourceSetResponse": { @@ -560,6 +587,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#CrossAccountAuthorization": { @@ -656,6 +686,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#DeleteCrossAccountAuthorization": { @@ -700,11 +733,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#DeleteCrossAccountAuthorizationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoveryreadiness#DeleteReadinessCheck": { "type": "operation", @@ -751,6 +790,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#DeleteRecoveryGroup": { @@ -798,6 +840,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#DeleteResourceSet": { @@ -845,6 +890,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetArchitectureRecommendations": { @@ -887,7 +935,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -907,6 +954,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetArchitectureRecommendationsResponse": { @@ -933,6 +983,9 @@ "smithy.api#jsonName": "recommendations" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#GetCell": { @@ -1023,7 +1076,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -1035,6 +1087,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetCellReadinessSummaryResponse": { @@ -1061,6 +1116,9 @@ "smithy.api#jsonName": "readinessChecks" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#GetCellRequest": { @@ -1074,6 +1132,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetCellResponse": { @@ -1114,6 +1175,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#GetReadinessCheck": { @@ -1161,6 +1225,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetReadinessCheckResourceStatus": { @@ -1209,7 +1276,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -1237,6 +1303,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetReadinessCheckResourceStatusResponse": { @@ -1263,6 +1332,9 @@ "smithy.api#jsonName": "rules" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#GetReadinessCheckResponse": { @@ -1295,6 +1367,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#GetReadinessCheckStatus": { @@ -1343,7 +1418,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -1363,6 +1437,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetReadinessCheckStatusResponse": { @@ -1396,6 +1473,9 @@ "smithy.api#jsonName": "resources" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#GetRecoveryGroup": { @@ -1478,7 +1558,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -1498,6 +1577,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetRecoveryGroupReadinessSummaryResponse": { @@ -1524,6 +1606,9 @@ "smithy.api#jsonName": "readinessChecks" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#GetRecoveryGroupRequest": { @@ -1537,6 +1622,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetRecoveryGroupResponse": { @@ -1570,6 +1658,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#GetResourceSet": { @@ -1617,6 +1708,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#GetResourceSetResponse": { @@ -1656,6 +1750,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#InternalServerException": { @@ -1724,7 +1821,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -1736,6 +1832,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#ListCellsResponse": { @@ -1755,6 +1854,9 @@ "smithy.api#jsonName": "nextToken" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#ListCrossAccountAuthorizations": { @@ -1800,7 +1902,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -1812,6 +1913,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#ListCrossAccountAuthorizationsResponse": { @@ -1831,6 +1935,9 @@ "smithy.api#jsonName": "nextToken" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#ListReadinessChecks": { @@ -1876,7 +1983,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -1888,6 +1994,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#ListReadinessChecksResponse": { @@ -1907,6 +2016,9 @@ "smithy.api#jsonName": "readinessChecks" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#ListRecoveryGroups": { @@ -1952,7 +2064,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -1964,6 +2075,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#ListRecoveryGroupsResponse": { @@ -1983,6 +2097,9 @@ "smithy.api#jsonName": "recoveryGroups" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#ListResourceSets": { @@ -2028,7 +2145,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -2040,6 +2156,9 @@ "smithy.api#httpQuery": "nextToken" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#ListResourceSetsResponse": { @@ -2059,6 +2178,9 @@ "smithy.api#jsonName": "resourceSets" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#ListRules": { @@ -2136,7 +2258,6 @@ "MaxResults": { "target": "com.amazonaws.route53recoveryreadiness#MaxResults", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of objects that you want to return with this call.

", "smithy.api#httpQuery": "maxResults" } @@ -2155,6 +2276,9 @@ "smithy.api#httpQuery": "resourceType" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#ListRulesResponse": { @@ -2174,6 +2298,9 @@ "smithy.api#jsonName": "rules" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#ListTagsForResources": { @@ -2215,6 +2342,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#ListTagsForResourcesResponse": { @@ -2227,12 +2357,14 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#MaxResults": { "type": "integer", "traits": { - "smithy.api#default": 0, "smithy.api#range": { "min": 1, "max": 1000 @@ -2292,27 +2424,35 @@ } }, "com.amazonaws.route53recoveryreadiness#Readiness": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The readiness status.

", - "smithy.api#enum": [ - { - "value": "READY", - "name": "READY" - }, - { - "value": "NOT_READY", - "name": "NOT_READY" - }, - { - "value": "UNKNOWN", - "name": "UNKNOWN" - }, - { - "value": "NOT_AUTHORIZED", - "name": "NOT_AUTHORIZED" + "type": "enum", + "members": { + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY" } - ] + }, + "NOT_READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_READY" + } + }, + "UNKNOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN" + } + }, + "NOT_AUTHORIZED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NOT_AUTHORIZED" + } + } + }, + "traits": { + "smithy.api#documentation": "

The readiness status.

" } }, "com.amazonaws.route53recoveryreadiness#ReadinessCheckOutput": { @@ -2747,52 +2887,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2800,13 +2944,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2816,224 +2969,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53-recovery-readiness-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://route53-recovery-readiness-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53-recovery-readiness-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://route53-recovery-readiness-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://route53-recovery-readiness.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://route53-recovery-readiness.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://route53-recovery-readiness.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://route53-recovery-readiness.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3048,8 +3152,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3061,8 +3165,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3074,8 +3178,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3087,8 +3191,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3100,8 +3204,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3113,8 +3217,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3126,8 +3230,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3139,8 +3243,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3152,8 +3256,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3165,8 +3269,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3178,8 +3282,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3191,8 +3295,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3204,8 +3319,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3217,8 +3343,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3230,8 +3367,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3243,8 +3391,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3256,8 +3404,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3269,8 +3417,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3281,8 +3429,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3293,10 +3441,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3390,11 +3544,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.route53recoveryreadiness#Tags": { "type": "map", @@ -3493,6 +3653,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#UpdateCell": { @@ -3548,6 +3711,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#UpdateCellResponse": { @@ -3588,6 +3754,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#UpdateReadinessCheck": { @@ -3645,7 +3814,8 @@ } }, "traits": { - "smithy.api#documentation": "

Name of a readiness check to describe.

" + "smithy.api#documentation": "

Name of a readiness check to describe.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#UpdateReadinessCheckResponse": { @@ -3678,6 +3848,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#UpdateRecoveryGroup": { @@ -3735,7 +3908,8 @@ } }, "traits": { - "smithy.api#documentation": "

Name of a recovery group.

" + "smithy.api#documentation": "

Name of a recovery group.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#UpdateRecoveryGroupResponse": { @@ -3769,6 +3943,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#UpdateResourceSet": { @@ -3834,7 +4011,8 @@ } }, "traits": { - "smithy.api#documentation": "

Name of a resource set.

" + "smithy.api#documentation": "

Name of a resource set.

", + "smithy.api#input": {} } }, "com.amazonaws.route53recoveryreadiness#UpdateResourceSetResponse": { @@ -3874,6 +4052,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.route53recoveryreadiness#ValidationException": { diff --git a/codegen/sdk-codegen/aws-models/route53resolver.json b/codegen/sdk-codegen/aws-models/route53resolver.json index 9c64f5d16d3..b8941ed1d6e 100644 --- a/codegen/sdk-codegen/aws-models/route53resolver.json +++ b/codegen/sdk-codegen/aws-models/route53resolver.json @@ -6891,52 +6891,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -6944,13 +6948,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -6960,92 +6973,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://route53resolver-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://route53resolver-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -7054,130 +7058,128 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "Region" + }, + "us-gov-east-1" ] } ], - "type": "tree", - "rules": [ + "endpoint": { + "url": "https://route53resolver.us-gov-east-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [], - "type": "tree", - "rules": [ + "fn": "stringEquals", + "argv": [ { - "conditions": [], - "endpoint": { - "url": "https://route53resolver-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "Region" + }, + "us-gov-west-1" ] } - ] + ], + "endpoint": { + "url": "https://route53resolver.us-gov-west-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://route53resolver-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://route53resolver.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://route53resolver.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://route53resolver.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://route53resolver.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -7586,6 +7588,19 @@ "UseDualStack": false } }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://route53resolver.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, { "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", "expect": { @@ -7600,29 +7615,29 @@ } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://route53resolver-fips.us-gov-east-1.api.aws" + "url": "https://route53resolver.us-gov-west-1.amazonaws.com" } }, "params": { - "Region": "us-gov-east-1", + "Region": "us-gov-west-1", "UseFIPS": true, - "UseDualStack": true + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://route53resolver-fips.us-gov-east-1.amazonaws.com" + "url": "https://route53resolver-fips.us-gov-east-1.api.aws" } }, "params": { "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false + "UseDualStack": true } }, { diff --git a/codegen/sdk-codegen/aws-models/rum.json b/codegen/sdk-codegen/aws-models/rum.json index 4d981a0d915..b37fa1da48e 100644 --- a/codegen/sdk-codegen/aws-models/rum.json +++ b/codegen/sdk-codegen/aws-models/rum.json @@ -2041,52 +2041,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2094,13 +2098,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2110,224 +2123,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://rum-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://rum-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://rum-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://rum-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://rum.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://rum.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://rum.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://rum.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2342,8 +2306,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2355,8 +2319,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2368,8 +2332,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2381,8 +2345,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2394,8 +2358,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2407,8 +2371,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2420,8 +2384,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2433,8 +2397,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2446,8 +2410,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2459,8 +2423,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2472,8 +2436,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2485,8 +2449,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2498,8 +2462,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2511,8 +2475,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2524,8 +2488,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2537,8 +2501,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2550,8 +2514,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2563,8 +2527,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2576,8 +2540,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2589,8 +2553,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2602,8 +2566,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2615,8 +2590,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2628,8 +2614,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2641,8 +2638,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2654,8 +2662,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2667,8 +2675,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2680,8 +2688,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2692,8 +2700,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2704,10 +2712,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/s3-control.json b/codegen/sdk-codegen/aws-models/s3-control.json index 34dd5ad3475..7b83470c3f3 100644 --- a/codegen/sdk-codegen/aws-models/s3-control.json +++ b/codegen/sdk-codegen/aws-models/s3-control.json @@ -232,6 +232,7 @@ "arnNamespace": "s3", "cloudFormationName": "S3Control", "cloudTrailEventSource": "s3control.amazonaws.com", + "docId": "s3control-2018-08-20", "endpointPrefix": "s3-control" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/s3outposts.json b/codegen/sdk-codegen/aws-models/s3outposts.json index 4bc2ec0465b..9893bdf1a0b 100644 --- a/codegen/sdk-codegen/aws-models/s3outposts.json +++ b/codegen/sdk-codegen/aws-models/s3outposts.json @@ -160,6 +160,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the endpoint.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.s3outposts#CreationTime": { @@ -499,6 +502,9 @@ "smithy.api#documentation": "

If the number of endpoints associated with the specified Outpost exceeds MaxResults, \n you can include this value in subsequent calls to this operation to retrieve more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.s3outposts#ListOutpostsWithS3": { @@ -576,6 +582,9 @@ "smithy.api#documentation": "

Returns a token that you can use to call ListOutpostsWithS3 again and receive additional results, if there are any.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.s3outposts#ListSharedEndpoints": { @@ -664,6 +673,9 @@ "smithy.api#documentation": "

If the number of endpoints associated with the specified Outpost exceeds MaxResults, \n you can include this value in subsequent calls to this operation to retrieve more results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.s3outposts#MaxResults": { @@ -883,52 +895,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -936,13 +952,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -952,224 +977,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://s3-outposts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://s3-outposts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://s3-outposts-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://s3-outposts-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://s3-outposts.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://s3-outposts.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://s3-outposts.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://s3-outposts.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1183,9 +1159,9 @@ } }, "params": { + "Region": "af-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "af-south-1" + "UseDualStack": false } }, { @@ -1196,9 +1172,9 @@ } }, "params": { + "Region": "ap-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-east-1" + "UseDualStack": false } }, { @@ -1209,9 +1185,9 @@ } }, "params": { + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { @@ -1222,9 +1198,9 @@ } }, "params": { + "Region": "ap-northeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-2" + "UseDualStack": false } }, { @@ -1235,9 +1211,9 @@ } }, "params": { + "Region": "ap-northeast-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-3" + "UseDualStack": false } }, { @@ -1248,9 +1224,9 @@ } }, "params": { + "Region": "ap-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-south-1" + "UseDualStack": false } }, { @@ -1261,9 +1237,9 @@ } }, "params": { + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { @@ -1274,9 +1250,9 @@ } }, "params": { + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { @@ -1287,9 +1263,9 @@ } }, "params": { + "Region": "ca-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ca-central-1" + "UseDualStack": false } }, { @@ -1300,9 +1276,9 @@ } }, "params": { + "Region": "eu-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-central-1" + "UseDualStack": false } }, { @@ -1313,9 +1289,9 @@ } }, "params": { + "Region": "eu-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-north-1" + "UseDualStack": false } }, { @@ -1326,9 +1302,9 @@ } }, "params": { + "Region": "eu-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-south-1" + "UseDualStack": false } }, { @@ -1339,9 +1315,9 @@ } }, "params": { + "Region": "eu-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": false } }, { @@ -1352,9 +1328,9 @@ } }, "params": { + "Region": "eu-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-2" + "UseDualStack": false } }, { @@ -1365,9 +1341,9 @@ } }, "params": { + "Region": "eu-west-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-3" + "UseDualStack": false } }, { @@ -1378,9 +1354,9 @@ } }, "params": { + "Region": "me-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "me-south-1" + "UseDualStack": false } }, { @@ -1391,9 +1367,9 @@ } }, "params": { + "Region": "sa-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "sa-east-1" + "UseDualStack": false } }, { @@ -1404,9 +1380,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -1417,9 +1393,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -1430,9 +1406,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -1443,9 +1419,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -1456,9 +1432,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -1469,9 +1445,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -1482,9 +1458,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -1495,9 +1471,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1508,9 +1484,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -1521,9 +1497,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -1534,9 +1510,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -1547,9 +1523,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -1560,9 +1536,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -1573,9 +1549,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -1586,9 +1562,20 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-east-1" + "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 } }, { @@ -1599,9 +1586,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -1612,9 +1610,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -1625,9 +1634,20 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-isob-east-1" + "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 } }, { @@ -1638,9 +1658,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1651,9 +1671,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1676,9 +1696,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1688,11 +1708,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/sagemaker-a2i-runtime.json b/codegen/sdk-codegen/aws-models/sagemaker-a2i-runtime.json index 037db97c7ed..02d7bc59bc8 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker-a2i-runtime.json +++ b/codegen/sdk-codegen/aws-models/sagemaker-a2i-runtime.json @@ -123,52 +123,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -176,13 +180,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -192,224 +205,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://a2i-runtime.sagemaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://a2i-runtime.sagemaker-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://a2i-runtime.sagemaker-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://a2i-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://a2i-runtime.sagemaker.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://a2i-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://a2i-runtime.sagemaker.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -424,8 +388,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -437,8 +401,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -450,8 +414,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -463,8 +427,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -476,8 +440,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -489,8 +453,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -502,8 +466,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -515,8 +479,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -528,8 +492,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -541,8 +505,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -554,8 +518,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -567,8 +531,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -580,8 +555,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -593,8 +579,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -606,8 +603,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -619,8 +627,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -632,8 +640,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -645,8 +653,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -657,8 +665,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -669,10 +677,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -693,18 +707,20 @@ } }, "com.amazonaws.sagemakera2iruntime#ContentClassifier": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "FreeOfPersonallyIdentifiableInformation", - "name": "FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION" - }, - { - "value": "FreeOfAdultContent", - "name": "FREE_OF_ADULT_CONTENT" + "type": "enum", + "members": { + "FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FreeOfPersonallyIdentifiableInformation" } - ] + }, + "FREE_OF_ADULT_CONTENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FreeOfAdultContent" + } + } } }, "com.amazonaws.sagemakera2iruntime#ContentClassifiers": { @@ -761,11 +777,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sagemakera2iruntime#DeleteHumanLoopResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.sagemakera2iruntime#DescribeHumanLoop": { "type": "operation", @@ -809,6 +831,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sagemakera2iruntime#DescribeHumanLoopResponse": { @@ -867,6 +892,9 @@ "smithy.api#documentation": "

An object that contains information about the output of the human loop.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sagemakera2iruntime#FailureReason": { @@ -954,30 +982,38 @@ } }, "com.amazonaws.sagemakera2iruntime#HumanLoopStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "InProgress", - "name": "IN_PROGRESS" - }, - { - "value": "Failed", - "name": "FAILED" - }, - { - "value": "Completed", - "name": "COMPLETED" - }, - { - "value": "Stopped", - "name": "STOPPED" - }, - { - "value": "Stopping", - "name": "STOPPING" + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InProgress" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completed" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopped" } - ] + }, + "STOPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopping" + } + } } }, "com.amazonaws.sagemakera2iruntime#HumanLoopSummaries": { @@ -1130,6 +1166,9 @@ "smithy.api#httpQuery": "MaxResults" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sagemakera2iruntime#ListHumanLoopsResponse": { @@ -1148,6 +1187,9 @@ "smithy.api#documentation": "

A token to display the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sagemakera2iruntime#MaxResults": { @@ -1197,18 +1239,20 @@ } }, "com.amazonaws.sagemakera2iruntime#SortOrder": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Ascending", - "name": "ASCENDING" - }, - { - "value": "Descending", - "name": "DESCENDING" + "type": "enum", + "members": { + "ASCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Ascending" + } + }, + "DESCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Descending" } - ] + } } }, "com.amazonaws.sagemakera2iruntime#StartHumanLoop": { @@ -1275,6 +1319,9 @@ "smithy.api#documentation": "

Attributes of the specified data. Use DataAttributes to specify if your data\n is free of personally identifiable information and/or free of adult content.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sagemakera2iruntime#StartHumanLoopResponse": { @@ -1286,6 +1333,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the human loop.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sagemakera2iruntime#StopHumanLoop": { @@ -1329,11 +1379,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sagemakera2iruntime#StopHumanLoopResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.sagemakera2iruntime#String": { "type": "string" diff --git a/codegen/sdk-codegen/aws-models/sagemaker-edge.json b/codegen/sdk-codegen/aws-models/sagemaker-edge.json index 53c9e9fdd19..e9cceefc711 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker-edge.json +++ b/codegen/sdk-codegen/aws-models/sagemaker-edge.json @@ -117,52 +117,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -170,13 +174,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -186,224 +199,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://edge.sagemaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://edge.sagemaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://edge.sagemaker-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://edge.sagemaker-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://edge.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://edge.sagemaker.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://edge.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://edge.sagemaker.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -418,8 +382,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -431,8 +395,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -444,8 +408,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -457,8 +421,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -470,8 +434,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -483,8 +447,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -496,8 +460,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -509,8 +473,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -522,8 +486,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -535,8 +499,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -548,8 +512,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -561,8 +525,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -574,8 +538,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -587,8 +551,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -600,8 +564,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -613,8 +577,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -626,8 +590,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -639,8 +614,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -652,8 +638,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -665,8 +662,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -678,8 +686,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -691,8 +699,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -704,8 +712,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -716,8 +724,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -728,10 +736,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -778,14 +792,14 @@ } }, "com.amazonaws.sagemakeredge#ChecksumType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SHA1", - "name": "Sha1" + "type": "enum", + "members": { + "Sha1": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SHA1" } - ] + } } }, "com.amazonaws.sagemakeredge#Definition": { @@ -933,29 +947,31 @@ } }, "com.amazonaws.sagemakeredge#DeploymentStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUCCESS", - "name": "Success" - }, - { - "value": "FAIL", - "name": "Fail" + "type": "enum", + "members": { + "Success": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCESS" + } + }, + "Fail": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAIL" } - ] + } } }, "com.amazonaws.sagemakeredge#DeploymentType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Model", - "name": "Model" + "type": "enum", + "members": { + "Model": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Model" } - ] + } } }, "com.amazonaws.sagemakeredge#DeviceFleetName": { @@ -1088,18 +1104,20 @@ "type": "string" }, "com.amazonaws.sagemakeredge#FailureHandlingPolicy": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ROLLBACK_ON_FAILURE", - "name": "RollbackOnFailure" - }, - { - "value": "DO_NOTHING", - "name": "DoNothing" + "type": "enum", + "members": { + "RollbackOnFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLLBACK_ON_FAILURE" } - ] + }, + "DoNothing": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DO_NOTHING" + } + } } }, "com.amazonaws.sagemakeredge#GetDeployments": { @@ -1141,6 +1159,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sagemakeredge#GetDeploymentsResult": { @@ -1152,6 +1173,9 @@ "smithy.api#documentation": "

Returns a list of the configurations of the active deployments on the device.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sagemakeredge#GetDeviceRegistration": { @@ -1193,6 +1217,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sagemakeredge#GetDeviceRegistrationResult": { @@ -1210,6 +1237,9 @@ "smithy.api#documentation": "

The amount of time, in seconds, that the registration status is stored on the device’s cache before it is refreshed.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sagemakeredge#InternalServiceException": { @@ -1283,18 +1313,20 @@ } }, "com.amazonaws.sagemakeredge#ModelState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DEPLOY", - "name": "Deploy" - }, - { - "value": "UNDEPLOY", - "name": "Undeploy" + "type": "enum", + "members": { + "Deploy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEPLOY" } - ] + }, + "Undeploy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNDEPLOY" + } + } } }, "com.amazonaws.sagemakeredge#Models": { @@ -1377,6 +1409,9 @@ "smithy.api#documentation": "

Returns the result of a deployment on the device.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sagemakeredge#String": { diff --git a/codegen/sdk-codegen/aws-models/sagemaker-featurestore-runtime.json b/codegen/sdk-codegen/aws-models/sagemaker-featurestore-runtime.json index 0674506fa31..7bafa5cad7c 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker-featurestore-runtime.json +++ b/codegen/sdk-codegen/aws-models/sagemaker-featurestore-runtime.json @@ -133,52 +133,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -186,13 +190,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -202,224 +215,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://featurestore-runtime.sagemaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://featurestore-runtime.sagemaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://featurestore-runtime.sagemaker-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://featurestore-runtime.sagemaker-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://featurestore-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://featurestore-runtime.sagemaker.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://featurestore-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://featurestore-runtime.sagemaker.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/sagemaker-geospatial.json b/codegen/sdk-codegen/aws-models/sagemaker-geospatial.json index 852cd7ba6e5..0a5fd878066 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker-geospatial.json +++ b/codegen/sdk-codegen/aws-models/sagemaker-geospatial.json @@ -3506,55 +3506,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://sagemaker-geospatial-fips.us-gov-east-1.api.aws" + "url": "https://sagemaker-geospatial-fips.us-east-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sagemaker-geospatial-fips.us-gov-east-1.amazonaws.com" + "url": "https://sagemaker-geospatial-fips.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://sagemaker-geospatial.us-gov-east-1.api.aws" + "url": "https://sagemaker-geospatial.us-east-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sagemaker-geospatial.us-gov-east-1.amazonaws.com" + "url": "https://sagemaker-geospatial.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3566,8 +3566,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3579,8 +3579,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3592,8 +3592,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3605,108 +3605,108 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://sagemaker-geospatial-fips.us-gov-east-1.api.aws" + } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sagemaker-geospatial-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://sagemaker-geospatial-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://sagemaker-geospatial.us-gov-east-1.api.aws" + } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sagemaker-geospatial.us-iso-east-1.c2s.ic.gov" + "url": "https://sagemaker-geospatial.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://sagemaker-geospatial-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sagemaker-geospatial-fips.us-east-1.amazonaws.com" + "url": "https://sagemaker-geospatial-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://sagemaker-geospatial.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://sagemaker-geospatial.us-east-1.amazonaws.com" + "url": "https://sagemaker-geospatial.us-iso-east-1.c2s.ic.gov" } }, "params": { - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3716,8 +3716,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3729,8 +3729,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3740,8 +3740,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3753,12 +3753,12 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" @@ -3766,8 +3766,21 @@ }, "params": { "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3778,8 +3791,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3790,10 +3803,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/sagemaker-metrics.json b/codegen/sdk-codegen/aws-models/sagemaker-metrics.json index 6e2c529ee24..c2f289e19f5 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker-metrics.json +++ b/codegen/sdk-codegen/aws-models/sagemaker-metrics.json @@ -96,6 +96,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sagemakermetrics#BatchPutMetricsResponse": { @@ -107,6 +110,9 @@ "smithy.api#documentation": "

Lists any errors that occur when inserting metric data.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sagemakermetrics#Double": { @@ -593,55 +599,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://metrics.sagemaker-fips.us-gov-east-1.api.aws" + "url": "https://metrics.sagemaker-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://metrics.sagemaker-fips.us-gov-east-1.amazonaws.com" + "url": "https://metrics.sagemaker-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://metrics.sagemaker.us-gov-east-1.api.aws" + "url": "https://metrics.sagemaker.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://metrics.sagemaker.us-gov-east-1.amazonaws.com" + "url": "https://metrics.sagemaker.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -652,9 +658,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -665,9 +671,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -678,9 +684,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -691,109 +697,109 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://metrics.sagemaker-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://metrics.sagemaker-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://metrics.sagemaker-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://metrics.sagemaker.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://metrics.sagemaker.us-iso-east-1.c2s.ic.gov" + "url": "https://metrics.sagemaker.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://metrics.sagemaker-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://metrics.sagemaker-fips.us-east-1.amazonaws.com" + "url": "https://metrics.sagemaker-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://metrics.sagemaker.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://metrics.sagemaker.us-east-1.amazonaws.com" + "url": "https://metrics.sagemaker.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -802,9 +808,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -815,9 +821,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -826,9 +832,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -839,22 +845,35 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { + "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, - "Region": "us-east-1", + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -864,9 +883,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -876,11 +895,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/sagemaker-runtime.json b/codegen/sdk-codegen/aws-models/sagemaker-runtime.json index d47ae5614b1..87841548987 100644 --- a/codegen/sdk-codegen/aws-models/sagemaker-runtime.json +++ b/codegen/sdk-codegen/aws-models/sagemaker-runtime.json @@ -49,6 +49,7 @@ "arnNamespace": "sagemaker", "cloudFormationName": "SageMakerRuntime", "cloudTrailEventSource": "sagemakerruntime.amazonaws.com", + "docId": "runtime.sagemaker-2017-05-13", "endpointPrefix": "runtime.sagemaker" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/savingsplans.json b/codegen/sdk-codegen/aws-models/savingsplans.json index 8d09ed34f39..1198faaa863 100644 --- a/codegen/sdk-codegen/aws-models/savingsplans.json +++ b/codegen/sdk-codegen/aws-models/savingsplans.json @@ -135,52 +135,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -188,291 +192,251 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://savingsplans.amazonaws.com", + "properties": { + "authSchemes": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "name": "sigv4", + "signingName": "savingsplans", + "signingRegion": "us-east-1" } - ], - "endpoint": { - "url": "https://savingsplans.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "savingsplans", - "signingRegion": "us-east-1" - } - ] + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" }, - "headers": {} - }, - "type": "endpoint" + true + ] }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://savingsplans-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://savingsplans-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://savingsplans-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://savingsplans-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://savingsplans.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://savingsplans.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://savingsplans.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://savingsplans.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/scheduler.json b/codegen/sdk-codegen/aws-models/scheduler.json index 3c3775ed731..770f19c1719 100644 --- a/codegen/sdk-codegen/aws-models/scheduler.json +++ b/codegen/sdk-codegen/aws-models/scheduler.json @@ -388,55 +388,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://scheduler-fips.us-gov-east-1.api.aws" + "url": "https://scheduler-fips.us-east-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://scheduler-fips.us-gov-east-1.amazonaws.com" + "url": "https://scheduler-fips.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://scheduler.us-gov-east-1.api.aws" + "url": "https://scheduler.us-east-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://scheduler.us-gov-east-1.amazonaws.com" + "url": "https://scheduler.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -448,8 +448,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -461,8 +461,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -474,8 +474,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -487,108 +487,108 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://scheduler-fips.us-gov-east-1.api.aws" + } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://scheduler-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://scheduler-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://scheduler.us-gov-east-1.api.aws" + } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": true, - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://scheduler.us-iso-east-1.c2s.ic.gov" + "url": "https://scheduler.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://scheduler-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://scheduler-fips.us-east-1.amazonaws.com" + "url": "https://scheduler-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://scheduler.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://scheduler.us-east-1.amazonaws.com" + "url": "https://scheduler.us-iso-east-1.c2s.ic.gov" } }, "params": { - "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -598,8 +598,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -611,8 +611,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -622,8 +622,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -635,12 +635,12 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" @@ -648,8 +648,21 @@ }, "params": { "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -660,8 +673,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -672,10 +685,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/schemas.json b/codegen/sdk-codegen/aws-models/schemas.json index 50c6e50d5fa..a2f40451e14 100644 --- a/codegen/sdk-codegen/aws-models/schemas.json +++ b/codegen/sdk-codegen/aws-models/schemas.json @@ -56,22 +56,26 @@ "type": "blob" }, "com.amazonaws.schemas#CodeGenerationStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATE_IN_PROGRESS", - "name": "CREATE_IN_PROGRESS" - }, - { - "value": "CREATE_COMPLETE", - "name": "CREATE_COMPLETE" - }, - { - "value": "CREATE_FAILED", - "name": "CREATE_FAILED" + "type": "enum", + "members": { + "CREATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_IN_PROGRESS" + } + }, + "CREATE_COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_COMPLETE" } - ] + }, + "CREATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_FAILED" + } + } } }, "com.amazonaws.schemas#ConflictException": { @@ -153,7 +157,6 @@ "CrossAccount": { "target": "com.amazonaws.schemas#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

Support discovery of schemas in events sent to the bus from another account. (default: true).

" } }, @@ -164,6 +167,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#CreateDiscovererResponse": { @@ -202,7 +208,6 @@ "CrossAccount": { "target": "com.amazonaws.schemas#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

The Status if the discoverer will discover schemas from events sent from another account.

" } }, @@ -213,6 +218,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#CreateRegistry": { @@ -276,6 +284,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#CreateRegistryResponse": { @@ -306,6 +317,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#CreateSchema": { @@ -385,6 +399,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#CreateSchemaResponse": { @@ -438,6 +455,9 @@ "smithy.api#documentation": "

The date the schema version was created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#DeleteDiscoverer": { @@ -488,6 +508,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#DeleteRegistry": { @@ -538,6 +561,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#DeleteResourcePolicy": { @@ -587,6 +613,9 @@ "smithy.api#httpQuery": "registryName" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#DeleteSchema": { @@ -645,6 +674,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#DeleteSchemaVersion": { @@ -711,6 +743,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#DescribeCodeBinding": { @@ -827,6 +862,9 @@ "smithy.api#httpQuery": "schemaVersion" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#DescribeCodeBindingResponse": { @@ -856,6 +894,9 @@ "smithy.api#documentation": "

The current status of code binding generation.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#DescribeDiscoverer": { @@ -906,6 +947,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#DescribeDiscovererResponse": { @@ -944,7 +988,6 @@ "CrossAccount": { "target": "com.amazonaws.schemas#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

The Status if the discoverer will discover schemas from events sent from another account.

" } }, @@ -955,6 +998,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#DescribeRegistry": { @@ -1005,6 +1051,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#DescribeRegistryResponse": { @@ -1035,6 +1084,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#DescribeSchema": { @@ -1100,6 +1152,9 @@ "smithy.api#httpQuery": "schemaVersion" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#DescribeSchemaResponse": { @@ -1160,21 +1215,26 @@ "smithy.api#documentation": "

The date the schema version was created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#DiscovererState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "STARTED", - "name": "STARTED" - }, - { - "value": "STOPPED", - "name": "STOPPED" + "type": "enum", + "members": { + "STARTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STARTED" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPED" } - ] + } } }, "com.amazonaws.schemas#DiscovererSummary": { @@ -1207,7 +1267,6 @@ "CrossAccount": { "target": "com.amazonaws.schemas#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

The Status if the discoverer will discover schemas from events sent from another account.

" } }, @@ -1292,6 +1351,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#ExportSchemaResponse": { @@ -1312,6 +1374,9 @@ "Type": { "target": "com.amazonaws.schemas#__string" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#ForbiddenException": { @@ -1408,6 +1473,9 @@ "smithy.api#httpQuery": "schemaVersion" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#GetCodeBindingSourceResponse": { @@ -1419,6 +1487,9 @@ "smithy.api#httpPayload": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#GetDiscoveredSchema": { @@ -1472,6 +1543,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#GetDiscoveredSchemaResponse": { @@ -1483,6 +1557,9 @@ "smithy.api#documentation": "

The source of the schema definition.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#GetDiscoveredSchemaVersionItemInput": { @@ -1541,6 +1618,9 @@ "smithy.api#httpQuery": "registryName" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#GetResourcePolicyResponse": { @@ -1558,6 +1638,9 @@ "smithy.api#documentation": "

The revision ID.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#GoneException": { @@ -1659,7 +1742,6 @@ "Limit": { "target": "com.amazonaws.schemas#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#httpQuery": "limit" } }, @@ -1677,6 +1759,9 @@ "smithy.api#httpQuery": "sourceArnPrefix" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#ListDiscoverersResponse": { @@ -1694,6 +1779,9 @@ "smithy.api#documentation": "

The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#ListRegistries": { @@ -1742,7 +1830,6 @@ "Limit": { "target": "com.amazonaws.schemas#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#httpQuery": "limit" } }, @@ -1767,6 +1854,9 @@ "smithy.api#httpQuery": "scope" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#ListRegistriesResponse": { @@ -1784,6 +1874,9 @@ "smithy.api#documentation": "

An array of registry summaries.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#ListSchemaVersions": { @@ -1835,7 +1928,6 @@ "Limit": { "target": "com.amazonaws.schemas#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#httpQuery": "limit" } }, @@ -1862,6 +1954,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#ListSchemaVersionsResponse": { @@ -1879,6 +1974,9 @@ "smithy.api#documentation": "

An array of schema version summaries.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#ListSchemas": { @@ -1927,7 +2025,6 @@ "Limit": { "target": "com.amazonaws.schemas#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#httpQuery": "limit" } }, @@ -1953,6 +2050,9 @@ "smithy.api#httpQuery": "schemaNamePrefix" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#ListSchemasResponse": { @@ -1970,6 +2070,9 @@ "smithy.api#documentation": "

An array of schema summaries.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#ListTagsForResource": { @@ -2014,6 +2117,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#ListTagsForResourceResponse": { @@ -2025,6 +2131,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#NotFoundException": { @@ -2147,6 +2256,9 @@ "smithy.api#httpQuery": "schemaVersion" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#PutCodeBindingResponse": { @@ -2176,6 +2288,9 @@ "smithy.api#documentation": "

The current status of code binding generation.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#PutResourcePolicy": { @@ -2243,7 +2358,8 @@ } }, "traits": { - "smithy.api#documentation": "

The name of the policy.

" + "smithy.api#documentation": "

The name of the policy.

", + "smithy.api#input": {} } }, "com.amazonaws.schemas#PutResourcePolicyResponse": { @@ -2261,6 +2377,9 @@ "smithy.api#documentation": "

The revision ID of the policy.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#RegistrySummary": { @@ -2318,7 +2437,6 @@ "VersionCount": { "target": "com.amazonaws.schemas#__long", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The number of versions available for the schema.

" } } @@ -2462,7 +2580,6 @@ "Limit": { "target": "com.amazonaws.schemas#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#httpQuery": "limit" } }, @@ -2481,6 +2598,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#SearchSchemasResponse": { @@ -2498,6 +2618,9 @@ "smithy.api#documentation": "

An array of SearchSchemaSummary information.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#ServiceUnavailableException": { @@ -2571,6 +2694,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#StartDiscovererResponse": { @@ -2588,6 +2714,9 @@ "smithy.api#documentation": "

The state of the discoverer.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#StopDiscoverer": { @@ -2638,6 +2767,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#StopDiscovererResponse": { @@ -2655,6 +2787,9 @@ "smithy.api#documentation": "

The state of the discoverer.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#SynthesizedJson__string": { @@ -2715,7 +2850,8 @@ } }, "traits": { - "smithy.api#documentation": "

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } }, "com.amazonaws.schemas#Tags": { @@ -2754,18 +2890,20 @@ } }, "com.amazonaws.schemas#Type": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "OpenApi3", - "name": "OpenApi3" - }, - { - "value": "JSONSchemaDraft4", - "name": "JSONSchemaDraft4" + "type": "enum", + "members": { + "OpenApi3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OpenApi3" + } + }, + "JSONSchemaDraft4": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JSONSchemaDraft4" } - ] + } } }, "com.amazonaws.schemas#UnauthorizedException": { @@ -2841,6 +2979,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#UpdateDiscoverer": { @@ -2900,10 +3041,12 @@ "CrossAccount": { "target": "com.amazonaws.schemas#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

Support discovery of schemas in events sent to the bus from another account. (default: true)

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#UpdateDiscovererResponse": { @@ -2942,7 +3085,6 @@ "CrossAccount": { "target": "com.amazonaws.schemas#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

The Status if the discoverer will discover schemas from events sent from another account.

" } }, @@ -2953,6 +3095,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#UpdateRegistry": { @@ -3011,7 +3156,8 @@ } }, "traits": { - "smithy.api#documentation": "

Updates the registry.

" + "smithy.api#documentation": "

Updates the registry.

", + "smithy.api#input": {} } }, "com.amazonaws.schemas#UpdateRegistryResponse": { @@ -3042,6 +3188,9 @@ "smithy.api#jsonName": "tags" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#UpdateSchema": { @@ -3122,6 +3271,9 @@ "smithy.api#documentation": "

The schema type for the events schema.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.schemas#UpdateSchemaResponse": { @@ -3175,19 +3327,16 @@ "smithy.api#documentation": "

The date the schema version was created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.schemas#__boolean": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } + "type": "boolean" }, "com.amazonaws.schemas#__integer": { - "type": "integer", - "traits": { - "smithy.api#default": 0 - } + "type": "integer" }, "com.amazonaws.schemas#__listOfDiscovererSummary": { "type": "list", @@ -3244,10 +3393,7 @@ } }, "com.amazonaws.schemas#__long": { - "type": "long", - "traits": { - "smithy.api#default": 0 - } + "type": "long" }, "com.amazonaws.schemas#__string": { "type": "string" @@ -3466,52 +3612,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3519,13 +3669,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3535,224 +3694,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://schemas-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://schemas-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://schemas-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://schemas-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://schemas.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://schemas.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://schemas.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://schemas.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3767,8 +3877,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3780,8 +3890,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3793,8 +3903,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3806,8 +3916,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3819,8 +3929,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3832,8 +3942,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3845,8 +3955,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3858,8 +3968,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3871,8 +3981,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3884,8 +3994,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3897,8 +4007,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3910,8 +4020,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3923,8 +4033,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3936,8 +4046,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3949,8 +4059,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3962,8 +4072,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3975,8 +4085,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3988,8 +4098,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4001,8 +4111,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4014,8 +4124,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4027,8 +4137,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4040,8 +4150,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4053,8 +4163,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4066,8 +4176,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4079,8 +4189,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4092,8 +4202,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4105,8 +4215,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4118,8 +4228,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -4131,8 +4252,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -4144,8 +4276,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -4157,8 +4300,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -4170,8 +4324,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4183,8 +4337,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4196,8 +4350,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4208,8 +4362,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4220,10 +4374,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/secrets-manager.json b/codegen/sdk-codegen/aws-models/secrets-manager.json index 724bc1b2dbe..6227ccf3a62 100644 --- a/codegen/sdk-codegen/aws-models/secrets-manager.json +++ b/codegen/sdk-codegen/aws-models/secrets-manager.json @@ -79,7 +79,20 @@ } ], "traits": { - "smithy.api#documentation": "

Turns off automatic rotation, and if a rotation is currently in\n progress, cancels the rotation.

\n

If you cancel a rotation in progress, it can leave the VersionStage\n labels in an unexpected state. You might\n need to remove the staging label AWSPENDING from the partially created version. \n You also need to determine whether to roll back to the previous version of the secret \n by moving the staging label AWSCURRENT to the version that has AWSPENDING.\n To determine \n which version has a specific staging label, call ListSecretVersionIds. Then use \n UpdateSecretVersionStage to change staging labels. \n For more information, see How rotation works.

\n

To turn on automatic rotation again, call RotateSecret.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:CancelRotateSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Turns off automatic rotation, and if a rotation is currently in\n progress, cancels the rotation.

\n

If you cancel a rotation in progress, it can leave the VersionStage\n labels in an unexpected state. You might\n need to remove the staging label AWSPENDING from the partially created version. \n You also need to determine whether to roll back to the previous version of the secret \n by moving the staging label AWSCURRENT to the version that has AWSPENDING.\n To determine \n which version has a specific staging label, call ListSecretVersionIds. Then use \n UpdateSecretVersionStage to change staging labels. \n For more information, see How rotation works.

\n

To turn on automatic rotation again, call RotateSecret.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:CancelRotateSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To cancel scheduled rotation for a secret", + "documentation": "The following example shows how to cancel rotation for a secret. The operation sets the RotationEnabled field to false and cancels all scheduled rotations. To resume scheduled rotations, you must re-enable rotation by calling the rotate-secret operation.", + "input": { + "SecretId": "MyTestDatabaseSecret" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "Name" + } + } + ] } }, "com.amazonaws.secretsmanager#CancelRotateSecretRequest": { @@ -173,7 +186,24 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new secret. A secret can be a password, a set of \n credentials such as a user name and password, an OAuth token, or other secret information \n that you store in an encrypted form in Secrets Manager. The secret also \n includes the connection information to access a database or other service, which Secrets Manager \n doesn't encrypt. A secret in Secrets Manager consists of both the protected secret data and the\n important information needed to manage the secret.

\n

For secrets that use managed rotation, you need to create the secret through the managing service. For more information, see Secrets Manager secrets managed by other Amazon Web Services services.\n\n

\n

For information about creating a secret in the console, see Create a secret.

\n

To create a secret, you can provide the secret value to be encrypted in either the\n SecretString parameter or the SecretBinary parameter, but not both. \n If you include SecretString or SecretBinary\n then Secrets Manager creates an initial secret version and automatically attaches the staging\n label AWSCURRENT to it.

\n

For database credentials you want to rotate, for Secrets Manager to be able to rotate the secret,\n you must make sure the JSON you store in the SecretString matches the JSON structure of\n a database secret.

\n

If you don't specify an KMS encryption key, Secrets Manager uses the Amazon Web Services managed key \n aws/secretsmanager. If this key \n doesn't already exist in your account, then Secrets Manager creates it for you automatically. All\n users and roles in the Amazon Web Services account automatically have access to use aws/secretsmanager. \n Creating aws/secretsmanager can result in a one-time significant delay in returning the \n result.

\n

If the secret is in a different Amazon Web Services account from the credentials calling the API, then \n you can't use aws/secretsmanager to encrypt the secret, and you must create \n and use a customer managed KMS key.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters except SecretBinary or SecretString because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:CreateSecret. If you \n include tags in the secret, you also need secretsmanager:TagResource.\n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

\n

To encrypt the secret with a KMS key other than aws/secretsmanager, you need kms:GenerateDataKey and kms:Decrypt permission to the key.

" + "smithy.api#documentation": "

Creates a new secret. A secret can be a password, a set of \n credentials such as a user name and password, an OAuth token, or other secret information \n that you store in an encrypted form in Secrets Manager. The secret also \n includes the connection information to access a database or other service, which Secrets Manager \n doesn't encrypt. A secret in Secrets Manager consists of both the protected secret data and the\n important information needed to manage the secret.

\n

For secrets that use managed rotation, you need to create the secret through the managing service. For more information, see Secrets Manager secrets managed by other Amazon Web Services services.\n\n

\n

For information about creating a secret in the console, see Create a secret.

\n

To create a secret, you can provide the secret value to be encrypted in either the\n SecretString parameter or the SecretBinary parameter, but not both. \n If you include SecretString or SecretBinary\n then Secrets Manager creates an initial secret version and automatically attaches the staging\n label AWSCURRENT to it.

\n

For database credentials you want to rotate, for Secrets Manager to be able to rotate the secret,\n you must make sure the JSON you store in the SecretString matches the JSON structure of\n a database secret.

\n

If you don't specify an KMS encryption key, Secrets Manager uses the Amazon Web Services managed key \n aws/secretsmanager. If this key \n doesn't already exist in your account, then Secrets Manager creates it for you automatically. All\n users and roles in the Amazon Web Services account automatically have access to use aws/secretsmanager. \n Creating aws/secretsmanager can result in a one-time significant delay in returning the \n result.

\n

If the secret is in a different Amazon Web Services account from the credentials calling the API, then \n you can't use aws/secretsmanager to encrypt the secret, and you must create \n and use a customer managed KMS key.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters except SecretBinary or SecretString because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:CreateSecret. If you \n include tags in the secret, you also need secretsmanager:TagResource.\n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

\n

To encrypt the secret with a KMS key other than aws/secretsmanager, you need kms:GenerateDataKey and kms:Decrypt permission to the key.

", + "smithy.api#examples": [ + { + "title": "To create a basic secret", + "documentation": "The following example shows how to create a secret. The credentials stored in the encrypted secret value are retrieved from a file on disk named mycreds.json.", + "input": { + "Name": "MyTestDatabaseSecret", + "Description": "My test database secret created with the CLI", + "SecretString": "{\"username\":\"david\",\"password\":\"EXAMPLE-PASSWORD\"}", + "ClientRequestToken": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret", + "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1" + } + } + ] } }, "com.amazonaws.secretsmanager#CreateSecretRequest": { @@ -311,7 +341,20 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the resource-based permission policy attached to the secret. To attach a policy to \n a secret, use PutResourcePolicy.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:DeleteResourcePolicy. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Deletes the resource-based permission policy attached to the secret. To attach a policy to \n a secret, use PutResourcePolicy.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:DeleteResourcePolicy. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To delete the resource-based policy attached to a secret", + "documentation": "The following example shows how to delete the resource-based policy that is attached to a secret.", + "input": { + "SecretId": "MyTestDatabaseSecret" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret" + } + } + ] } }, "com.amazonaws.secretsmanager#DeleteResourcePolicyRequest": { @@ -779,7 +822,21 @@ } ], "traits": { - "smithy.api#documentation": "

Generates a random password. We recommend that you specify the\n maximum length and include every character type that the system you are generating a password\n for can support.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:GetRandomPassword. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Generates a random password. We recommend that you specify the\n maximum length and include every character type that the system you are generating a password\n for can support.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:GetRandomPassword. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To generate a random password", + "documentation": "The following example shows how to request a randomly generated password. This example includes the optional flags to require spaces and at least one character of each included type. It specifies a length of 20 characters.", + "input": { + "PasswordLength": 20, + "IncludeSpace": true, + "RequireEachIncludedType": true + }, + "output": { + "RandomPassword": "EXAMPLE-PASSWORD" + } + } + ] } }, "com.amazonaws.secretsmanager#GetRandomPasswordRequest": { @@ -882,7 +939,21 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the JSON text of the resource-based policy document attached to the\n secret. For more information about permissions policies attached to a secret, see \n Permissions \n policies attached to a secret.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:GetResourcePolicy. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Retrieves the JSON text of the resource-based policy document attached to the\n secret. For more information about permissions policies attached to a secret, see \n Permissions \n policies attached to a secret.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:GetResourcePolicy. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To retrieve the resource-based policy attached to a secret", + "documentation": "The following example shows how to retrieve the resource-based policy that is attached to a secret.", + "input": { + "SecretId": "MyTestDatabaseSecret" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret", + "ResourcePolicy": "{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}" + } + } + ] } }, "com.amazonaws.secretsmanager#GetResourcePolicyRequest": { @@ -952,7 +1023,26 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the contents of the encrypted fields SecretString or\n SecretBinary from the specified version of a secret, whichever contains\n content.

\n

We recommend that you cache your secret values by using client-side caching. \n Caching secrets improves speed and reduces your costs. For more information, see Cache secrets for \n your applications.

\n

To retrieve the previous version of a secret, use VersionStage and specify \n AWSPREVIOUS. To revert to the previous version of a secret, call UpdateSecretVersionStage.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:GetSecretValue. \n If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key \n aws/secretsmanager, then you also need kms:Decrypt permissions for that key.\n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Retrieves the contents of the encrypted fields SecretString or\n SecretBinary from the specified version of a secret, whichever contains\n content.

\n

We recommend that you cache your secret values by using client-side caching. \n Caching secrets improves speed and reduces your costs. For more information, see Cache secrets for \n your applications.

\n

To retrieve the previous version of a secret, use VersionStage and specify \n AWSPREVIOUS. To revert to the previous version of a secret, call UpdateSecretVersionStage.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:GetSecretValue. \n If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key \n aws/secretsmanager, then you also need kms:Decrypt permissions for that key.\n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To retrieve the encrypted secret value of a secret", + "documentation": "The following example shows how to retrieve a secret string value.", + "input": { + "SecretId": "MyTestDatabaseSecret" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "CreatedDate": 1.523477145713E9, + "Name": "MyTestDatabaseSecret", + "SecretString": "{\n \"username\":\"david\",\n \"password\":\"EXAMPLE-PASSWORD\"\n}\n", + "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1", + "VersionStages": [ + "AWSPREVIOUS" + ] + } + } + ] } }, "com.amazonaws.secretsmanager#GetSecretValueRequest": { @@ -1146,6 +1236,40 @@ ], "traits": { "smithy.api#documentation": "

Lists the versions of a secret. Secrets Manager uses staging labels to indicate the different versions \n of a secret. For more information, see \n Secrets Manager concepts: Versions.

\n

To list the secrets in the account, use ListSecrets.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:ListSecretVersionIds. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To list all of the secret versions associated with a secret", + "documentation": "The following example shows how to retrieve a list of all of the versions of a secret, including those without any staging labels.", + "input": { + "SecretId": "MyTestDatabaseSecret", + "IncludeDeprecated": true + }, + "output": { + "Versions": [ + { + "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE", + "VersionStages": [ + "AWSPREVIOUS" + ], + "CreatedDate": 1.523477145713E9 + }, + { + "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE", + "VersionStages": [ + "AWSCURRENT" + ], + "CreatedDate": 1.523486221391E9 + }, + { + "CreatedDate": 1.51197446236E9, + "VersionId": "EXAMPLE3-90ab-cdef-fedc-ba987EXAMPLE;" + } + ], + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret" + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1244,6 +1368,38 @@ ], "traits": { "smithy.api#documentation": "

Lists the secrets that are stored by Secrets Manager in the Amazon Web Services account, not including secrets \n that are marked for deletion. To see secrets marked for deletion, use the Secrets Manager console.

\n

ListSecrets is eventually consistent, however it might not reflect changes from the last five minutes. \n To get the latest information for a specific secret, use DescribeSecret.

\n

To list the versions of a secret, use ListSecretVersionIds.

\n

To get the secret value from SecretString or SecretBinary, \n call GetSecretValue.

\n

For information about finding secrets in the console, see Find secrets in Secrets Manager.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:ListSecrets. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To list the secrets in your account", + "documentation": "The following example shows how to list all of the secrets in your account.", + "output": { + "SecretList": [ + { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret", + "Description": "My test database secret", + "LastChangedDate": 1.523477145729E9, + "SecretVersionsToStages": { + "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE": [ + "AWSCURRENT" + ] + } + }, + { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret1-d4e5f6", + "Name": "MyTestDatabaseSecret1", + "Description": "Another secret created for a different database", + "LastChangedDate": 1.523482025685E9, + "SecretVersionsToStages": { + "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE": [ + "AWSCURRENT" + ] + } + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1435,7 +1591,21 @@ } ], "traits": { - "smithy.api#documentation": "

Attaches a resource-based permission policy to a secret. A resource-based policy is \n optional. For more information, see Authentication and access control for Secrets Manager\n

\n

For information about attaching a policy in the console, see Attach a \n permissions policy to a secret.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:PutResourcePolicy. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Attaches a resource-based permission policy to a secret. A resource-based policy is \n optional. For more information, see Authentication and access control for Secrets Manager\n

\n

For information about attaching a policy in the console, see Attach a \n permissions policy to a secret.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:PutResourcePolicy. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To add a resource-based policy to a secret", + "documentation": "The following example shows how to add a resource-based policy to a secret.", + "input": { + "SecretId": "MyTestDatabaseSecret", + "ResourcePolicy": "{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret" + } + } + ] } }, "com.amazonaws.secretsmanager#PutResourcePolicyRequest": { @@ -1522,7 +1692,26 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new version with a new encrypted secret value and attaches it to the secret. The \n version can contain a new SecretString value or a new SecretBinary value.

\n

We recommend you avoid calling PutSecretValue at a sustained rate of more than \n once every 10 minutes. When you update the secret value, Secrets Manager creates a new version \n of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not \n remove versions created less than 24 hours ago. If you call PutSecretValue more \n than once every 10 minutes, you create more versions than Secrets Manager removes, and you will reach \n the quota for secret versions.

\n

You can specify the staging labels to attach to the new version in VersionStages. \n If you don't include VersionStages, then Secrets Manager automatically\n moves the staging label AWSCURRENT to this version. If this operation creates \n the first version for the secret, then Secrets Manager\n automatically attaches the staging label AWSCURRENT to it. \n If this operation moves the staging label AWSCURRENT from another version to this\n version, then Secrets Manager also automatically moves the staging label AWSPREVIOUS to\n the version that AWSCURRENT was removed from.

\n

This operation is idempotent. If you call this operation with a ClientRequestToken \n that matches an existing version's VersionId, and you specify the\n same secret data, the operation succeeds but does nothing. However, if the secret data is\n different, then the operation fails because you can't modify an existing version; you can\n only create new ones.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters except SecretBinary or SecretString because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:PutSecretValue. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Creates a new version with a new encrypted secret value and attaches it to the secret. The \n version can contain a new SecretString value or a new SecretBinary value.

\n

We recommend you avoid calling PutSecretValue at a sustained rate of more than \n once every 10 minutes. When you update the secret value, Secrets Manager creates a new version \n of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not \n remove versions created less than 24 hours ago. If you call PutSecretValue more \n than once every 10 minutes, you create more versions than Secrets Manager removes, and you will reach \n the quota for secret versions.

\n

You can specify the staging labels to attach to the new version in VersionStages. \n If you don't include VersionStages, then Secrets Manager automatically\n moves the staging label AWSCURRENT to this version. If this operation creates \n the first version for the secret, then Secrets Manager\n automatically attaches the staging label AWSCURRENT to it. \n If this operation moves the staging label AWSCURRENT from another version to this\n version, then Secrets Manager also automatically moves the staging label AWSPREVIOUS to\n the version that AWSCURRENT was removed from.

\n

This operation is idempotent. If you call this operation with a ClientRequestToken \n that matches an existing version's VersionId, and you specify the\n same secret data, the operation succeeds but does nothing. However, if the secret data is\n different, then the operation fails because you can't modify an existing version; you can\n only create new ones.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters except SecretBinary or SecretString because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:PutSecretValue. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To store a secret value in a new version of a secret", + "documentation": "The following example shows how to create a new version of the secret. Alternatively, you can use the update-secret command.", + "input": { + "SecretId": "MyTestDatabaseSecret", + "SecretString": "{\"username\":\"david\",\"password\":\"EXAMPLE-PASSWORD\"}", + "ClientRequestToken": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret", + "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE", + "VersionStages": [ + "AWSCURRENT" + ] + } + } + ] } }, "com.amazonaws.secretsmanager#PutSecretValueRequest": { @@ -1745,7 +1934,32 @@ } ], "traits": { - "smithy.api#documentation": "

Replicates the secret to a new Regions. See Multi-Region secrets.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:ReplicateSecretToRegions. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Replicates the secret to a new Regions. See Multi-Region secrets.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:ReplicateSecretToRegions. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "Example", + "documentation": "The following example replicates a secret to eu-west-3. The replica is encrypted with the AWS managed key aws/secretsmanager.", + "input": { + "SecretId": "MyTestSecret", + "AddReplicaRegions": [ + { + "Region": "eu-west-3" + } + ], + "ForceOverwriteReplicaSecret": true + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestSecret-1a2b3c", + "ReplicationStatus": [ + { + "Region": "eu-west-3", + "KmsKeyId": "alias/aws/secretsmanager", + "Status": "InProgress" + } + ] + } + } + ] } }, "com.amazonaws.secretsmanager#ReplicateSecretToRegionsRequest": { @@ -1894,7 +2108,20 @@ } ], "traits": { - "smithy.api#documentation": "

Cancels the scheduled deletion of a secret by removing the DeletedDate time\n stamp. You can access a secret again after it has been restored.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:RestoreSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Cancels the scheduled deletion of a secret by removing the DeletedDate time\n stamp. You can access a secret again after it has been restored.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:RestoreSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To restore a previously deleted secret", + "documentation": "The following example shows how to restore a secret that you previously scheduled for deletion.", + "input": { + "SecretId": "MyTestDatabaseSecret" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret" + } + } + ] } }, "com.amazonaws.secretsmanager#RestoreSecretRequest": { @@ -1955,7 +2182,26 @@ } ], "traits": { - "smithy.api#documentation": "

Configures and starts the asynchronous process of rotating the secret. For information about rotation, \n see Rotate secrets in the Secrets Manager User Guide. If you include the configuration parameters, the operation sets the values for the secret and then immediately starts a rotation. If you don't include the configuration parameters, the operation starts a rotation with the values already stored in the secret.

\n

When rotation is successful, the AWSPENDING staging label might be attached\n to the same version as the AWSCURRENT version, or it might not be attached to any\n version. If the AWSPENDING staging label is present but not attached to the same\n version as AWSCURRENT, then any later invocation of RotateSecret\n assumes that a previous rotation request is still in progress and returns an error. When rotation is unsuccessful, the AWSPENDING staging label might be attached to an empty secret version. For more information, see Troubleshoot rotation in the Secrets Manager User Guide.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:RotateSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager. You also need lambda:InvokeFunction permissions on the rotation function. \n For more information, see \n Permissions for rotation.

" + "smithy.api#documentation": "

Configures and starts the asynchronous process of rotating the secret. For information about rotation, \n see Rotate secrets in the Secrets Manager User Guide. If you include the configuration parameters, the operation sets the values for the secret and then immediately starts a rotation. If you don't include the configuration parameters, the operation starts a rotation with the values already stored in the secret.

\n

When rotation is successful, the AWSPENDING staging label might be attached\n to the same version as the AWSCURRENT version, or it might not be attached to any\n version. If the AWSPENDING staging label is present but not attached to the same\n version as AWSCURRENT, then any later invocation of RotateSecret\n assumes that a previous rotation request is still in progress and returns an error. When rotation is unsuccessful, the AWSPENDING staging label might be attached to an empty secret version. For more information, see Troubleshoot rotation in the Secrets Manager User Guide.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:RotateSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager. You also need lambda:InvokeFunction permissions on the rotation function. \n For more information, see \n Permissions for rotation.

", + "smithy.api#examples": [ + { + "title": "To configure rotation for a secret", + "documentation": "The following example configures rotation for a secret using a cron expression. The first rotation happens immediately after the changes are stored in the secret. The rotation schedule is the first and 15th day of every month. The rotation window begins at 4:00 PM UTC and ends at 6:00 PM.", + "input": { + "SecretId": "MyTestDatabaseSecret", + "RotationLambdaARN": "arn:aws:lambda:us-west-2:123456789012:function:MyTestDatabaseRotationLambda", + "RotationRules": { + "ScheduleExpression": "cron(0 16 1,15 * ? *)", + "Duration": "2h" + } + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret", + "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2" + } + } + ] } }, "com.amazonaws.secretsmanager#RotateSecretRequest": { @@ -2492,7 +2738,26 @@ } ], "traits": { - "smithy.api#documentation": "

Attaches tags to a secret. Tags consist of a key name and a value. Tags are part of the \n secret's metadata. They are not associated with specific versions of the secret. This operation appends tags to the existing list of tags.

\n

The following restrictions apply to tags:

\n
    \n
  • \n

    Maximum number of tags per secret: 50

    \n
  • \n
  • \n

    Maximum key length: 127 Unicode characters in UTF-8

    \n
  • \n
  • \n

    Maximum value length: 255 Unicode characters in UTF-8

    \n
  • \n
  • \n

    Tag keys and values are case sensitive.

    \n
  • \n
  • \n

    Do not use the aws: prefix in your tag names or values because Amazon Web Services reserves it\n for Amazon Web Services use. You can't edit or delete tag names or values with this \n prefix. Tags with this prefix do not count against your tags per secret limit.

    \n
  • \n
  • \n

    If you use your tagging schema across multiple services and resources,\n other services might have restrictions on allowed characters. Generally\n allowed characters: letters, spaces, and numbers representable in UTF-8, plus the\n following special characters: + - = . _ : / @.

    \n
  • \n
\n \n

If you use tags as part of your security strategy, then adding or removing a tag can\n change permissions. If successfully completing this operation would result in you losing\n your permissions for this secret, then the operation is blocked and returns an Access Denied\n error.

\n
\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:TagResource. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Attaches tags to a secret. Tags consist of a key name and a value. Tags are part of the \n secret's metadata. They are not associated with specific versions of the secret. This operation appends tags to the existing list of tags.

\n

The following restrictions apply to tags:

\n
    \n
  • \n

    Maximum number of tags per secret: 50

    \n
  • \n
  • \n

    Maximum key length: 127 Unicode characters in UTF-8

    \n
  • \n
  • \n

    Maximum value length: 255 Unicode characters in UTF-8

    \n
  • \n
  • \n

    Tag keys and values are case sensitive.

    \n
  • \n
  • \n

    Do not use the aws: prefix in your tag names or values because Amazon Web Services reserves it\n for Amazon Web Services use. You can't edit or delete tag names or values with this \n prefix. Tags with this prefix do not count against your tags per secret limit.

    \n
  • \n
  • \n

    If you use your tagging schema across multiple services and resources,\n other services might have restrictions on allowed characters. Generally\n allowed characters: letters, spaces, and numbers representable in UTF-8, plus the\n following special characters: + - = . _ : / @.

    \n
  • \n
\n \n

If you use tags as part of your security strategy, then adding or removing a tag can\n change permissions. If successfully completing this operation would result in you losing\n your permissions for this secret, then the operation is blocked and returns an Access Denied\n error.

\n
\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:TagResource. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To add tags to a secret", + "documentation": "The following example shows how to attach two tags each with a Key and Value to a secret. There is no output from this API. To see the result, use the DescribeSecret operation.", + "input": { + "SecretId": "MyExampleSecret", + "Tags": [ + { + "Key": "FirstTag", + "Value": "SomeValue" + }, + { + "Key": "SecondTag", + "Value": "AnotherValue" + } + ] + } + } + ] } }, "com.amazonaws.secretsmanager#TagResourceRequest": { @@ -2552,7 +2817,20 @@ } ], "traits": { - "smithy.api#documentation": "

Removes specific tags from a secret.

\n

This operation is idempotent. If a requested tag is not attached to the secret, no error\n is returned and the secret metadata is unchanged.

\n \n

If you use tags as part of your security strategy, then removing a tag can change\n permissions. If successfully completing this operation would result in you losing your\n permissions for this secret, then the operation is blocked and returns an Access Denied\n error.

\n
\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:UntagResource. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Removes specific tags from a secret.

\n

This operation is idempotent. If a requested tag is not attached to the secret, no error\n is returned and the secret metadata is unchanged.

\n \n

If you use tags as part of your security strategy, then removing a tag can change\n permissions. If successfully completing this operation would result in you losing your\n permissions for this secret, then the operation is blocked and returns an Access Denied\n error.

\n
\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:UntagResource. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To remove tags from a secret", + "documentation": "The following example shows how to remove two tags from a secret's metadata. For each, both the tag and the associated value are removed. There is no output from this API. To see the result, use the DescribeSecret operation.", + "input": { + "SecretId": "MyTestDatabaseSecret", + "TagKeys": [ + "FirstTag", + "SecondTag" + ] + } + } + ] } }, "com.amazonaws.secretsmanager#UntagResourceRequest": { @@ -2618,7 +2896,22 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies the details of a secret, including metadata and the secret value. To change the secret value, you can also use PutSecretValue.

\n

To change the rotation configuration of a secret, use RotateSecret instead.

\n

To change a secret so that it is managed by another service, you need to recreate the secret in that service. See Secrets Manager secrets managed by other Amazon Web Services services.

\n

We recommend you avoid calling UpdateSecret at a sustained rate of more than \n once every 10 minutes. When you call UpdateSecret to update the secret value, Secrets Manager creates a new version \n of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not \n remove versions created less than 24 hours ago. If you update the secret value more \n than once every 10 minutes, you create more versions than Secrets Manager removes, and you will reach \n the quota for secret versions.

\n

If you include SecretString or SecretBinary to create a new\n secret version, Secrets Manager automatically moves the staging label AWSCURRENT to the new\n version. Then it attaches the label AWSPREVIOUS\n to the version that AWSCURRENT was removed from.

\n

If you call this operation with a ClientRequestToken that matches an existing version's \n VersionId, the operation results in an error. You can't modify an existing \n version, you can only create a new version. To remove a version, remove all staging labels from it. See \n UpdateSecretVersionStage.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters except SecretBinary or SecretString because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:UpdateSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager. \n If you use a customer managed key, you must also have kms:GenerateDataKey, kms:Encrypt, and \n kms:Decrypt permissions on the key. If you change the KMS key and you don't have kms:Encrypt permission to the new key, Secrets Manager does not re-ecrypt existing secret versions with the new key. For more information, see \n Secret encryption and decryption.

" + "smithy.api#documentation": "

Modifies the details of a secret, including metadata and the secret value. To change the secret value, you can also use PutSecretValue.

\n

To change the rotation configuration of a secret, use RotateSecret instead.

\n

To change a secret so that it is managed by another service, you need to recreate the secret in that service. See Secrets Manager secrets managed by other Amazon Web Services services.

\n

We recommend you avoid calling UpdateSecret at a sustained rate of more than \n once every 10 minutes. When you call UpdateSecret to update the secret value, Secrets Manager creates a new version \n of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not \n remove versions created less than 24 hours ago. If you update the secret value more \n than once every 10 minutes, you create more versions than Secrets Manager removes, and you will reach \n the quota for secret versions.

\n

If you include SecretString or SecretBinary to create a new\n secret version, Secrets Manager automatically moves the staging label AWSCURRENT to the new\n version. Then it attaches the label AWSPREVIOUS\n to the version that AWSCURRENT was removed from.

\n

If you call this operation with a ClientRequestToken that matches an existing version's \n VersionId, the operation results in an error. You can't modify an existing \n version, you can only create a new version. To remove a version, remove all staging labels from it. See \n UpdateSecretVersionStage.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters except SecretBinary or SecretString because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:UpdateSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager. \n If you use a customer managed key, you must also have kms:GenerateDataKey, kms:Encrypt, and \n kms:Decrypt permissions on the key. If you change the KMS key and you don't have kms:Encrypt permission to the new key, Secrets Manager does not re-ecrypt existing secret versions with the new key. For more information, see \n Secret encryption and decryption.

", + "smithy.api#examples": [ + { + "title": "To update the description of a secret", + "documentation": "The following example shows how to modify the description of a secret.", + "input": { + "SecretId": "MyTestDatabaseSecret", + "Description": "This is a new description for the secret.", + "ClientRequestToken": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret" + } + } + ] } }, "com.amazonaws.secretsmanager#UpdateSecretRequest": { @@ -2719,7 +3012,22 @@ } ], "traits": { - "smithy.api#documentation": "

Modifies the staging labels attached to a version of a secret. Secrets Manager uses staging labels to\n track a version as it progresses through the secret rotation process. Each staging label can be \n attached to only one version at a time. To add a staging label to a version when it is already \n attached to another version, Secrets Manager first removes it from the other version first and\n then attaches it to this one. For more information about versions and staging labels, see Concepts: Version.

\n

The staging labels that you specify in the VersionStage parameter are added\n to the existing list of staging labels for the version.

\n

You can move the AWSCURRENT staging label to this version by including it in this\n call.

\n \n

Whenever you move AWSCURRENT, Secrets Manager automatically moves the label AWSPREVIOUS\n to the version that AWSCURRENT was removed from.

\n
\n

If this action results in the last label being removed from a version, then the version is\n considered to be 'deprecated' and can be deleted by Secrets Manager.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:UpdateSecretVersionStage. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Modifies the staging labels attached to a version of a secret. Secrets Manager uses staging labels to\n track a version as it progresses through the secret rotation process. Each staging label can be \n attached to only one version at a time. To add a staging label to a version when it is already \n attached to another version, Secrets Manager first removes it from the other version first and\n then attaches it to this one. For more information about versions and staging labels, see Concepts: Version.

\n

The staging labels that you specify in the VersionStage parameter are added\n to the existing list of staging labels for the version.

\n

You can move the AWSCURRENT staging label to this version by including it in this\n call.

\n \n

Whenever you move AWSCURRENT, Secrets Manager automatically moves the label AWSPREVIOUS\n to the version that AWSCURRENT was removed from.

\n
\n

If this action results in the last label being removed from a version, then the version is\n considered to be 'deprecated' and can be deleted by Secrets Manager.

\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:UpdateSecretVersionStage. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To add a staging label attached to a version of a secret", + "documentation": "The following example shows you how to add a staging label to a version of a secret. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version.", + "input": { + "SecretId": "MyTestDatabaseSecret", + "VersionStage": "STAGINGLABEL1", + "MoveToVersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1" + }, + "output": { + "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", + "Name": "MyTestDatabaseSecret" + } + } + ] } }, "com.amazonaws.secretsmanager#UpdateSecretVersionStageRequest": { @@ -2802,7 +3110,21 @@ } ], "traits": { - "smithy.api#documentation": "

Validates that a resource policy does not grant a wide range of principals access to\n your secret. A resource-based policy is optional for secrets.

\n

The API performs three checks when validating the policy:

\n
    \n
  • \n

    Sends a call to Zelkova, an automated reasoning engine, to ensure your resource policy does not\n allow broad access to your secret, for example policies that use a wildcard for the principal.

    \n
  • \n
  • \n

    Checks for correct syntax in a policy.

    \n
  • \n
  • \n

    Verifies the policy does not lock out a caller.

    \n
  • \n
\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

" + "smithy.api#documentation": "

Validates that a resource policy does not grant a wide range of principals access to\n your secret. A resource-based policy is optional for secrets.

\n

The API performs three checks when validating the policy:

\n
    \n
  • \n

    Sends a call to Zelkova, an automated reasoning engine, to ensure your resource policy does not\n allow broad access to your secret, for example policies that use a wildcard for the principal.

    \n
  • \n
  • \n

    Checks for correct syntax in a policy.

    \n
  • \n
  • \n

    Verifies the policy does not lock out a caller.

    \n
  • \n
\n

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

\n

\n Required permissions: \n secretsmanager:ValidateResourcePolicy and secretsmanager:PutResourcePolicy. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager.

", + "smithy.api#examples": [ + { + "title": "To validate a resource-based policy to a secret", + "documentation": "The following example shows how to validate a resource-based policy to a secret.", + "input": { + "SecretId": "MyTestDatabaseSecret", + "ResourcePolicy": "{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}" + }, + "output": { + "PolicyValidationPassed": true, + "ValidationErrors": [] + } + } + ] } }, "com.amazonaws.secretsmanager#ValidateResourcePolicyRequest": { @@ -2950,6 +3272,7 @@ "arnNamespace": "secretsmanager", "cloudFormationName": "SecretsManager", "cloudTrailEventSource": "secretsmanager.amazonaws.com", + "docId": "secretsmanager-2017-10-17", "endpointPrefix": "secretsmanager" }, "aws.auth#sigv4": { @@ -3018,52 +3341,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3071,13 +3398,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3087,224 +3423,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://secretsmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://secretsmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://secretsmanager-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://secretsmanager-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://secretsmanager.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://secretsmanager.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://secretsmanager.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://secretsmanager.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/serverlessapplicationrepository.json b/codegen/sdk-codegen/aws-models/serverlessapplicationrepository.json index d09b14413c8..2ad29cdbc40 100644 --- a/codegen/sdk-codegen/aws-models/serverlessapplicationrepository.json +++ b/codegen/sdk-codegen/aws-models/serverlessapplicationrepository.json @@ -430,7 +430,6 @@ "IsVerifiedAuthor": { "target": "com.amazonaws.serverlessapplicationrepository#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

Whether the author of this application has been verified. This means means that AWS has made a good faith review, as a reasonable and prudent service provider, of the information provided by the requester and has confirmed that the requester's identity is as claimed.

", "smithy.api#jsonName": "isVerifiedAuthor" } @@ -609,7 +608,6 @@ "ResourcesSupported": { "target": "com.amazonaws.serverlessapplicationrepository#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

Whether all of the AWS resources contained in this application are supported in the region\n in which it is being retrieved.

", "smithy.api#jsonName": "resourcesSupported" } @@ -1169,7 +1167,6 @@ "IsVerifiedAuthor": { "target": "com.amazonaws.serverlessapplicationrepository#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

Whether the author of this application has been verified. This means means that AWS has made a good faith review, as a reasonable and prudent service provider, of the information provided by the requester and has confirmed that the requester's identity is as claimed.

", "smithy.api#jsonName": "isVerifiedAuthor" } @@ -1420,7 +1417,6 @@ "MaxItems": { "target": "com.amazonaws.serverlessapplicationrepository#MaxItems", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The total number of items to return.

", "smithy.api#httpQuery": "maxItems" } @@ -1519,7 +1515,6 @@ "MaxItems": { "target": "com.amazonaws.serverlessapplicationrepository#MaxItems", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The total number of items to return.

", "smithy.api#httpQuery": "maxItems" } @@ -1600,7 +1595,6 @@ "MaxItems": { "target": "com.amazonaws.serverlessapplicationrepository#MaxItems", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

The total number of items to return.

", "smithy.api#httpQuery": "maxItems" } @@ -1642,7 +1636,6 @@ "com.amazonaws.serverlessapplicationrepository#MaxItems": { "type": "integer", "traits": { - "smithy.api#default": 0, "smithy.api#range": { "min": 1, "max": 100 @@ -1714,7 +1707,6 @@ "MaxLength": { "target": "com.amazonaws.serverlessapplicationrepository#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

An integer value that determines the largest number of characters that you want to allow for String types.

", "smithy.api#jsonName": "maxLength" } @@ -1722,7 +1714,6 @@ "MaxValue": { "target": "com.amazonaws.serverlessapplicationrepository#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

A numeric value that determines the largest numeric value that you want to allow for Number types.

", "smithy.api#jsonName": "maxValue" } @@ -1730,7 +1721,6 @@ "MinLength": { "target": "com.amazonaws.serverlessapplicationrepository#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

An integer value that determines the smallest number of characters that you want to allow for String types.

", "smithy.api#jsonName": "minLength" } @@ -1738,7 +1728,6 @@ "MinValue": { "target": "com.amazonaws.serverlessapplicationrepository#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

A numeric value that determines the smallest numeric value that you want to allow for Number types.

", "smithy.api#jsonName": "minValue" } @@ -1754,7 +1743,6 @@ "NoEcho": { "target": "com.amazonaws.serverlessapplicationrepository#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

Whether to mask the parameter value whenever anyone makes a call that describes the stack. If you set the\n value to true, the parameter value is masked with asterisks (*****).

", "smithy.api#jsonName": "noEcho" } @@ -1882,7 +1870,6 @@ "MonitoringTimeInMinutes": { "target": "com.amazonaws.serverlessapplicationrepository#__integer", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

This property corresponds to the content of the same name for the AWS CloudFormation RollbackConfiguration\n Data Type.

", "smithy.api#jsonName": "monitoringTimeInMinutes" } @@ -1976,6 +1963,7 @@ "arnNamespace": "serverlessrepo", "cloudFormationName": "ServerlessApplicationRepository", "cloudTrailEventSource": "serverlessapplicationrepository.amazonaws.com", + "docId": "serverlessrepo-2017-09-08", "endpointPrefix": "serverlessrepo" }, "aws.auth#sigv4": { @@ -2044,52 +2032,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2097,13 +2089,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2113,175 +2114,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://serverlessrepo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://serverlessrepo.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://serverlessrepo-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://serverlessrepo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -2290,110 +2199,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://serverlessrepo.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://serverlessrepo.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://serverlessrepo-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://serverlessrepo.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-gov-west-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://serverlessrepo.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://serverlessrepo.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://serverlessrepo.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://serverlessrepo.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2408,8 +2322,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2421,8 +2335,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2434,8 +2348,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2447,8 +2361,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2460,8 +2374,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2473,8 +2387,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2486,8 +2400,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2499,8 +2413,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2512,8 +2426,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2525,8 +2439,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2538,8 +2452,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2551,8 +2465,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2564,8 +2478,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2577,8 +2491,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2590,8 +2504,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2603,8 +2517,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2616,8 +2530,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2629,8 +2543,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2642,8 +2556,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2655,8 +2569,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2668,8 +2582,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2681,8 +2595,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2694,8 +2608,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2707,8 +2621,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2720,8 +2634,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2733,8 +2647,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2746,8 +2660,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2759,8 +2673,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2772,8 +2686,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2785,8 +2699,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2798,8 +2712,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2811,8 +2725,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -2824,8 +2749,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2837,8 +2773,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2850,8 +2797,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2863,8 +2821,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2876,8 +2834,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2889,8 +2847,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2901,8 +2859,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2913,10 +2871,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3188,7 +3152,6 @@ "IsVerifiedAuthor": { "target": "com.amazonaws.serverlessapplicationrepository#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

Whether the author of this application has been verified. This means means that AWS has made a good faith review, as a reasonable and prudent service provider, of the information provided by the requester and has confirmed that the requester's identity is as claimed.

", "smithy.api#jsonName": "isVerifiedAuthor" } @@ -3285,7 +3248,6 @@ "ResourcesSupported": { "target": "com.amazonaws.serverlessapplicationrepository#__boolean", "traits": { - "smithy.api#default": false, "smithy.api#documentation": "

Whether all of the AWS resources contained in this application are supported in the region\n in which it is being retrieved.

", "smithy.api#jsonName": "resourcesSupported", "smithy.api#required": {} @@ -3366,16 +3328,10 @@ } }, "com.amazonaws.serverlessapplicationrepository#__boolean": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } + "type": "boolean" }, "com.amazonaws.serverlessapplicationrepository#__integer": { - "type": "integer", - "traits": { - "smithy.api#default": 0 - } + "type": "integer" }, "com.amazonaws.serverlessapplicationrepository#__listOfApplicationDependencySummary": { "type": "list", diff --git a/codegen/sdk-codegen/aws-models/service-catalog-appregistry.json b/codegen/sdk-codegen/aws-models/service-catalog-appregistry.json index f376bfb5df2..ac9925afe86 100644 --- a/codegen/sdk-codegen/aws-models/service-catalog-appregistry.json +++ b/codegen/sdk-codegen/aws-models/service-catalog-appregistry.json @@ -112,6 +112,7 @@ "arnNamespace": "servicecatalog", "cloudFormationName": "ServiceCatalogAppRegistry", "cloudTrailEventSource": "servicecatalogappregistry.amazonaws.com", + "docId": "AWS242AppRegistry-2020-06-24", "endpointPrefix": "servicecatalog-appregistry" }, "aws.auth#sigv4": { @@ -180,52 +181,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -233,13 +238,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -249,92 +263,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://servicecatalog-appregistry-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -343,155 +348,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://servicecatalog-appregistry.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://servicecatalog-appregistry-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://servicecatalog-appregistry.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://servicecatalog-appregistry-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://servicecatalog-appregistry.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://servicecatalog-appregistry.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://servicecatalog-appregistry.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://servicecatalog-appregistry.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -505,9 +470,9 @@ } }, "params": { + "Region": "af-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "af-south-1" + "UseDualStack": false } }, { @@ -518,9 +483,9 @@ } }, "params": { + "Region": "ap-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-east-1" + "UseDualStack": false } }, { @@ -531,9 +496,9 @@ } }, "params": { + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { @@ -544,9 +509,9 @@ } }, "params": { + "Region": "ap-northeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-2" + "UseDualStack": false } }, { @@ -557,9 +522,9 @@ } }, "params": { + "Region": "ap-northeast-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-3" + "UseDualStack": false } }, { @@ -570,9 +535,9 @@ } }, "params": { + "Region": "ap-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-south-1" + "UseDualStack": false } }, { @@ -583,9 +548,9 @@ } }, "params": { + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { @@ -596,9 +561,9 @@ } }, "params": { + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { @@ -609,9 +574,9 @@ } }, "params": { + "Region": "ap-southeast-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-3" + "UseDualStack": false } }, { @@ -622,9 +587,9 @@ } }, "params": { + "Region": "ca-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ca-central-1" + "UseDualStack": false } }, { @@ -635,9 +600,9 @@ } }, "params": { + "Region": "ca-central-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "ca-central-1" + "UseDualStack": false } }, { @@ -648,9 +613,9 @@ } }, "params": { + "Region": "eu-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-central-1" + "UseDualStack": false } }, { @@ -661,9 +626,9 @@ } }, "params": { + "Region": "eu-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-north-1" + "UseDualStack": false } }, { @@ -674,9 +639,9 @@ } }, "params": { + "Region": "eu-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-south-1" + "UseDualStack": false } }, { @@ -687,9 +652,9 @@ } }, "params": { + "Region": "eu-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": false } }, { @@ -700,9 +665,9 @@ } }, "params": { + "Region": "eu-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-2" + "UseDualStack": false } }, { @@ -713,9 +678,9 @@ } }, "params": { + "Region": "eu-west-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-3" + "UseDualStack": false } }, { @@ -726,9 +691,9 @@ } }, "params": { + "Region": "me-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "me-south-1" + "UseDualStack": false } }, { @@ -739,9 +704,9 @@ } }, "params": { + "Region": "sa-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "sa-east-1" + "UseDualStack": false } }, { @@ -752,9 +717,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -765,9 +730,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -778,9 +743,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -791,9 +756,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -804,9 +769,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -817,9 +782,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -830,9 +795,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -843,9 +808,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -856,9 +821,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -869,9 +834,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -882,9 +847,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -895,9 +860,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -908,9 +873,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -921,9 +886,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -934,9 +899,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -947,9 +912,9 @@ } }, "params": { + "Region": "us-gov-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-west-1" + "UseDualStack": false } }, { @@ -960,9 +925,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -973,9 +938,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -986,9 +951,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -997,9 +962,9 @@ "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, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -1010,9 +975,9 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -1021,9 +986,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -1034,9 +999,9 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -1045,9 +1010,9 @@ "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, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1058,9 +1023,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1069,9 +1034,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -1082,9 +1047,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1095,9 +1060,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1120,9 +1085,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1132,9 +1097,9 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, diff --git a/codegen/sdk-codegen/aws-models/service-catalog.json b/codegen/sdk-codegen/aws-models/service-catalog.json index b8a67f2a1a6..3dd3ad023d8 100644 --- a/codegen/sdk-codegen/aws-models/service-catalog.json +++ b/codegen/sdk-codegen/aws-models/service-catalog.json @@ -310,6 +310,7 @@ "arnNamespace": "servicecatalog", "cloudFormationName": "ServiceCatalog", "cloudTrailEventSource": "servicecatalog.amazonaws.com", + "docId": "servicecatalog-2015-12-10", "endpointPrefix": "servicecatalog" }, "aws.auth#sigv4": { diff --git a/codegen/sdk-codegen/aws-models/servicediscovery.json b/codegen/sdk-codegen/aws-models/servicediscovery.json index c47eb7c1e62..15725cb349e 100644 --- a/codegen/sdk-codegen/aws-models/servicediscovery.json +++ b/codegen/sdk-codegen/aws-models/servicediscovery.json @@ -105,7 +105,21 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an HTTP namespace. Service instances registered using an HTTP namespace can be\n discovered using a DiscoverInstances request but can't be discovered using\n DNS.

\n

For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the\n Cloud Map Developer Guide.

" + "smithy.api#documentation": "

Creates an HTTP namespace. Service instances registered using an HTTP namespace can be\n discovered using a DiscoverInstances request but can't be discovered using\n DNS.

\n

For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the\n Cloud Map Developer Guide.

", + "smithy.api#examples": [ + { + "title": "CreateHttpNamespace example", + "documentation": "This example creates an HTTP namespace.", + "input": { + "CreatorRequestId": "example-creator-request-id-0001", + "Name": "example-http.com", + "Description": "Example.com AWS Cloud Map HTTP Namespace" + }, + "output": { + "OperationId": "httpvoqozuhfet5kzxoxg-a-response-example" + } + } + ] } }, "com.amazonaws.servicediscovery#CreateHttpNamespaceRequest": { @@ -182,7 +196,21 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a private namespace based on DNS, which is visible only inside a specified Amazon\n VPC. The namespace defines your service naming scheme. For example, if you name your namespace\n example.com and name your service backend, the resulting DNS name for\n the service is backend.example.com. Service instances that are registered using a\n private DNS namespace can be discovered using either a DiscoverInstances request or\n using DNS. For the current quota on the number of namespaces that you can create using the same\n Amazon Web Services account, see Cloud Map quotas in the\n Cloud Map Developer Guide.

" + "smithy.api#documentation": "

Creates a private namespace based on DNS, which is visible only inside a specified Amazon\n VPC. The namespace defines your service naming scheme. For example, if you name your namespace\n example.com and name your service backend, the resulting DNS name for\n the service is backend.example.com. Service instances that are registered using a\n private DNS namespace can be discovered using either a DiscoverInstances request or\n using DNS. For the current quota on the number of namespaces that you can create using the same\n Amazon Web Services account, see Cloud Map quotas in the\n Cloud Map Developer Guide.

", + "smithy.api#examples": [ + { + "title": "Example: Create private DNS namespace", + "documentation": "Example: Create private DNS namespace", + "input": { + "Name": "example.com", + "Vpc": "vpc-1c56417b", + "CreatorRequestId": "eedd6892-50f3-41b2-8af9-611d6e1d1a8c" + }, + "output": { + "OperationId": "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd" + } + } + ] } }, "com.amazonaws.servicediscovery#CreatePrivateDnsNamespaceRequest": { @@ -272,7 +300,21 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a public namespace based on DNS, which is visible on the internet. The namespace\n defines your service naming scheme. For example, if you name your namespace\n example.com and name your service backend, the resulting DNS name for\n the service is backend.example.com. You can discover instances that were registered\n with a public DNS namespace by using either a DiscoverInstances request or using\n DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the\n Cloud Map Developer Guide.

\n \n

The CreatePublicDnsNamespace API operation is not supported in the Amazon Web Services GovCloud (US) Regions.

\n
" + "smithy.api#documentation": "

Creates a public namespace based on DNS, which is visible on the internet. The namespace\n defines your service naming scheme. For example, if you name your namespace\n example.com and name your service backend, the resulting DNS name for\n the service is backend.example.com. You can discover instances that were registered\n with a public DNS namespace by using either a DiscoverInstances request or using\n DNS. For the current quota on the number of namespaces that you can create using the same Amazon Web Services account, see Cloud Map quotas in the\n Cloud Map Developer Guide.

\n \n

The CreatePublicDnsNamespace API operation is not supported in the Amazon Web Services GovCloud (US) Regions.

\n
", + "smithy.api#examples": [ + { + "title": "CreatePublicDnsNamespace example", + "documentation": "This example creates a public namespace based on DNS.", + "input": { + "CreatorRequestId": "example-creator-request-id-0003", + "Name": "example-public-dns.com", + "Description": "Example.com AWS Cloud Map Public DNS Namespace" + }, + "output": { + "OperationId": "dns2voqozuhfet5kzxoxg-a-response-example" + } + } + ] } }, "com.amazonaws.servicediscovery#CreatePublicDnsNamespaceRequest": { @@ -355,7 +397,48 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a service. This action defines the configuration for the following entities:

\n
    \n
  • \n

    For public and private DNS namespaces, one of the following combinations of DNS records in\n Amazon Route 53:

    \n
      \n
    • \n

      \n A\n

      \n
    • \n
    • \n

      \n AAAA\n

      \n
    • \n
    • \n

      \n A and AAAA\n

      \n
    • \n
    • \n

      \n SRV\n

      \n
    • \n
    • \n

      \n CNAME\n

      \n
    • \n
    \n
  • \n
  • \n

    Optionally, a health check

    \n
  • \n
\n

After you create the service, you can submit a RegisterInstance request, and\n Cloud Map uses the values in the configuration to create the specified entities.

\n

For the current quota on the number of instances that you can register using the same\n namespace and using the same service, see Cloud Map quotas in the\n Cloud Map Developer Guide.

" + "smithy.api#documentation": "

Creates a service. This action defines the configuration for the following entities:

\n
    \n
  • \n

    For public and private DNS namespaces, one of the following combinations of DNS records in\n Amazon Route 53:

    \n
      \n
    • \n

      \n A\n

      \n
    • \n
    • \n

      \n AAAA\n

      \n
    • \n
    • \n

      \n A and AAAA\n

      \n
    • \n
    • \n

      \n SRV\n

      \n
    • \n
    • \n

      \n CNAME\n

      \n
    • \n
    \n
  • \n
  • \n

    Optionally, a health check

    \n
  • \n
\n

After you create the service, you can submit a RegisterInstance request, and\n Cloud Map uses the values in the configuration to create the specified entities.

\n

For the current quota on the number of instances that you can register using the same\n namespace and using the same service, see Cloud Map quotas in the\n Cloud Map Developer Guide.

", + "smithy.api#examples": [ + { + "title": "Example: Create service", + "documentation": "Example: Create service", + "input": { + "Name": "myservice", + "NamespaceId": "ns-ylexjili4cdxy3xm", + "DnsConfig": { + "NamespaceId": "ns-ylexjili4cdxy3xm", + "RoutingPolicy": "MULTIVALUE", + "DnsRecords": [ + { + "Type": "A", + "TTL": 60 + } + ] + }, + "CreatorRequestId": "567c1193-6b00-4308-bd57-ad38a8822d25" + }, + "output": { + "Service": { + "Arn": "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-p5zdwlg5uvvzjita", + "CreateDate": 1.587081768334E9, + "CreatorRequestId": "567c1193-6b00-4308-bd57-ad38a8822d25", + "DnsConfig": { + "DnsRecords": [ + { + "TTL": 60, + "Type": "A" + } + ], + "NamespaceId": "ns-ylexjili4cdxy3xm", + "RoutingPolicy": "MULTIVALUE" + }, + "Id": "srv-p5zdwlg5uvvzjita", + "Name": "myservice", + "NamespaceId": "ns-ylexjili4cdxy3xm" + } + } + } + ] } }, "com.amazonaws.servicediscovery#CreateServiceRequest": { @@ -489,7 +572,19 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a namespace from the current account. If the namespace still contains one or more\n services, the request fails.

" + "smithy.api#documentation": "

Deletes a namespace from the current account. If the namespace still contains one or more\n services, the request fails.

", + "smithy.api#examples": [ + { + "title": "Example: Delete namespace", + "documentation": "Example: Delete namespace", + "input": { + "Id": "ns-ylexjili4cdxy3xm" + }, + "output": { + "OperationId": "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k98y6drk" + } + } + ] } }, "com.amazonaws.servicediscovery#DeleteNamespaceRequest": { @@ -541,7 +636,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a specified service. If the service still contains one or more registered instances,\n the request fails.

" + "smithy.api#documentation": "

Deletes a specified service. If the service still contains one or more registered instances,\n the request fails.

", + "smithy.api#examples": [ + { + "title": "Example: Delete service", + "documentation": "Example: Delete service", + "input": { + "Id": "srv-p5zdwlg5uvvzjita" + }, + "output": {} + } + ] } }, "com.amazonaws.servicediscovery#DeleteServiceRequest": { @@ -592,7 +697,20 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created for the\n specified instance.

" + "smithy.api#documentation": "

Deletes the Amazon Route 53 DNS records and health check, if any, that Cloud Map created for the\n specified instance.

", + "smithy.api#examples": [ + { + "title": "Example: Deregister a service instance", + "documentation": "Example: Deregister a service instance", + "input": { + "ServiceId": "srv-p5zdwlg5uvvzjita", + "InstanceId": "myservice-53" + }, + "output": { + "OperationId": "4yejorelbukcjzpnr6tlmrghsjwpngf4-k98rnaiq" + } + } + ] } }, "com.amazonaws.servicediscovery#DeregisterInstanceRequest": { @@ -657,7 +775,33 @@ "smithy.api#documentation": "

Discovers registered instances for a specified namespace and service. You can use\n DiscoverInstances to discover instances for any type of namespace. For public and\n private DNS namespaces, you can also use DNS queries to discover instances.

", "smithy.api#endpoint": { "hostPrefix": "data-" - } + }, + "smithy.api#examples": [ + { + "title": "Example: Discover registered instances", + "documentation": "Example: Discover registered instances", + "input": { + "NamespaceName": "example.com", + "ServiceName": "myservice", + "MaxResults": 10, + "HealthStatus": "ALL" + }, + "output": { + "Instances": [ + { + "Attributes": { + "AWS_INSTANCE_IPV4": "172.2.1.3", + "AWS_INSTANCE_PORT": "808" + }, + "HealthStatus": "UNKNOWN", + "InstanceId": "myservice-53", + "NamespaceName": "example.com", + "ServiceName": "myservice" + } + ] + } + } + ] } }, "com.amazonaws.servicediscovery#DiscoverInstancesRequest": { @@ -920,7 +1064,29 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about a specified instance.

" + "smithy.api#documentation": "

Gets information about a specified instance.

", + "smithy.api#examples": [ + { + "title": "GetInstance example", + "documentation": "This example gets information about a specified instance.", + "input": { + "InstanceId": "i-abcd1234", + "ServiceId": "srv-e4anhexample0004" + }, + "output": { + "Instance": { + "Id": "i-abcd1234", + "Attributes": { + "AWS_INSTANCE_IPV4": "192.0.2.44", + "AWS_INSTANCE_PORT": "80", + "color": "green", + "region": "us-west-2", + "stage": "beta" + } + } + } + } + ] } }, "com.amazonaws.servicediscovery#GetInstanceRequest": { @@ -980,6 +1146,21 @@ ], "traits": { "smithy.api#documentation": "

Gets the current health status (Healthy, Unhealthy, or\n Unknown) of one or more instances that are associated with a specified\n service.

\n \n

There's a brief delay between when you register an instance and when the health status for\n the instance is available.

\n
", + "smithy.api#examples": [ + { + "title": "GetInstancesHealthStatus example", + "documentation": "This example gets the current health status of one or more instances that are associate with a specified service.", + "input": { + "ServiceId": "srv-e4anhexample0004" + }, + "output": { + "Status": { + "i-abcd1234": "HEALTHY", + "i-abcd1235": "UNHEALTHY" + } + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1106,7 +1287,28 @@ } ], "traits": { - "smithy.api#documentation": "

Gets information about any operation that returns an operation ID in the response, such as a\n CreateService request.

\n \n

To get a list of operations that match specified criteria, see ListOperations.

\n
" + "smithy.api#documentation": "

Gets information about any operation that returns an operation ID in the response, such as a\n CreateService request.

\n \n

To get a list of operations that match specified criteria, see ListOperations.

\n
", + "smithy.api#examples": [ + { + "title": "Example: Get operation result", + "documentation": "Example: Get operation result", + "input": { + "OperationId": "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd" + }, + "output": { + "Operation": { + "CreateDate": 1.587055860121E9, + "Id": "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd", + "Status": "SUCCESS", + "Targets": { + "NAMESPACE": "ns-ylexjili4cdxy3xm" + }, + "Type": "CREATE_NAMESPACE", + "UpdateDate": 1.587055900469E9 + } + } + } + ] } }, "com.amazonaws.servicediscovery#GetOperationRequest": { @@ -1512,6 +1714,26 @@ ], "traits": { "smithy.api#documentation": "

Lists summary information about the instances that you registered by using a specified\n service.

", + "smithy.api#examples": [ + { + "title": "Example: List service instances", + "documentation": "Example: List service instances", + "input": { + "ServiceId": "srv-qzpwvt2tfqcegapy" + }, + "output": { + "Instances": [ + { + "Attributes": { + "AWS_INSTANCE_IPV4": "172.2.1.3", + "AWS_INSTANCE_PORT": "808" + }, + "Id": "i-06bdabbae60f65a4e" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1581,6 +1803,60 @@ ], "traits": { "smithy.api#documentation": "

Lists summary information about the namespaces that were created by the current Amazon Web Services account.

", + "smithy.api#examples": [ + { + "title": "Example: List namespaces", + "documentation": "Example: List namespaces", + "output": { + "Namespaces": [ + { + "Arn": "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-a3ccy2e7e3a7rile", + "CreateDate": 1.585354387357E9, + "Id": "ns-a3ccy2e7e3a7rile", + "Name": "local", + "Properties": { + "DnsProperties": { + "HostedZoneId": "Z06752353VBUDTC32S84S" + }, + "HttpProperties": { + "HttpName": "local" + } + }, + "Type": "DNS_PRIVATE" + }, + { + "Arn": "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-pocfyjtrsmwtvcxx", + "CreateDate": 1.586468974698E9, + "Description": "My second namespace", + "Id": "ns-pocfyjtrsmwtvcxx", + "Name": "My-second-namespace", + "Properties": { + "DnsProperties": {}, + "HttpProperties": { + "HttpName": "My-second-namespace" + } + }, + "Type": "HTTP" + }, + { + "Arn": "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-ylexjili4cdxy3xm", + "CreateDate": 1.587055896798E9, + "Id": "ns-ylexjili4cdxy3xm", + "Name": "example.com", + "Properties": { + "DnsProperties": { + "HostedZoneId": "Z09983722P0QME1B3KC8I" + }, + "HttpProperties": { + "HttpName": "example.com" + } + }, + "Type": "DNS_PRIVATE" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1649,6 +1925,40 @@ ], "traits": { "smithy.api#documentation": "

Lists operations that match the criteria that you specify.

", + "smithy.api#examples": [ + { + "title": "ListOperations Example", + "documentation": "This example gets the operations that have a STATUS of either PENDING or SUCCESS.", + "input": { + "Filters": [ + { + "Name": "STATUS", + "Condition": "IN", + "Values": [ + "PENDING", + "SUCCESS" + ] + } + ] + }, + "output": { + "Operations": [ + { + "Id": "76yy8ovhpdz0plmjzbsnqgnrqvpv2qdt-kexample", + "Status": "SUCCESS" + }, + { + "Id": "prysnyzpji3u2ciy45nke83x2zanl7yk-dexample", + "Status": "SUCCESS" + }, + { + "Id": "ko4ekftir7kzlbechsh7xvcdgcpk66gh-7example", + "Status": "PENDING" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1717,6 +2027,31 @@ ], "traits": { "smithy.api#documentation": "

Lists summary information for all the services that are associated with one or more\n specified namespaces.

", + "smithy.api#examples": [ + { + "title": "Example: List services", + "documentation": "Example: List services", + "output": { + "Services": [ + { + "Arn": "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-p5zdwlg5uvvzjita", + "CreateDate": 1.587081768334E9, + "DnsConfig": { + "DnsRecords": [ + { + "TTL": 60, + "Type": "A" + } + ], + "RoutingPolicy": "MULTIVALUE" + }, + "Id": "srv-p5zdwlg5uvvzjita", + "Name": "myservice" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -1787,7 +2122,28 @@ } ], "traits": { - "smithy.api#documentation": "

Lists tags for the specified resource.

" + "smithy.api#documentation": "

Lists tags for the specified resource.

", + "smithy.api#examples": [ + { + "title": "ListTagsForResource example", + "documentation": "This example lists the tags of a resource.", + "input": { + "ResourceARN": "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm" + }, + "output": { + "Tags": [ + { + "Key": "Project", + "Value": "Zeta" + }, + { + "Key": "Department", + "Value": "Engineering" + } + ] + } + } + ] } }, "com.amazonaws.servicediscovery#ListTagsForResourceRequest": { @@ -2649,7 +3005,25 @@ } ], "traits": { - "smithy.api#documentation": "

Creates or updates one or more records and, optionally, creates a health check based on the\n settings in a specified service. When you submit a RegisterInstance request, the\n following occurs:

\n
    \n
  • \n

    For each DNS record that you define in the service that's specified by\n ServiceId, a record is created or updated in the hosted zone that's associated\n with the corresponding namespace.

    \n
  • \n
  • \n

    If the service includes HealthCheckConfig, a health check is created based on\n the settings in the health check configuration.

    \n
  • \n
  • \n

    The health check, if any, is associated with each of the new or updated records.

    \n
  • \n
\n \n

One RegisterInstance request must complete before you can submit another\n request and specify the same service ID and instance ID.

\n
\n

For more information, see CreateService.

\n

When Cloud Map receives a DNS query for the specified DNS name, it returns the applicable\n value:

\n
    \n
  • \n

    \n If the health check is healthy: returns all the\n records

    \n
  • \n
  • \n

    \n If the health check is unhealthy: returns the applicable\n value for the last healthy instance

    \n
  • \n
  • \n

    \n If you didn't specify a health check configuration:\n returns all the records

    \n
  • \n
\n

For the current quota on the number of instances that you can register using the same\n namespace and using the same service, see Cloud Map quotas in the\n Cloud Map Developer Guide.

" + "smithy.api#documentation": "

Creates or updates one or more records and, optionally, creates a health check based on the\n settings in a specified service. When you submit a RegisterInstance request, the\n following occurs:

\n
    \n
  • \n

    For each DNS record that you define in the service that's specified by\n ServiceId, a record is created or updated in the hosted zone that's associated\n with the corresponding namespace.

    \n
  • \n
  • \n

    If the service includes HealthCheckConfig, a health check is created based on\n the settings in the health check configuration.

    \n
  • \n
  • \n

    The health check, if any, is associated with each of the new or updated records.

    \n
  • \n
\n \n

One RegisterInstance request must complete before you can submit another\n request and specify the same service ID and instance ID.

\n
\n

For more information, see CreateService.

\n

When Cloud Map receives a DNS query for the specified DNS name, it returns the applicable\n value:

\n
    \n
  • \n

    \n If the health check is healthy: returns all the\n records

    \n
  • \n
  • \n

    \n If the health check is unhealthy: returns the applicable\n value for the last healthy instance

    \n
  • \n
  • \n

    \n If you didn't specify a health check configuration:\n returns all the records

    \n
  • \n
\n

For the current quota on the number of instances that you can register using the same\n namespace and using the same service, see Cloud Map quotas in the\n Cloud Map Developer Guide.

", + "smithy.api#examples": [ + { + "title": "Example: Register Instance", + "documentation": "Example: Register Instance", + "input": { + "ServiceId": "srv-p5zdwlg5uvvzjita", + "InstanceId": "myservice-53", + "Attributes": { + "AWS_INSTANCE_IPV4": "172.2.1.3", + "AWS_INSTANCE_PORT": "808" + }, + "CreatorRequestId": "7a48a98a-72e6-4849-bfa7-1a458e030d7b" + }, + "output": { + "OperationId": "4yejorelbukcjzpnr6tlmrghsjwpngf4-k95yg2u7" + } + } + ] } }, "com.amazonaws.servicediscovery#RegisterInstanceRequest": { @@ -2941,52 +3315,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2994,13 +3372,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3010,92 +3397,135 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } ] } ], "type": "tree", "rules": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, + "conditions": [], + "endpoint": { + "url": "https://servicediscovery-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://servicediscovery-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://servicediscovery-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } ] } ], @@ -3104,130 +3534,113 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://servicediscovery-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://servicediscovery.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-cn", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ + "endpoint": { + "url": "https://servicediscovery.{Region}.amazonaws.com.cn", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [], - "type": "tree", - "rules": [ + "fn": "stringEquals", + "argv": [ + "aws-us-gov", { - "conditions": [], - "endpoint": { - "url": "https://servicediscovery.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] } ] } - ] + ], + "endpoint": { + "url": "https://servicediscovery.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] - }, - { - "conditions": [], - "type": "tree", - "rules": [ { "conditions": [], "endpoint": { - "url": "https://servicediscovery.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://servicediscovery.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://servicediscovery.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3241,9 +3654,9 @@ } }, "params": { + "Region": "af-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "af-south-1" + "UseDualStack": false } }, { @@ -3254,9 +3667,9 @@ } }, "params": { + "Region": "ap-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-east-1" + "UseDualStack": false } }, { @@ -3267,9 +3680,9 @@ } }, "params": { + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { @@ -3280,9 +3693,9 @@ } }, "params": { + "Region": "ap-northeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-2" + "UseDualStack": false } }, { @@ -3293,9 +3706,9 @@ } }, "params": { + "Region": "ap-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-south-1" + "UseDualStack": false } }, { @@ -3306,9 +3719,9 @@ } }, "params": { + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { @@ -3319,9 +3732,9 @@ } }, "params": { + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { @@ -3332,9 +3745,9 @@ } }, "params": { + "Region": "ca-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ca-central-1" + "UseDualStack": false } }, { @@ -3345,9 +3758,9 @@ } }, "params": { + "Region": "ca-central-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "ca-central-1" + "UseDualStack": false } }, { @@ -3358,9 +3771,9 @@ } }, "params": { + "Region": "eu-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-central-1" + "UseDualStack": false } }, { @@ -3371,9 +3784,9 @@ } }, "params": { + "Region": "eu-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-north-1" + "UseDualStack": false } }, { @@ -3384,9 +3797,9 @@ } }, "params": { + "Region": "eu-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-south-1" + "UseDualStack": false } }, { @@ -3397,9 +3810,9 @@ } }, "params": { + "Region": "eu-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": false } }, { @@ -3410,9 +3823,9 @@ } }, "params": { + "Region": "eu-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-2" + "UseDualStack": false } }, { @@ -3423,9 +3836,9 @@ } }, "params": { + "Region": "eu-west-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-3" + "UseDualStack": false } }, { @@ -3436,9 +3849,9 @@ } }, "params": { + "Region": "me-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "me-south-1" + "UseDualStack": false } }, { @@ -3449,9 +3862,9 @@ } }, "params": { + "Region": "sa-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "sa-east-1" + "UseDualStack": false } }, { @@ -3462,9 +3875,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -3475,9 +3888,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -3488,9 +3901,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -3501,9 +3914,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -3514,9 +3927,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -3527,9 +3940,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -3540,9 +3953,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -3553,9 +3966,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -3566,22 +3979,22 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://servicediscovery.us-east-1.api.aws" + "url": "https://servicediscovery.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -3592,9 +4005,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -3605,9 +4018,9 @@ } }, "params": { + "Region": "cn-northwest-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-northwest-1" + "UseDualStack": false } }, { @@ -3618,9 +4031,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -3631,22 +4044,22 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://servicediscovery.cn-north-1.api.amazonwebservices.com.cn" + "url": "https://servicediscovery.cn-north-1.amazonaws.com.cn" } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -3657,9 +4070,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -3670,9 +4083,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -3683,9 +4096,9 @@ } }, "params": { + "Region": "us-gov-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-west-1" + "UseDualStack": false } }, { @@ -3696,9 +4109,9 @@ } }, "params": { + "Region": "us-gov-west-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-west-1" + "UseDualStack": false } }, { @@ -3709,22 +4122,22 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://servicediscovery.us-gov-east-1.api.aws" + "url": "https://servicediscovery.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -3733,9 +4146,9 @@ "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, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -3746,9 +4159,9 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -3757,9 +4170,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -3770,9 +4183,9 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -3781,9 +4194,9 @@ "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, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -3794,9 +4207,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -3805,9 +4218,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -3818,9 +4231,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -3831,9 +4244,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -3856,9 +4269,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -3868,9 +4281,9 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -4313,7 +4726,27 @@ } ], "traits": { - "smithy.api#documentation": "

Adds one or more tags to the specified resource.

" + "smithy.api#documentation": "

Adds one or more tags to the specified resource.

", + "smithy.api#examples": [ + { + "title": "TagResource example", + "documentation": "This example adds \"Department\" and \"Project\" tags to a resource.", + "input": { + "ResourceARN": "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm", + "Tags": [ + { + "Key": "Department", + "Value": "Engineering" + }, + { + "Key": "Project", + "Value": "Zeta" + } + ] + }, + "output": {} + } + ] } }, "com.amazonaws.servicediscovery#TagResourceRequest": { @@ -4393,7 +4826,21 @@ } ], "traits": { - "smithy.api#documentation": "

Removes one or more tags from the specified resource.

" + "smithy.api#documentation": "

Removes one or more tags from the specified resource.

", + "smithy.api#examples": [ + { + "title": "UntagResource example", + "documentation": "This example removes the \"Department\" and \"Project\" tags from a resource.", + "input": { + "ResourceARN": "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm", + "TagKeys": [ + "Project", + "Department" + ] + }, + "output": {} + } + ] } }, "com.amazonaws.servicediscovery#UntagResourceRequest": { @@ -4517,7 +4964,18 @@ } ], "traits": { - "smithy.api#documentation": "

Submits a request to change the health status of a custom health check to healthy or\n unhealthy.

\n

You can use UpdateInstanceCustomHealthStatus to change the status only for\n custom health checks, which you define using HealthCheckCustomConfig when you create\n a service. You can't use it to change the status for Route 53 health checks, which you define using\n HealthCheckConfig.

\n

For more information, see HealthCheckCustomConfig.

" + "smithy.api#documentation": "

Submits a request to change the health status of a custom health check to healthy or\n unhealthy.

\n

You can use UpdateInstanceCustomHealthStatus to change the status only for\n custom health checks, which you define using HealthCheckCustomConfig when you create\n a service. You can't use it to change the status for Route 53 health checks, which you define using\n HealthCheckConfig.

\n

For more information, see HealthCheckCustomConfig.

", + "smithy.api#examples": [ + { + "title": "UpdateInstanceCustomHealthStatus Example", + "documentation": "This example submits a request to change the health status of an instance associated with a service with a custom health check to HEALTHY.", + "input": { + "InstanceId": "i-abcd1234", + "ServiceId": "srv-e4anhexample0004", + "Status": "HEALTHY" + } + } + ] } }, "com.amazonaws.servicediscovery#UpdateInstanceCustomHealthStatusRequest": { @@ -4707,7 +5165,34 @@ } ], "traits": { - "smithy.api#documentation": "

Submits a request to perform the following operations:

\n
    \n
  • \n

    Update the TTL setting for existing DnsRecords configurations

    \n
  • \n
  • \n

    Add, update, or delete HealthCheckConfig for a specified service

    \n \n

    You can't add, update, or delete a HealthCheckCustomConfig\n configuration.

    \n
    \n
  • \n
\n

For public and private DNS namespaces, note the following:

\n
    \n
  • \n

    If you omit any existing DnsRecords or HealthCheckConfig\n configurations from an UpdateService request, the configurations are deleted from\n the service.

    \n
  • \n
  • \n

    If you omit an existing HealthCheckCustomConfig configuration from an\n UpdateService request, the configuration isn't deleted from the service.

    \n
  • \n
\n

When you update settings for a service, Cloud Map also updates the corresponding settings\n in all the records and health checks that were created by using the specified service.

" + "smithy.api#documentation": "

Submits a request to perform the following operations:

\n
    \n
  • \n

    Update the TTL setting for existing DnsRecords configurations

    \n
  • \n
  • \n

    Add, update, or delete HealthCheckConfig for a specified service

    \n \n

    You can't add, update, or delete a HealthCheckCustomConfig\n configuration.

    \n
    \n
  • \n
\n

For public and private DNS namespaces, note the following:

\n
    \n
  • \n

    If you omit any existing DnsRecords or HealthCheckConfig\n configurations from an UpdateService request, the configurations are deleted from\n the service.

    \n
  • \n
  • \n

    If you omit an existing HealthCheckCustomConfig configuration from an\n UpdateService request, the configuration isn't deleted from the service.

    \n
  • \n
\n

When you update settings for a service, Cloud Map also updates the corresponding settings\n in all the records and health checks that were created by using the specified service.

", + "smithy.api#examples": [ + { + "title": "UpdateService Example", + "documentation": "This example submits a request to replace the DnsConfig and HealthCheckConfig settings of a specified service.", + "input": { + "Id": "srv-e4anhexample0004", + "Service": { + "HealthCheckConfig": { + "Type": "HTTP", + "ResourcePath": "/", + "FailureThreshold": 2 + }, + "DnsConfig": { + "DnsRecords": [ + { + "Type": "A", + "TTL": 60 + } + ] + } + } + }, + "output": { + "OperationId": "m35hsdrkxwjffm3xef4bxyy6vc3ewakx-jdn3y5g5" + } + } + ] } }, "com.amazonaws.servicediscovery#UpdateServiceRequest": { diff --git a/codegen/sdk-codegen/aws-models/ses.json b/codegen/sdk-codegen/aws-models/ses.json index 1ea1c877ce9..0585475f6b5 100644 --- a/codegen/sdk-codegen/aws-models/ses.json +++ b/codegen/sdk-codegen/aws-models/ses.json @@ -475,7 +475,17 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a receipt rule set by cloning an existing one. All receipt rules and\n configurations are copied to the new receipt rule set and are completely independent of\n the source rule set.

\n

For information about setting up rule sets, see the Amazon SES Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Creates a receipt rule set by cloning an existing one. All receipt rules and\n configurations are copied to the new receipt rule set and are completely independent of\n the source rule set.

\n

For information about setting up rule sets, see the Amazon SES Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "CloneReceiptRuleSet", + "documentation": "The following example creates a receipt rule set by cloning an existing one:", + "input": { + "RuleSetName": "RuleSetToCreate", + "OriginalRuleSetName": "RuleSetToClone" + } + } + ] } }, "com.amazonaws.ses#CloneReceiptRuleSetRequest": { @@ -971,7 +981,22 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a new IP address filter.

\n

For information about setting up IP address filters, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Creates a new IP address filter.

\n

For information about setting up IP address filters, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "CreateReceiptFilter", + "documentation": "The following example creates a new IP address filter:", + "input": { + "Filter": { + "Name": "MyFilter", + "IpFilter": { + "Policy": "Allow", + "Cidr": "1.2.3.4/24" + } + } + } + } + ] } }, "com.amazonaws.ses#CreateReceiptFilterRequest": { @@ -1030,7 +1055,31 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a receipt rule.

\n

For information about setting up receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Creates a receipt rule.

\n

For information about setting up receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "CreateReceiptRule", + "documentation": "The following example creates a new receipt rule:", + "input": { + "RuleSetName": "MyRuleSet", + "After": "", + "Rule": { + "TlsPolicy": "Optional", + "Enabled": true, + "Name": "MyRule", + "Actions": [ + { + "S3Action": { + "ObjectKeyPrefix": "email", + "BucketName": "MyBucket" + } + } + ], + "ScanEnabled": true + } + } + } + ] } }, "com.amazonaws.ses#CreateReceiptRuleRequest": { @@ -1087,7 +1136,16 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an empty receipt rule set.

\n

For information about setting up receipt rule sets, see the Amazon SES Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Creates an empty receipt rule set.

\n

For information about setting up receipt rule sets, see the Amazon SES Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "CreateReceiptRuleSet", + "documentation": "The following example creates an empty receipt rule set:", + "input": { + "RuleSetName": "MyRuleSet" + } + } + ] } }, "com.amazonaws.ses#CreateReceiptRuleSetRequest": { @@ -1475,7 +1533,16 @@ "target": "com.amazonaws.ses#DeleteIdentityResponse" }, "traits": { - "smithy.api#documentation": "

Deletes the specified identity (an email address or a domain) from the list of\n verified identities.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Deletes the specified identity (an email address or a domain) from the list of\n verified identities.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "DeleteIdentity", + "documentation": "The following example deletes an identity from the list of identities that have been submitted for verification with Amazon SES:", + "input": { + "Identity": "user@example.com" + } + } + ] } }, "com.amazonaws.ses#DeleteIdentityPolicy": { @@ -1487,7 +1554,17 @@ "target": "com.amazonaws.ses#DeleteIdentityPolicyResponse" }, "traits": { - "smithy.api#documentation": "

Deletes the specified sending authorization policy for the given identity (an email\n address or a domain). This operation returns successfully even if a policy with the\n specified name does not exist.

\n \n

This operation is for the identity owner only. If you have not verified the\n identity, it returns an error.

\n
\n

Sending authorization is a feature that enables an identity owner to authorize other\n senders to use its identities. For information about using sending authorization, see\n the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Deletes the specified sending authorization policy for the given identity (an email\n address or a domain). This operation returns successfully even if a policy with the\n specified name does not exist.

\n \n

This operation is for the identity owner only. If you have not verified the\n identity, it returns an error.

\n
\n

Sending authorization is a feature that enables an identity owner to authorize other\n senders to use its identities. For information about using sending authorization, see\n the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "DeleteIdentityPolicy", + "documentation": "The following example deletes a sending authorization policy for an identity:", + "input": { + "Identity": "user@example.com", + "PolicyName": "MyPolicy" + } + } + ] } }, "com.amazonaws.ses#DeleteIdentityPolicyRequest": { @@ -1554,7 +1631,16 @@ "target": "com.amazonaws.ses#DeleteReceiptFilterResponse" }, "traits": { - "smithy.api#documentation": "

Deletes the specified IP address filter.

\n

For information about managing IP address filters, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Deletes the specified IP address filter.

\n

For information about managing IP address filters, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "DeleteReceiptFilter", + "documentation": "The following example deletes an IP address filter:", + "input": { + "FilterName": "MyFilter" + } + } + ] } }, "com.amazonaws.ses#DeleteReceiptFilterRequest": { @@ -1595,7 +1681,17 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified receipt rule.

\n

For information about managing receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Deletes the specified receipt rule.

\n

For information about managing receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "DeleteReceiptRule", + "documentation": "The following example deletes a receipt rule:", + "input": { + "RuleSetName": "MyRuleSet", + "RuleName": "MyRule" + } + } + ] } }, "com.amazonaws.ses#DeleteReceiptRuleRequest": { @@ -1643,7 +1739,16 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified receipt rule set and all of the receipt rules it\n contains.

\n \n

The currently active rule set cannot be deleted.

\n
\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Deletes the specified receipt rule set and all of the receipt rules it\n contains.

\n \n

The currently active rule set cannot be deleted.

\n
\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "DeleteReceiptRuleSet", + "documentation": "The following example deletes a receipt rule set:", + "input": { + "RuleSetName": "MyRuleSet" + } + } + ] } }, "com.amazonaws.ses#DeleteReceiptRuleSetRequest": { @@ -1714,7 +1819,16 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Deprecated. Use the DeleteIdentity operation to delete email addresses\n and domains.

" + "smithy.api#documentation": "

Deprecated. Use the DeleteIdentity operation to delete email addresses\n and domains.

", + "smithy.api#examples": [ + { + "title": "DeleteVerifiedEmailAddress", + "documentation": "The following example deletes an email address from the list of identities that have been submitted for verification with Amazon SES:", + "input": { + "EmailAddress": "user@example.com" + } + } + ] } }, "com.amazonaws.ses#DeleteVerifiedEmailAddressRequest": { @@ -1756,7 +1870,35 @@ "target": "com.amazonaws.ses#DescribeActiveReceiptRuleSetResponse" }, "traits": { - "smithy.api#documentation": "

Returns the metadata and receipt rules for the receipt rule set that is currently\n active.

\n

For information about setting up receipt rule sets, see the Amazon SES Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Returns the metadata and receipt rules for the receipt rule set that is currently\n active.

\n

For information about setting up receipt rule sets, see the Amazon SES Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "DescribeActiveReceiptRuleSet", + "documentation": "The following example returns the metadata and receipt rules for the receipt rule set that is currently active:", + "output": { + "Metadata": { + "CreatedTimestamp": "2016-07-15T16:25:59.607Z", + "Name": "default-rule-set" + }, + "Rules": [ + { + "TlsPolicy": "Optional", + "Enabled": true, + "Name": "MyRule", + "Actions": [ + { + "S3Action": { + "ObjectKeyPrefix": "email", + "BucketName": "MyBucket" + } + } + ], + "ScanEnabled": true + } + ] + } + } + ] } }, "com.amazonaws.ses#DescribeActiveReceiptRuleSetRequest": { @@ -1880,7 +2022,33 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the details of the specified receipt rule.

\n

For information about setting up receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Returns the details of the specified receipt rule.

\n

For information about setting up receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "DescribeReceiptRule", + "documentation": "The following example returns the details of a receipt rule:", + "input": { + "RuleSetName": "MyRuleSet", + "RuleName": "MyRule" + }, + "output": { + "Rule": { + "TlsPolicy": "Optional", + "Enabled": true, + "Name": "MyRule", + "Actions": [ + { + "S3Action": { + "ObjectKeyPrefix": "email", + "BucketName": "MyBucket" + } + } + ], + "ScanEnabled": true + } + } + } + ] } }, "com.amazonaws.ses#DescribeReceiptRuleRequest": { @@ -1935,7 +2103,38 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the details of the specified receipt rule set.

\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Returns the details of the specified receipt rule set.

\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "DescribeReceiptRuleSet", + "documentation": "The following example returns the metadata and receipt rules of a receipt rule set:", + "input": { + "RuleSetName": "MyRuleSet" + }, + "output": { + "Metadata": { + "CreatedTimestamp": "2016-07-15T16:25:59.607Z", + "Name": "MyRuleSet" + }, + "Rules": [ + { + "TlsPolicy": "Optional", + "Enabled": true, + "Name": "MyRule", + "Actions": [ + { + "S3Action": { + "ObjectKeyPrefix": "email", + "BucketName": "MyBucket" + } + } + ], + "ScanEnabled": true + } + ] + } + } + ] } }, "com.amazonaws.ses#DescribeReceiptRuleSetRequest": { @@ -2340,7 +2539,16 @@ "target": "com.amazonaws.ses#GetAccountSendingEnabledResponse" }, "traits": { - "smithy.api#documentation": "

Returns the email sending status of the Amazon SES account for the current Region.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Returns the email sending status of the Amazon SES account for the current Region.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "GetAccountSendingEnabled", + "documentation": "The following example returns if sending status for an account is enabled. (true / false):", + "output": { + "Enabled": true + } + } + ] } }, "com.amazonaws.ses#GetAccountSendingEnabledResponse": { @@ -2446,7 +2654,36 @@ "target": "com.amazonaws.ses#GetIdentityDkimAttributesResponse" }, "traits": { - "smithy.api#documentation": "

Returns the current status of Easy DKIM signing for an entity. For domain name\n identities, this operation also returns the DKIM tokens that are required for Easy DKIM\n signing, and whether Amazon SES has successfully verified that these tokens have been\n published.

\n

This operation takes a list of identities as input and returns the following\n information for each:

\n
    \n
  • \n

    Whether Easy DKIM signing is enabled or disabled.

    \n
  • \n
  • \n

    A set of DKIM tokens that represent the identity. If the identity is an email\n address, the tokens represent the domain of that address.

    \n
  • \n
  • \n

    Whether Amazon SES has successfully verified the DKIM tokens published in the\n domain's DNS. This information is only returned for domain name identities, not\n for email addresses.

    \n
  • \n
\n

This operation is throttled at one request per second and can only get DKIM attributes\n for up to 100 identities at a time.

\n

For more information about creating DNS records using DKIM tokens, go to the Amazon SES\n Developer Guide.

" + "smithy.api#documentation": "

Returns the current status of Easy DKIM signing for an entity. For domain name\n identities, this operation also returns the DKIM tokens that are required for Easy DKIM\n signing, and whether Amazon SES has successfully verified that these tokens have been\n published.

\n

This operation takes a list of identities as input and returns the following\n information for each:

\n
    \n
  • \n

    Whether Easy DKIM signing is enabled or disabled.

    \n
  • \n
  • \n

    A set of DKIM tokens that represent the identity. If the identity is an email\n address, the tokens represent the domain of that address.

    \n
  • \n
  • \n

    Whether Amazon SES has successfully verified the DKIM tokens published in the\n domain's DNS. This information is only returned for domain name identities, not\n for email addresses.

    \n
  • \n
\n

This operation is throttled at one request per second and can only get DKIM attributes\n for up to 100 identities at a time.

\n

For more information about creating DNS records using DKIM tokens, go to the Amazon SES\n Developer Guide.

", + "smithy.api#examples": [ + { + "title": "GetIdentityDkimAttributes", + "documentation": "The following example retrieves the Amazon SES Easy DKIM attributes for a list of identities:", + "input": { + "Identities": [ + "example.com", + "user@example.com" + ] + }, + "output": { + "DkimAttributes": { + "example.com": { + "DkimTokens": [ + "EXAMPLEjcs5xoyqytjsotsijas7236gr", + "EXAMPLEjr76cvoc6mysspnioorxsn6ep", + "EXAMPLEkbmkqkhlm2lyz77ppkulerm4k" + ], + "DkimEnabled": true, + "DkimVerificationStatus": "Success" + }, + "user@example.com": { + "DkimEnabled": false, + "DkimVerificationStatus": "NotStarted" + } + } + } + } + ] } }, "com.amazonaws.ses#GetIdentityDkimAttributesRequest": { @@ -2490,7 +2727,27 @@ "target": "com.amazonaws.ses#GetIdentityMailFromDomainAttributesResponse" }, "traits": { - "smithy.api#documentation": "

Returns the custom MAIL FROM attributes for a list of identities (email addresses :\n domains).

\n

This operation is throttled at one request per second and can only get custom MAIL\n FROM attributes for up to 100 identities at a time.

" + "smithy.api#documentation": "

Returns the custom MAIL FROM attributes for a list of identities (email addresses :\n domains).

\n

This operation is throttled at one request per second and can only get custom MAIL\n FROM attributes for up to 100 identities at a time.

", + "smithy.api#examples": [ + { + "title": "GetIdentityMailFromDomainAttributes", + "documentation": "The following example returns the custom MAIL FROM attributes for an identity:", + "input": { + "Identities": [ + "example.com" + ] + }, + "output": { + "MailFromDomainAttributes": { + "example.com": { + "MailFromDomain": "bounces.example.com", + "BehaviorOnMXFailure": "UseDefaultValue", + "MailFromDomainStatus": "Success" + } + } + } + } + ] } }, "com.amazonaws.ses#GetIdentityMailFromDomainAttributesRequest": { @@ -2534,7 +2791,31 @@ "target": "com.amazonaws.ses#GetIdentityNotificationAttributesResponse" }, "traits": { - "smithy.api#documentation": "

Given a list of verified identities (email addresses and/or domains), returns a\n structure describing identity notification attributes.

\n

This operation is throttled at one request per second and can only get notification\n attributes for up to 100 identities at a time.

\n

For more information about using notifications with Amazon SES, see the Amazon SES\n Developer Guide.

" + "smithy.api#documentation": "

Given a list of verified identities (email addresses and/or domains), returns a\n structure describing identity notification attributes.

\n

This operation is throttled at one request per second and can only get notification\n attributes for up to 100 identities at a time.

\n

For more information about using notifications with Amazon SES, see the Amazon SES\n Developer Guide.

", + "smithy.api#examples": [ + { + "title": "GetIdentityNotificationAttributes", + "documentation": "The following example returns the notification attributes for an identity:", + "input": { + "Identities": [ + "example.com" + ] + }, + "output": { + "NotificationAttributes": { + "example.com": { + "ForwardingEnabled": true, + "HeadersInDeliveryNotificationsEnabled": false, + "HeadersInComplaintNotificationsEnabled": false, + "BounceTopic": "arn:aws:sns:us-east-1:EXAMPLE65304:ExampleTopic", + "ComplaintTopic": "arn:aws:sns:us-east-1:EXAMPLE65304:ExampleTopic", + "DeliveryTopic": "arn:aws:sns:us-east-1:EXAMPLE65304:ExampleTopic", + "HeadersInBounceNotificationsEnabled": false + } + } + } + } + ] } }, "com.amazonaws.ses#GetIdentityNotificationAttributesRequest": { @@ -2578,7 +2859,24 @@ "target": "com.amazonaws.ses#GetIdentityPoliciesResponse" }, "traits": { - "smithy.api#documentation": "

Returns the requested sending authorization policies for the given identity (an email\n address or a domain). The policies are returned as a map of policy names to policy\n contents. You can retrieve a maximum of 20 policies at a time.

\n \n

This operation is for the identity owner only. If you have not verified the\n identity, it returns an error.

\n
\n

Sending authorization is a feature that enables an identity owner to authorize other\n senders to use its identities. For information about using sending authorization, see\n the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Returns the requested sending authorization policies for the given identity (an email\n address or a domain). The policies are returned as a map of policy names to policy\n contents. You can retrieve a maximum of 20 policies at a time.

\n \n

This operation is for the identity owner only. If you have not verified the\n identity, it returns an error.

\n
\n

Sending authorization is a feature that enables an identity owner to authorize other\n senders to use its identities. For information about using sending authorization, see\n the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "GetIdentityPolicies", + "documentation": "The following example returns a sending authorization policy for an identity:", + "input": { + "Identity": "example.com", + "PolicyNames": [ + "MyPolicy" + ] + }, + "output": { + "Policies": { + "MyPolicy": "{\"Version\":\"2008-10-17\",\"Statement\":[{\"Sid\":\"stmt1469123904194\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"},\"Action\":[\"ses:SendEmail\",\"ses:SendRawEmail\"],\"Resource\":\"arn:aws:ses:us-east-1:EXAMPLE65304:identity/example.com\"}]}" + } + } + } + ] } }, "com.amazonaws.ses#GetIdentityPoliciesRequest": { @@ -2630,6 +2928,25 @@ }, "traits": { "smithy.api#documentation": "

Given a list of identities (email addresses and/or domains), returns the verification\n status and (for domain identities) the verification token for each identity.

\n

The verification status of an email address is \"Pending\" until the email address owner\n clicks the link within the verification email that Amazon SES sent to that address. If the\n email address owner clicks the link within 24 hours, the verification status of the\n email address changes to \"Success\". If the link is not clicked within 24 hours, the\n verification status changes to \"Failed.\" In that case, to verify the email address, you\n must restart the verification process from the beginning.

\n

For domain identities, the domain's verification status is \"Pending\" as Amazon SES searches\n for the required TXT record in the DNS settings of the domain. When Amazon SES detects the\n record, the domain's verification status changes to \"Success\". If Amazon SES is unable to\n detect the record within 72 hours, the domain's verification status changes to \"Failed.\"\n In that case, to verify the domain, you must restart the verification process from the\n beginning.

\n

This operation is throttled at one request per second and can only get verification\n attributes for up to 100 identities at a time.

", + "smithy.api#examples": [ + { + "title": "GetIdentityVerificationAttributes", + "documentation": "The following example returns the verification status and the verification token for a domain identity:", + "input": { + "Identities": [ + "example.com" + ] + }, + "output": { + "VerificationAttributes": { + "example.com": { + "VerificationToken": "EXAMPLE3VYb9EDI2nTOQRi/Tf6MI/6bD6THIGiP1MVY=", + "VerificationStatus": "Success" + } + } + } + } + ], "smithy.waiters#waitable": { "IdentityExists": { "acceptors": [ @@ -2690,7 +3007,18 @@ "target": "com.amazonaws.ses#GetSendQuotaResponse" }, "traits": { - "smithy.api#documentation": "

Provides the sending limits for the Amazon SES account.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Provides the sending limits for the Amazon SES account.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "GetSendQuota", + "documentation": "The following example returns the Amazon SES sending limits for an AWS account:", + "output": { + "Max24HourSend": 200, + "MaxSendRate": 1, + "SentLast24Hours": 1 + } + } + ] } }, "com.amazonaws.ses#GetSendQuotaResponse": { @@ -2732,7 +3060,38 @@ "target": "com.amazonaws.ses#GetSendStatisticsResponse" }, "traits": { - "smithy.api#documentation": "

Provides sending statistics for the current Amazon Web Services Region. The result is a list of data\n points, representing the last two weeks of sending activity. Each data point in the list\n contains statistics for a 15-minute period of time.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Provides sending statistics for the current Amazon Web Services Region. The result is a list of data\n points, representing the last two weeks of sending activity. Each data point in the list\n contains statistics for a 15-minute period of time.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "GetSendStatistics", + "documentation": "The following example returns Amazon SES sending statistics:", + "output": { + "SendDataPoints": [ + { + "Complaints": 0, + "Timestamp": "2016-07-13T22:43:00Z", + "DeliveryAttempts": 5, + "Bounces": 0, + "Rejects": 0 + }, + { + "Complaints": 0, + "Timestamp": "2016-07-13T23:13:00Z", + "DeliveryAttempts": 3, + "Bounces": 0, + "Rejects": 0 + }, + { + "Complaints": 0, + "Timestamp": "2016-07-13T21:13:00Z", + "DeliveryAttempts": 1, + "Bounces": 0, + "Rejects": 0 + } + ] + } + } + ] } }, "com.amazonaws.ses#GetSendStatisticsResponse": { @@ -3441,6 +3800,23 @@ }, "traits": { "smithy.api#documentation": "

Returns a list containing all of the identities (email addresses and domains) for your\n Amazon Web Services account in the current Amazon Web Services Region, regardless of verification status.

\n

You can execute this operation no more than once per second.

\n \n

It's recommended that for successive pagination calls of this API, you continue to\n the use the same parameter/value pairs as used in the original call, e.g., if you\n used IdentityType=Domain in the the original call and received a\n NextToken in the response, you should continue providing the\n IdentityType=Domain parameter for further NextToken\n calls; however, if you didn't provide the IdentityType parameter in the\n original call, then continue to not provide it for successive pagination calls.\n Using this protocol will ensure consistent results.

\n
", + "smithy.api#examples": [ + { + "title": "ListIdentities", + "documentation": "The following example lists the email address identities that have been submitted for verification with Amazon SES:", + "input": { + "IdentityType": "EmailAddress", + "NextToken": "", + "MaxItems": 123 + }, + "output": { + "Identities": [ + "user@example.com" + ], + "NextToken": "" + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -3507,7 +3883,21 @@ "target": "com.amazonaws.ses#ListIdentityPoliciesResponse" }, "traits": { - "smithy.api#documentation": "

Returns a list of sending authorization policies that are attached to the given\n identity (an email address or a domain). This operation returns only a list. To get the\n actual policy content, use GetIdentityPolicies.

\n \n

This operation is for the identity owner only. If you have not verified the\n identity, it returns an error.

\n
\n

Sending authorization is a feature that enables an identity owner to authorize other\n senders to use its identities. For information about using sending authorization, see\n the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Returns a list of sending authorization policies that are attached to the given\n identity (an email address or a domain). This operation returns only a list. To get the\n actual policy content, use GetIdentityPolicies.

\n \n

This operation is for the identity owner only. If you have not verified the\n identity, it returns an error.

\n
\n

Sending authorization is a feature that enables an identity owner to authorize other\n senders to use its identities. For information about using sending authorization, see\n the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "ListIdentityPolicies", + "documentation": "The following example returns a list of sending authorization policies that are attached to an identity:", + "input": { + "Identity": "example.com" + }, + "output": { + "PolicyNames": [ + "MyPolicy" + ] + } + } + ] } }, "com.amazonaws.ses#ListIdentityPoliciesRequest": { @@ -3551,7 +3941,24 @@ "target": "com.amazonaws.ses#ListReceiptFiltersResponse" }, "traits": { - "smithy.api#documentation": "

Lists the IP address filters associated with your Amazon Web Services account in the current\n Amazon Web Services Region.

\n

For information about managing IP address filters, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Lists the IP address filters associated with your Amazon Web Services account in the current\n Amazon Web Services Region.

\n

For information about managing IP address filters, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "ListReceiptFilters", + "documentation": "The following example lists the IP address filters that are associated with an AWS account:", + "output": { + "Filters": [ + { + "IpFilter": { + "Policy": "Block", + "Cidr": "1.2.3.4/24" + }, + "Name": "MyFilter" + } + ] + } + } + ] } }, "com.amazonaws.ses#ListReceiptFiltersRequest": { @@ -3586,7 +3993,25 @@ "target": "com.amazonaws.ses#ListReceiptRuleSetsResponse" }, "traits": { - "smithy.api#documentation": "

Lists the receipt rule sets that exist under your Amazon Web Services account in the current\n Amazon Web Services Region. If there are additional receipt rule sets to be retrieved, you receive a\n NextToken that you can provide to the next call to\n ListReceiptRuleSets to retrieve the additional entries.

\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Lists the receipt rule sets that exist under your Amazon Web Services account in the current\n Amazon Web Services Region. If there are additional receipt rule sets to be retrieved, you receive a\n NextToken that you can provide to the next call to\n ListReceiptRuleSets to retrieve the additional entries.

\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "ListReceiptRuleSets", + "documentation": "The following example lists the receipt rule sets that exist under an AWS account:", + "input": { + "NextToken": "" + }, + "output": { + "RuleSets": [ + { + "CreatedTimestamp": "2016-07-15T16:25:59.607Z", + "Name": "MyRuleSet" + } + ], + "NextToken": "" + } + } + ] } }, "com.amazonaws.ses#ListReceiptRuleSetsRequest": { @@ -3686,7 +4111,19 @@ "target": "com.amazonaws.ses#ListVerifiedEmailAddressesResponse" }, "traits": { - "smithy.api#documentation": "

Deprecated. Use the ListIdentities operation to list the email addresses\n and domains associated with your account.

" + "smithy.api#documentation": "

Deprecated. Use the ListIdentities operation to list the email addresses\n and domains associated with your account.

", + "smithy.api#examples": [ + { + "title": "ListVerifiedEmailAddresses", + "documentation": "The following example lists all email addresses that have been submitted for verification with Amazon SES:", + "output": { + "VerifiedEmailAddresses": [ + "user1@example.com", + "user2@example.com" + ] + } + } + ] } }, "com.amazonaws.ses#ListVerifiedEmailAddressesResponse": { @@ -4034,7 +4471,18 @@ } ], "traits": { - "smithy.api#documentation": "

Adds or updates a sending authorization policy for the specified identity (an email\n address or a domain).

\n \n

This operation is for the identity owner only. If you have not verified the\n identity, it returns an error.

\n
\n

Sending authorization is a feature that enables an identity owner to authorize other\n senders to use its identities. For information about using sending authorization, see\n the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Adds or updates a sending authorization policy for the specified identity (an email\n address or a domain).

\n \n

This operation is for the identity owner only. If you have not verified the\n identity, it returns an error.

\n
\n

Sending authorization is a feature that enables an identity owner to authorize other\n senders to use its identities. For information about using sending authorization, see\n the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "PutIdentityPolicy", + "documentation": "The following example adds a sending authorization policy to an identity:", + "input": { + "Identity": "example.com", + "PolicyName": "MyPolicy", + "Policy": "{\"Version\":\"2008-10-17\",\"Statement\":[{\"Sid\":\"stmt1469123904194\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:root\"},\"Action\":[\"ses:SendEmail\",\"ses:SendRawEmail\"],\"Resource\":\"arn:aws:ses:us-east-1:EXAMPLE65304:identity/example.com\"}]}" + } + } + ] } }, "com.amazonaws.ses#PutIdentityPolicyRequest": { @@ -4394,7 +4842,20 @@ } ], "traits": { - "smithy.api#documentation": "

Reorders the receipt rules within a receipt rule set.

\n \n

All of the rules in the rule set must be represented in this request. That is, it\n is error if the reorder request doesn't explicitly position all of the rules.

\n
\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Reorders the receipt rules within a receipt rule set.

\n \n

All of the rules in the rule set must be represented in this request. That is, it\n is error if the reorder request doesn't explicitly position all of the rules.

\n
\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "ReorderReceiptRuleSet", + "documentation": "The following example reorders the receipt rules within a receipt rule set:", + "input": { + "RuleSetName": "MyRuleSet", + "RuleNames": [ + "MyRule", + "MyOtherRule" + ] + } + } + ] } }, "com.amazonaws.ses#ReorderReceiptRuleSetRequest": { @@ -4952,7 +5413,49 @@ } ], "traits": { - "smithy.api#documentation": "

Composes an email message and immediately queues it for sending. To send email using\n this operation, your message must meet the following requirements:

\n
    \n
  • \n

    The message must be sent from a verified email address or domain. If you\n attempt to send email using a non-verified address or domain, the operation\n results in an \"Email address not verified\" error.

    \n
  • \n
  • \n

    If your account is still in the Amazon SES sandbox, you may only send to verified\n addresses or domains, or to email addresses associated with the Amazon SES Mailbox\n Simulator. For more information, see Verifying Email\n Addresses and Domains in the Amazon SES Developer\n Guide.\n

    \n
  • \n
  • \n

    The maximum message size is 10 MB.

    \n
  • \n
  • \n

    The message must include at least one recipient email address. The recipient\n address can be a To: address, a CC: address, or a BCC: address. If a recipient\n email address is invalid (that is, it is not in the format\n UserName@[SubDomain.]Domain.TopLevelDomain), the entire\n message is rejected, even if the message contains other recipients that are\n valid.

    \n
  • \n
  • \n

    The message may not include more than 50 recipients, across the To:, CC: and\n BCC: fields. If you need to send an email message to a larger audience, you can\n divide your recipient list into groups of 50 or fewer, and then call the\n SendEmail operation several times to send the message to each\n group.

    \n
  • \n
\n \n

For every message that you send, the total number of recipients (including each\n recipient in the To:, CC: and BCC: fields) is counted against the maximum number of\n emails you can send in a 24-hour period (your sending quota).\n For more information about sending quotas in Amazon SES, see Managing Your Amazon SES Sending\n Limits in the Amazon SES Developer Guide.\n

\n
" + "smithy.api#documentation": "

Composes an email message and immediately queues it for sending. To send email using\n this operation, your message must meet the following requirements:

\n
    \n
  • \n

    The message must be sent from a verified email address or domain. If you\n attempt to send email using a non-verified address or domain, the operation\n results in an \"Email address not verified\" error.

    \n
  • \n
  • \n

    If your account is still in the Amazon SES sandbox, you may only send to verified\n addresses or domains, or to email addresses associated with the Amazon SES Mailbox\n Simulator. For more information, see Verifying Email\n Addresses and Domains in the Amazon SES Developer\n Guide.\n

    \n
  • \n
  • \n

    The maximum message size is 10 MB.

    \n
  • \n
  • \n

    The message must include at least one recipient email address. The recipient\n address can be a To: address, a CC: address, or a BCC: address. If a recipient\n email address is invalid (that is, it is not in the format\n UserName@[SubDomain.]Domain.TopLevelDomain), the entire\n message is rejected, even if the message contains other recipients that are\n valid.

    \n
  • \n
  • \n

    The message may not include more than 50 recipients, across the To:, CC: and\n BCC: fields. If you need to send an email message to a larger audience, you can\n divide your recipient list into groups of 50 or fewer, and then call the\n SendEmail operation several times to send the message to each\n group.

    \n
  • \n
\n \n

For every message that you send, the total number of recipients (including each\n recipient in the To:, CC: and BCC: fields) is counted against the maximum number of\n emails you can send in a 24-hour period (your sending quota).\n For more information about sending quotas in Amazon SES, see Managing Your Amazon SES Sending\n Limits in the Amazon SES Developer Guide.\n

\n
", + "smithy.api#examples": [ + { + "title": "SendEmail", + "documentation": "The following example sends a formatted email:", + "input": { + "Source": "sender@example.com", + "Destination": { + "ToAddresses": [ + "recipient1@example.com", + "recipient2@example.com" + ], + "CcAddresses": [ + "recipient3@example.com" + ], + "BccAddresses": [] + }, + "Message": { + "Subject": { + "Data": "Test email", + "Charset": "UTF-8" + }, + "Body": { + "Text": { + "Data": "This is the message body in text format.", + "Charset": "UTF-8" + }, + "Html": { + "Data": "This message body contains HTML formatting. It can, for example, contain links like this one: Amazon SES Developer Guide.", + "Charset": "UTF-8" + } + } + }, + "ReplyToAddresses": [], + "ReturnPath": "", + "SourceArn": "", + "ReturnPathArn": "" + }, + "output": { + "MessageId": "EXAMPLE78603177f-7a5433e7-8edb-42ae-af10-f0181f34d6ee-000000" + } + } + ] } }, "com.amazonaws.ses#SendEmailRequest": { @@ -5063,7 +5566,26 @@ } ], "traits": { - "smithy.api#documentation": "

Composes an email message and immediately queues it for sending.

\n

This operation is more flexible than the SendEmail operation. When you\n use the SendRawEmail operation, you can specify the headers of the message\n as well as its content. This flexibility is useful, for example, when you need to send a\n multipart MIME email (such a message that contains both a text and an HTML version). You\n can also use this operation to send messages that include attachments.

\n

The SendRawEmail operation has the following requirements:

\n
    \n
  • \n

    You can only send email from verified email addresses or domains. If you try to send email from\n an address that isn't verified, the operation results in an \"Email address not\n verified\" error.

    \n
  • \n
  • \n

    If your account is still in the Amazon SES sandbox, you can only send email to other verified addresses\n in your account, or to addresses that are associated with the Amazon SES mailbox simulator.

    \n
  • \n
  • \n

    The maximum message size, including attachments, is 10 MB.

    \n
  • \n
  • \n

    Each message has to include at least one recipient address. A recipient\n address includes any address on the To:, CC:, or BCC: lines.

    \n
  • \n
  • \n

    If you send a single message to more than one recipient address, and one of\n the recipient addresses isn't in a valid format (that is, it's not in the format\n UserName@[SubDomain.]Domain.TopLevelDomain), Amazon SES\n rejects the entire message, even if the other addresses are valid.

    \n
  • \n
  • \n

    Each message can include up to 50 recipient addresses across the To:, CC:, or\n BCC: lines. If you need to send a single message to more than 50 recipients, you\n have to split the list of recipient addresses into groups of less than 50\n recipients, and send separate messages to each group.

    \n
  • \n
  • \n

    Amazon SES allows you to specify 8-bit Content-Transfer-Encoding for MIME message\n parts. However, if Amazon SES has to modify the contents of your message (for\n example, if you use open and click tracking), 8-bit content isn't preserved. For\n this reason, we highly recommend that you encode all content that isn't 7-bit\n ASCII. For more information, see MIME Encoding in the Amazon SES Developer\n Guide.

    \n
  • \n
\n

Additionally, keep the following considerations in mind when using the\n SendRawEmail operation:

\n
    \n
  • \n

    Although you can customize the message headers when using the\n SendRawEmail operation, Amazon SES automatically applies its own\n Message-ID and Date headers; if you passed these\n headers when creating the message, they are overwritten by the values that Amazon SES\n provides.

    \n
  • \n
  • \n

    If you are using sending authorization to send on behalf of another user,\n SendRawEmail enables you to specify the cross-account identity\n for the email's Source, From, and Return-Path parameters in one of two ways: you\n can pass optional parameters SourceArn, FromArn,\n and/or ReturnPathArn, or you can include the following X-headers in\n the header of your raw email:

    \n
      \n
    • \n

      \n X-SES-SOURCE-ARN\n

      \n
    • \n
    • \n

      \n X-SES-FROM-ARN\n

      \n
    • \n
    • \n

      \n X-SES-RETURN-PATH-ARN\n

      \n
    • \n
    \n \n

    Don't include these X-headers in the DKIM signature. Amazon SES removes these\n before it sends the email.

    \n
    \n

    If you only specify the SourceIdentityArn parameter, Amazon SES sets\n the From and Return-Path addresses to the same identity that you\n specified.

    \n

    For more information about sending authorization, see the Using\n Sending Authorization with Amazon SES in the Amazon SES Developer\n Guide.\n

    \n
  • \n
  • \n

    For every message that you send, the total number of recipients (including\n each recipient in the To:, CC: and BCC: fields) is counted against the maximum\n number of emails you can send in a 24-hour period (your sending\n quota). For more information about sending quotas in Amazon SES, see\n Managing Your Amazon SES Sending Limits in the Amazon SES Developer\n Guide.\n

    \n
  • \n
" + "smithy.api#documentation": "

Composes an email message and immediately queues it for sending.

\n

This operation is more flexible than the SendEmail operation. When you\n use the SendRawEmail operation, you can specify the headers of the message\n as well as its content. This flexibility is useful, for example, when you need to send a\n multipart MIME email (such a message that contains both a text and an HTML version). You\n can also use this operation to send messages that include attachments.

\n

The SendRawEmail operation has the following requirements:

\n
    \n
  • \n

    You can only send email from verified email addresses or domains. If you try to send email from\n an address that isn't verified, the operation results in an \"Email address not\n verified\" error.

    \n
  • \n
  • \n

    If your account is still in the Amazon SES sandbox, you can only send email to other verified addresses\n in your account, or to addresses that are associated with the Amazon SES mailbox simulator.

    \n
  • \n
  • \n

    The maximum message size, including attachments, is 10 MB.

    \n
  • \n
  • \n

    Each message has to include at least one recipient address. A recipient\n address includes any address on the To:, CC:, or BCC: lines.

    \n
  • \n
  • \n

    If you send a single message to more than one recipient address, and one of\n the recipient addresses isn't in a valid format (that is, it's not in the format\n UserName@[SubDomain.]Domain.TopLevelDomain), Amazon SES\n rejects the entire message, even if the other addresses are valid.

    \n
  • \n
  • \n

    Each message can include up to 50 recipient addresses across the To:, CC:, or\n BCC: lines. If you need to send a single message to more than 50 recipients, you\n have to split the list of recipient addresses into groups of less than 50\n recipients, and send separate messages to each group.

    \n
  • \n
  • \n

    Amazon SES allows you to specify 8-bit Content-Transfer-Encoding for MIME message\n parts. However, if Amazon SES has to modify the contents of your message (for\n example, if you use open and click tracking), 8-bit content isn't preserved. For\n this reason, we highly recommend that you encode all content that isn't 7-bit\n ASCII. For more information, see MIME Encoding in the Amazon SES Developer\n Guide.

    \n
  • \n
\n

Additionally, keep the following considerations in mind when using the\n SendRawEmail operation:

\n
    \n
  • \n

    Although you can customize the message headers when using the\n SendRawEmail operation, Amazon SES automatically applies its own\n Message-ID and Date headers; if you passed these\n headers when creating the message, they are overwritten by the values that Amazon SES\n provides.

    \n
  • \n
  • \n

    If you are using sending authorization to send on behalf of another user,\n SendRawEmail enables you to specify the cross-account identity\n for the email's Source, From, and Return-Path parameters in one of two ways: you\n can pass optional parameters SourceArn, FromArn,\n and/or ReturnPathArn, or you can include the following X-headers in\n the header of your raw email:

    \n
      \n
    • \n

      \n X-SES-SOURCE-ARN\n

      \n
    • \n
    • \n

      \n X-SES-FROM-ARN\n

      \n
    • \n
    • \n

      \n X-SES-RETURN-PATH-ARN\n

      \n
    • \n
    \n \n

    Don't include these X-headers in the DKIM signature. Amazon SES removes these\n before it sends the email.

    \n
    \n

    If you only specify the SourceIdentityArn parameter, Amazon SES sets\n the From and Return-Path addresses to the same identity that you\n specified.

    \n

    For more information about sending authorization, see the Using\n Sending Authorization with Amazon SES in the Amazon SES Developer\n Guide.\n

    \n
  • \n
  • \n

    For every message that you send, the total number of recipients (including\n each recipient in the To:, CC: and BCC: fields) is counted against the maximum\n number of emails you can send in a 24-hour period (your sending\n quota). For more information about sending quotas in Amazon SES, see\n Managing Your Amazon SES Sending Limits in the Amazon SES Developer\n Guide.\n

    \n
  • \n
", + "smithy.api#examples": [ + { + "title": "SendRawEmail", + "documentation": "The following example sends an email with an attachment:", + "input": { + "Source": "", + "Destinations": [], + "RawMessage": { + "Data": "From: sender@example.com\\nTo: recipient@example.com\\nSubject: Test email (contains an attachment)\\nMIME-Version: 1.0\\nContent-type: Multipart/Mixed; boundary=\"NextPart\"\\n\\n--NextPart\\nContent-Type: text/plain\\n\\nThis is the message body.\\n\\n--NextPart\\nContent-Type: text/plain;\\nContent-Disposition: attachment; filename=\"attachment.txt\"\\n\\nThis is the text in the attachment.\\n\\n--NextPart--" + }, + "FromArn": "", + "SourceArn": "", + "ReturnPathArn": "" + }, + "output": { + "MessageId": "EXAMPLEf3f73d99b-c63fb06f-d263-41f8-a0fb-d0dc67d56c07-000000" + } + } + ] } }, "com.amazonaws.ses#SendRawEmailRequest": { @@ -5286,7 +5808,16 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the specified receipt rule set as the active receipt rule set.

\n \n

To disable your email-receiving through Amazon SES completely, you can call this\n operation with RuleSetName set to null.

\n
\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Sets the specified receipt rule set as the active receipt rule set.

\n \n

To disable your email-receiving through Amazon SES completely, you can call this\n operation with RuleSetName set to null.

\n
\n

For information about managing receipt rule sets, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "SetActiveReceiptRuleSet", + "documentation": "The following example sets the active receipt rule set:", + "input": { + "RuleSetName": "RuleSetToActivate" + } + } + ] } }, "com.amazonaws.ses#SetActiveReceiptRuleSetRequest": { @@ -5321,7 +5852,17 @@ "target": "com.amazonaws.ses#SetIdentityDkimEnabledResponse" }, "traits": { - "smithy.api#documentation": "

Enables or disables Easy DKIM signing of email sent from an identity. If Easy DKIM\n signing is enabled for a domain, then Amazon SES uses DKIM to sign all email that it sends\n from addresses on that domain. If Easy DKIM signing is enabled for an email address,\n then Amazon SES uses DKIM to sign all email it sends from that address.

\n \n

For email addresses (for example, user@example.com), you can only\n enable DKIM signing if the corresponding domain (in this case,\n example.com) has been set up to use Easy DKIM.

\n
\n

You can enable DKIM signing for an identity at any time after you start the\n verification process for the identity, even if the verification process isn't complete.

\n

You can execute this operation no more than once per second.

\n

For more information about Easy DKIM signing, go to the Amazon SES Developer\n Guide.

" + "smithy.api#documentation": "

Enables or disables Easy DKIM signing of email sent from an identity. If Easy DKIM\n signing is enabled for a domain, then Amazon SES uses DKIM to sign all email that it sends\n from addresses on that domain. If Easy DKIM signing is enabled for an email address,\n then Amazon SES uses DKIM to sign all email it sends from that address.

\n \n

For email addresses (for example, user@example.com), you can only\n enable DKIM signing if the corresponding domain (in this case,\n example.com) has been set up to use Easy DKIM.

\n
\n

You can enable DKIM signing for an identity at any time after you start the\n verification process for the identity, even if the verification process isn't complete.

\n

You can execute this operation no more than once per second.

\n

For more information about Easy DKIM signing, go to the Amazon SES Developer\n Guide.

", + "smithy.api#examples": [ + { + "title": "SetIdentityDkimEnabled", + "documentation": "The following example configures Amazon SES to Easy DKIM-sign the email sent from an identity:", + "input": { + "Identity": "user@example.com", + "DkimEnabled": true + } + } + ] } }, "com.amazonaws.ses#SetIdentityDkimEnabledRequest": { @@ -5365,7 +5906,17 @@ "target": "com.amazonaws.ses#SetIdentityFeedbackForwardingEnabledResponse" }, "traits": { - "smithy.api#documentation": "

Given an identity (an email address or a domain), enables or disables whether Amazon SES\n forwards bounce and complaint notifications as email. Feedback forwarding can only be\n disabled when Amazon Simple Notification Service (Amazon SNS) topics are specified for both bounces and\n complaints.

\n \n

Feedback forwarding does not apply to delivery notifications. Delivery\n notifications are only available through Amazon SNS.

\n
\n

You can execute this operation no more than once per second.

\n

For more information about using notifications with Amazon SES, see the Amazon SES\n Developer Guide.

" + "smithy.api#documentation": "

Given an identity (an email address or a domain), enables or disables whether Amazon SES\n forwards bounce and complaint notifications as email. Feedback forwarding can only be\n disabled when Amazon Simple Notification Service (Amazon SNS) topics are specified for both bounces and\n complaints.

\n \n

Feedback forwarding does not apply to delivery notifications. Delivery\n notifications are only available through Amazon SNS.

\n
\n

You can execute this operation no more than once per second.

\n

For more information about using notifications with Amazon SES, see the Amazon SES\n Developer Guide.

", + "smithy.api#examples": [ + { + "title": "SetIdentityFeedbackForwardingEnabled", + "documentation": "The following example configures Amazon SES to forward an identity's bounces and complaints via email:", + "input": { + "Identity": "user@example.com", + "ForwardingEnabled": true + } + } + ] } }, "com.amazonaws.ses#SetIdentityFeedbackForwardingEnabledRequest": { @@ -5409,7 +5960,18 @@ "target": "com.amazonaws.ses#SetIdentityHeadersInNotificationsEnabledResponse" }, "traits": { - "smithy.api#documentation": "

Given an identity (an email address or a domain), sets whether Amazon SES includes the\n original email headers in the Amazon Simple Notification Service (Amazon SNS) notifications of a specified\n type.

\n

You can execute this operation no more than once per second.

\n

For more information about using notifications with Amazon SES, see the Amazon SES\n Developer Guide.

" + "smithy.api#documentation": "

Given an identity (an email address or a domain), sets whether Amazon SES includes the\n original email headers in the Amazon Simple Notification Service (Amazon SNS) notifications of a specified\n type.

\n

You can execute this operation no more than once per second.

\n

For more information about using notifications with Amazon SES, see the Amazon SES\n Developer Guide.

", + "smithy.api#examples": [ + { + "title": "SetIdentityHeadersInNotificationsEnabled", + "documentation": "The following example configures Amazon SES to include the original email headers in the Amazon SNS bounce notifications for an identity:", + "input": { + "Identity": "user@example.com", + "NotificationType": "Bounce", + "Enabled": true + } + } + ] } }, "com.amazonaws.ses#SetIdentityHeadersInNotificationsEnabledRequest": { @@ -5460,7 +6022,18 @@ "target": "com.amazonaws.ses#SetIdentityMailFromDomainResponse" }, "traits": { - "smithy.api#documentation": "

Enables or disables the custom MAIL FROM domain setup for a verified identity (an\n email address or a domain).

\n \n

To send emails using the specified MAIL FROM domain, you must add an MX record to\n your MAIL FROM domain's DNS settings. To ensure that your emails pass Sender Policy\n Framework (SPF) checks, you must also add or update an SPF record. For more\n information, see the Amazon SES Developer Guide.

\n
\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Enables or disables the custom MAIL FROM domain setup for a verified identity (an\n email address or a domain).

\n \n

To send emails using the specified MAIL FROM domain, you must add an MX record to\n your MAIL FROM domain's DNS settings. To ensure that your emails pass Sender Policy\n Framework (SPF) checks, you must also add or update an SPF record. For more\n information, see the Amazon SES Developer Guide.

\n
\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "SetIdentityMailFromDomain", + "documentation": "The following example configures Amazon SES to use a custom MAIL FROM domain for an identity:", + "input": { + "Identity": "user@example.com", + "MailFromDomain": "bounces.example.com", + "BehaviorOnMXFailure": "UseDefaultValue" + } + } + ] } }, "com.amazonaws.ses#SetIdentityMailFromDomainRequest": { @@ -5508,7 +6081,18 @@ "target": "com.amazonaws.ses#SetIdentityNotificationTopicResponse" }, "traits": { - "smithy.api#documentation": "

Sets an Amazon Simple Notification Service (Amazon SNS) topic to use when delivering notifications. When you use\n this operation, you specify a verified identity, such as an email address or domain.\n When you send an email that uses the chosen identity in the Source field, Amazon SES sends\n notifications to the topic you specified. You can send bounce, complaint, or delivery\n notifications (or any combination of the three) to the Amazon SNS topic that you\n specify.

\n

You can execute this operation no more than once per second.

\n

For more information about feedback notification, see the Amazon SES\n Developer Guide.

" + "smithy.api#documentation": "

Sets an Amazon Simple Notification Service (Amazon SNS) topic to use when delivering notifications. When you use\n this operation, you specify a verified identity, such as an email address or domain.\n When you send an email that uses the chosen identity in the Source field, Amazon SES sends\n notifications to the topic you specified. You can send bounce, complaint, or delivery\n notifications (or any combination of the three) to the Amazon SNS topic that you\n specify.

\n

You can execute this operation no more than once per second.

\n

For more information about feedback notification, see the Amazon SES\n Developer Guide.

", + "smithy.api#examples": [ + { + "title": "SetIdentityNotificationTopic", + "documentation": "The following example sets the Amazon SNS topic to which Amazon SES will publish bounce, complaint, and/or delivery notifications for emails sent with the specified identity as the Source:", + "input": { + "Identity": "user@example.com", + "NotificationType": "Bounce", + "SnsTopic": "arn:aws:sns:us-west-2:111122223333:MyTopic" + } + } + ] } }, "com.amazonaws.ses#SetIdentityNotificationTopicRequest": { @@ -5565,7 +6149,18 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the position of the specified receipt rule in the receipt rule set.

\n

For information about managing receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Sets the position of the specified receipt rule in the receipt rule set.

\n

For information about managing receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "SetReceiptRulePosition", + "documentation": "The following example sets the position of a receipt rule in a receipt rule set:", + "input": { + "RuleSetName": "MyRuleSet", + "RuleName": "RuleToReposition", + "After": "PutRuleAfterThisRule" + } + } + ] } }, "com.amazonaws.ses#SetReceiptRulePositionRequest": { @@ -5829,6 +6424,7 @@ "arnNamespace": "ses", "cloudFormationName": "SES", "cloudTrailEventSource": "ses.amazonaws.com", + "docId": "email-2010-12-01", "endpointPrefix": "email" }, "aws.auth#sigv4": { @@ -5900,52 +6496,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -5953,13 +6553,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -5969,224 +6578,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://email-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://email-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://email.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://email.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://email.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://email.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -7078,7 +7638,16 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Enables or disables email sending across your entire Amazon SES account in the current\n Amazon Web Services Region. You can use this operation in conjunction with Amazon CloudWatch alarms to\n temporarily pause email sending across your Amazon SES account in a given Amazon Web Services Region when\n reputation metrics (such as your bounce or complaint rates) reach certain\n thresholds.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Enables or disables email sending across your entire Amazon SES account in the current\n Amazon Web Services Region. You can use this operation in conjunction with Amazon CloudWatch alarms to\n temporarily pause email sending across your Amazon SES account in a given Amazon Web Services Region when\n reputation metrics (such as your bounce or complaint rates) reach certain\n thresholds.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "UpdateAccountSendingEnabled", + "documentation": "The following example updated the sending status for this account.", + "input": { + "Enabled": true + } + } + ] } }, "com.amazonaws.ses#UpdateAccountSendingEnabledRequest": { @@ -7171,7 +7740,17 @@ } ], "traits": { - "smithy.api#documentation": "

Enables or disables the publishing of reputation metrics for emails sent using a\n specific configuration set in a given Amazon Web Services Region. Reputation metrics include bounce\n and complaint rates. These metrics are published to Amazon CloudWatch. By using CloudWatch, you can\n create alarms when bounce or complaint rates exceed certain thresholds.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Enables or disables the publishing of reputation metrics for emails sent using a\n specific configuration set in a given Amazon Web Services Region. Reputation metrics include bounce\n and complaint rates. These metrics are published to Amazon CloudWatch. By using CloudWatch, you can\n create alarms when bounce or complaint rates exceed certain thresholds.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "UpdateConfigurationSetReputationMetricsEnabled", + "documentation": "Set the reputationMetricsEnabled flag for a specific configuration set.", + "input": { + "ConfigurationSetName": "foo", + "Enabled": true + } + } + ] } }, "com.amazonaws.ses#UpdateConfigurationSetReputationMetricsEnabledRequest": { @@ -7212,7 +7791,17 @@ } ], "traits": { - "smithy.api#documentation": "

Enables or disables email sending for messages sent using a specific configuration set\n in a given Amazon Web Services Region. You can use this operation in conjunction with Amazon CloudWatch alarms\n to temporarily pause email sending for a configuration set when the reputation metrics\n for that configuration set (such as your bounce on complaint rate) exceed certain\n thresholds.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Enables or disables email sending for messages sent using a specific configuration set\n in a given Amazon Web Services Region. You can use this operation in conjunction with Amazon CloudWatch alarms\n to temporarily pause email sending for a configuration set when the reputation metrics\n for that configuration set (such as your bounce on complaint rate) exceed certain\n thresholds.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "UpdateConfigurationSetReputationMetricsEnabled", + "documentation": "Set the sending enabled flag for a specific configuration set.", + "input": { + "ConfigurationSetName": "foo", + "Enabled": true + } + } + ] } }, "com.amazonaws.ses#UpdateConfigurationSetSendingEnabledRequest": { @@ -7390,7 +7979,30 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a receipt rule.

\n

For information about managing receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Updates a receipt rule.

\n

For information about managing receipt rules, see the Amazon SES\n Developer Guide.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "UpdateReceiptRule", + "documentation": "The following example updates a receipt rule to use an Amazon S3 action:", + "input": { + "RuleSetName": "MyRuleSet", + "Rule": { + "TlsPolicy": "Optional", + "Enabled": true, + "Name": "MyRule", + "Actions": [ + { + "S3Action": { + "ObjectKeyPrefix": "email", + "BucketName": "MyBucket" + } + } + ], + "ScanEnabled": true + } + } + } + ] } }, "com.amazonaws.ses#UpdateReceiptRuleRequest": { @@ -7527,7 +8139,23 @@ "target": "com.amazonaws.ses#VerifyDomainDkimResponse" }, "traits": { - "smithy.api#documentation": "

Returns a set of DKIM tokens for a domain identity.

\n \n

When you execute the VerifyDomainDkim operation, the domain that you\n specify is added to the list of identities that are associated with your account.\n This is true even if you haven't already associated the domain with your account by\n using the VerifyDomainIdentity operation. However, you can't send email\n from the domain until you either successfully verify\n it or you successfully set up DKIM for\n it.

\n
\n

You use the tokens that are generated by this operation to create CNAME records. When\n Amazon SES detects that you've added these records to the DNS configuration for a domain, you\n can start sending email from that domain. You can start sending email even if you\n haven't added the TXT record provided by the VerifyDomainIdentity operation to the DNS\n configuration for your domain. All email that you send from the domain is authenticated\n using DKIM.

\n

To create the CNAME records for DKIM authentication, use the following values:

\n
    \n
  • \n

    \n Name:\n token._domainkey.example.com\n

    \n
  • \n
  • \n

    \n Type: CNAME

    \n
  • \n
  • \n

    \n Value:\n token.dkim.amazonses.com

    \n
  • \n
\n

In the preceding example, replace token with one of the tokens\n that are generated when you execute this operation. Replace\n example.com with your domain. Repeat this process for each\n token that's generated by this operation.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Returns a set of DKIM tokens for a domain identity.

\n \n

When you execute the VerifyDomainDkim operation, the domain that you\n specify is added to the list of identities that are associated with your account.\n This is true even if you haven't already associated the domain with your account by\n using the VerifyDomainIdentity operation. However, you can't send email\n from the domain until you either successfully verify\n it or you successfully set up DKIM for\n it.

\n
\n

You use the tokens that are generated by this operation to create CNAME records. When\n Amazon SES detects that you've added these records to the DNS configuration for a domain, you\n can start sending email from that domain. You can start sending email even if you\n haven't added the TXT record provided by the VerifyDomainIdentity operation to the DNS\n configuration for your domain. All email that you send from the domain is authenticated\n using DKIM.

\n

To create the CNAME records for DKIM authentication, use the following values:

\n
    \n
  • \n

    \n Name:\n token._domainkey.example.com\n

    \n
  • \n
  • \n

    \n Type: CNAME

    \n
  • \n
  • \n

    \n Value:\n token.dkim.amazonses.com

    \n
  • \n
\n

In the preceding example, replace token with one of the tokens\n that are generated when you execute this operation. Replace\n example.com with your domain. Repeat this process for each\n token that's generated by this operation.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "VerifyDomainDkim", + "documentation": "The following example generates DKIM tokens for a domain that has been verified with Amazon SES:", + "input": { + "Domain": "example.com" + }, + "output": { + "DkimTokens": [ + "EXAMPLEq76owjnks3lnluwg65scbemvw", + "EXAMPLEi3dnsj67hstzaj673klariwx2", + "EXAMPLEwfbtcukvimehexktmdtaz6naj" + ] + } + } + ] } }, "com.amazonaws.ses#VerifyDomainDkimRequest": { @@ -7571,7 +8199,19 @@ "target": "com.amazonaws.ses#VerifyDomainIdentityResponse" }, "traits": { - "smithy.api#documentation": "

Adds a domain to the list of identities for your Amazon SES account in the current\n Amazon Web Services Region and attempts to verify it. For more information about verifying domains,\n see Verifying Email Addresses and Domains in the Amazon SES Developer\n Guide.\n

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Adds a domain to the list of identities for your Amazon SES account in the current\n Amazon Web Services Region and attempts to verify it. For more information about verifying domains,\n see Verifying Email Addresses and Domains in the Amazon SES Developer\n Guide.\n

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "VerifyDomainIdentity", + "documentation": "The following example starts the domain verification process with Amazon SES:", + "input": { + "Domain": "example.com" + }, + "output": { + "VerificationToken": "eoEmxw+YaYhb3h3iVJHuXMJXqeu1q1/wwmvjuEXAMPLE" + } + } + ] } }, "com.amazonaws.ses#VerifyDomainIdentityRequest": { @@ -7615,7 +8255,16 @@ "target": "smithy.api#Unit" }, "traits": { - "smithy.api#documentation": "

Deprecated. Use the VerifyEmailIdentity operation to verify a new email\n address.

" + "smithy.api#documentation": "

Deprecated. Use the VerifyEmailIdentity operation to verify a new email\n address.

", + "smithy.api#examples": [ + { + "title": "VerifyEmailAddress", + "documentation": "The following example starts the email address verification process with Amazon SES:", + "input": { + "EmailAddress": "user@example.com" + } + } + ] } }, "com.amazonaws.ses#VerifyEmailAddressRequest": { @@ -7643,7 +8292,16 @@ "target": "com.amazonaws.ses#VerifyEmailIdentityResponse" }, "traits": { - "smithy.api#documentation": "

Adds an email address to the list of identities for your Amazon SES account in the current\n Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a\n verification email is sent to the specified address.

\n

You can execute this operation no more than once per second.

" + "smithy.api#documentation": "

Adds an email address to the list of identities for your Amazon SES account in the current\n Amazon Web Services Region and attempts to verify it. As a result of executing this operation, a\n verification email is sent to the specified address.

\n

You can execute this operation no more than once per second.

", + "smithy.api#examples": [ + { + "title": "VerifyEmailIdentity", + "documentation": "The following example starts the email address verification process with Amazon SES:", + "input": { + "EmailAddress": "user@example.com" + } + } + ] } }, "com.amazonaws.ses#VerifyEmailIdentityRequest": { diff --git a/codegen/sdk-codegen/aws-models/sfn.json b/codegen/sdk-codegen/aws-models/sfn.json index 92764ad2580..24605d3c882 100644 --- a/codegen/sdk-codegen/aws-models/sfn.json +++ b/codegen/sdk-codegen/aws-models/sfn.json @@ -142,6 +142,7 @@ "arnNamespace": "states", "cloudFormationName": "StepFunctions", "cloudTrailEventSource": "sfn.amazonaws.com", + "docId": "states-2016-11-23", "endpointPrefix": "states" }, "aws.auth#sigv4": { @@ -213,52 +214,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -266,13 +271,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -282,92 +296,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://states-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://states-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -376,149 +381,109 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://states.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "Region" }, - { - "conditions": [], - "endpoint": { - "url": "https://states-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "us-gov-west-1" ] } - ] + ], + "endpoint": { + "url": "https://states.us-gov-west-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://states-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://states.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://states.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://states.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://states.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/shield.json b/codegen/sdk-codegen/aws-models/shield.json index 9385c546b3e..bb13c64f116 100644 --- a/codegen/sdk-codegen/aws-models/shield.json +++ b/codegen/sdk-codegen/aws-models/shield.json @@ -219,52 +219,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -272,521 +276,302 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - }, - "aws" - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://shield-fips.{Region}.api.aws", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] + "ref": "PartitionResult" }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://shield-fips.us-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "shield", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "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://shield.{Region}.api.aws", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://shield.us-east-1.amazonaws.com", + "properties": { + "authSchemes": [ { - "conditions": [], - "endpoint": { - "url": "https://shield.us-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "shield", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" + "name": "sigv4", + "signingName": "shield", + "signingRegion": "us-east-1" } ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ { - "ref": "UseFIPS" + "ref": "PartitionResult" }, - true + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://shield-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://shield-fips.us-east-1.amazonaws.com", + "properties": { + "authSchemes": [ { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "name": "sigv4", + "signingName": "shield", + "signingRegion": "us-east-1" } ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } - ], - "type": "tree", - "rules": [ + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, { - "conditions": [], - "type": "tree", - "rules": [ + "fn": "getAttr", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://shield-fips.us-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "shield", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://shield-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://shield-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://shield.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://shield-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "aws-global" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://shield.us-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "shield", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://shield.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://shield.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://shield.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -810,8 +595,8 @@ }, "params": { "Region": "aws-global", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -832,8 +617,8 @@ }, "params": { "Region": "aws-global", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -845,8 +630,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -867,8 +652,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -880,8 +665,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -902,8 +687,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -915,8 +700,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -928,8 +713,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -941,8 +726,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -954,8 +739,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -967,8 +752,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -980,8 +765,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -993,8 +778,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1006,8 +791,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1019,8 +815,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1032,8 +839,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1045,8 +863,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1058,8 +887,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1071,8 +900,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1084,8 +913,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1096,8 +925,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1108,10 +937,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1165,18 +1000,20 @@ } }, "com.amazonaws.shield#ApplicationLayerAutomaticResponseStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" } - ] + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } } }, "com.amazonaws.shield#AssociateDRTLogBucket": { @@ -1227,11 +1064,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#AssociateDRTLogBucketResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#AssociateDRTRole": { "type": "operation", @@ -1262,7 +1105,7 @@ } ], "traits": { - "smithy.api#documentation": "

Authorizes the Shield Response Team (SRT) using the specified role, to access your Amazon Web Services account to assist with DDoS attack mitigation during potential attacks. This enables the SRT to inspect your WAF configuration and create or update WAF rules and web ACLs.

\n

You can associate only one RoleArn with your subscription. If you submit an AssociateDRTRole request for an account that already has an associated role, the new RoleArn will replace the existing RoleArn.

\n

Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy managed policy to the role that you'll specify in the request. You can access this policy in the IAM console at AWSShieldDRTAccessPolicy. For more information see Adding and removing IAM identity permissions. The role must also trust the service principal\ndrt.shield.amazonaws.com. For more information, see IAM JSON policy elements: Principal.

\n\n

The SRT will have access only to your WAF and Shield resources. By submitting this request, you authorize the SRT to inspect your WAF and Shield configuration and create and update WAF rules and web ACLs on your behalf. The SRT takes these actions only if explicitly authorized by you.

\n

You must have the iam:PassRole permission to make an AssociateDRTRole request. For more information, see Granting a user permissions to pass a role to an Amazon Web Services service.

\n

To use the services of the SRT and make an AssociateDRTRole request, you must be subscribed to the Business Support plan or the Enterprise Support plan.

" + "smithy.api#documentation": "

Authorizes the Shield Response Team (SRT) using the specified role, to access your Amazon Web Services account to assist with DDoS attack mitigation during potential attacks. This enables the SRT to inspect your WAF configuration and create or update WAF rules and web ACLs.

\n

You can associate only one RoleArn with your subscription. If you submit an AssociateDRTRole request for an account that already has an associated role, the new RoleArn will replace the existing RoleArn.

\n

Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy managed policy to the role that you'll specify in the request. You can access this policy in the IAM console at AWSShieldDRTAccessPolicy. For more information see Adding and removing IAM identity permissions. The role must also trust the service principal\ndrt.shield.amazonaws.com. For more information, see IAM JSON policy elements: Principal.

\n

The SRT will have access only to your WAF and Shield resources. By submitting this request, you authorize the SRT to inspect your WAF and Shield configuration and create and update WAF rules and web ACLs on your behalf. The SRT takes these actions only if explicitly authorized by you.

\n

You must have the iam:PassRole permission to make an AssociateDRTRole request. For more information, see Granting a user permissions to pass a role to an Amazon Web Services service.

\n

To use the services of the SRT and make an AssociateDRTRole request, you must be subscribed to the Business Support plan or the Enterprise Support plan.

" } }, "com.amazonaws.shield#AssociateDRTRoleRequest": { @@ -1271,15 +1114,21 @@ "RoleArn": { "target": "com.amazonaws.shield#RoleArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role the SRT will use to access your Amazon Web Services account.

\n\t

Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy managed policy to this role. For more information see Attaching and Detaching IAM Policies.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role the SRT will use to access your Amazon Web Services account.

\n

Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy managed policy to this role. For more information see Attaching and Detaching IAM Policies.

", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#AssociateDRTRoleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#AssociateHealthCheck": { "type": "operation", @@ -1330,11 +1179,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#AssociateHealthCheckResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#AssociateProactiveEngagementDetails": { "type": "operation", @@ -1375,11 +1230,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#AssociateProactiveEngagementDetailsResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#AttackDetail": { "type": "structure", @@ -1448,18 +1309,20 @@ } }, "com.amazonaws.shield#AttackLayer": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NETWORK", - "name": "NETWORK" - }, - { - "value": "APPLICATION", - "name": "APPLICATION" + "type": "enum", + "members": { + "NETWORK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NETWORK" + } + }, + "APPLICATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPLICATION" } - ] + } } }, "com.amazonaws.shield#AttackProperties": { @@ -1492,7 +1355,7 @@ "Unit": { "target": "com.amazonaws.shield#Unit", "traits": { - "smithy.api#documentation": "

The unit used for the Contributor \n Value property.

" + "smithy.api#documentation": "

The unit used for the Contributor\n Value property.

" } }, "Total": { @@ -1508,42 +1371,56 @@ } }, "com.amazonaws.shield#AttackPropertyIdentifier": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DESTINATION_URL", - "name": "DESTINATION_URL" - }, - { - "value": "REFERRER", - "name": "REFERRER" - }, - { - "value": "SOURCE_ASN", - "name": "SOURCE_ASN" - }, - { - "value": "SOURCE_COUNTRY", - "name": "SOURCE_COUNTRY" - }, - { - "value": "SOURCE_IP_ADDRESS", - "name": "SOURCE_IP_ADDRESS" - }, - { - "value": "SOURCE_USER_AGENT", - "name": "SOURCE_USER_AGENT" - }, - { - "value": "WORDPRESS_PINGBACK_REFLECTOR", - "name": "WORDPRESS_PINGBACK_REFLECTOR" - }, - { - "value": "WORDPRESS_PINGBACK_SOURCE", - "name": "WORDPRESS_PINGBACK_SOURCE" + "type": "enum", + "members": { + "DESTINATION_URL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DESTINATION_URL" } - ] + }, + "REFERRER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REFERRER" + } + }, + "SOURCE_ASN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SOURCE_ASN" + } + }, + "SOURCE_COUNTRY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SOURCE_COUNTRY" + } + }, + "SOURCE_IP_ADDRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SOURCE_IP_ADDRESS" + } + }, + "SOURCE_USER_AGENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SOURCE_USER_AGENT" + } + }, + "WORDPRESS_PINGBACK_REFLECTOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORDPRESS_PINGBACK_REFLECTOR" + } + }, + "WORDPRESS_PINGBACK_SOURCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WORDPRESS_PINGBACK_SOURCE" + } + } } }, "com.amazonaws.shield#AttackStatisticsDataItem": { @@ -1627,7 +1504,7 @@ "VectorType": { "target": "com.amazonaws.shield#String", "traits": { - "smithy.api#documentation": "

The attack type. Valid values:

\n\t
    \n
  • \n

    UDP_TRAFFIC

    \n
  • \n
  • \n

    UDP_FRAGMENT

    \n
  • \n
  • \n

    GENERIC_UDP_REFLECTION

    \n
  • \n
  • \n

    DNS_REFLECTION

    \n
  • \n
  • \n

    NTP_REFLECTION

    \n
  • \n
  • \n

    CHARGEN_REFLECTION

    \n
  • \n
  • \n

    SSDP_REFLECTION

    \n
  • \n
  • \n

    PORT_MAPPER

    \n
  • \n
  • \n

    RIP_REFLECTION

    \n
  • \n
  • \n

    SNMP_REFLECTION

    \n
  • \n
  • \n

    MSSQL_REFLECTION

    \n
  • \n
  • \n

    NET_BIOS_REFLECTION

    \n
  • \n
  • \n

    SYN_FLOOD

    \n
  • \n
  • \n

    ACK_FLOOD

    \n
  • \n
  • \n

    REQUEST_FLOOD

    \n
  • \n
  • \n

    HTTP_REFLECTION

    \n
  • \n
  • \n

    UDS_REFLECTION

    \n
  • \n
  • \n

    MEMCACHED_REFLECTION

    \n
  • \n
", + "smithy.api#documentation": "

The attack type. Valid values:

\n
    \n
  • \n

    UDP_TRAFFIC

    \n
  • \n
  • \n

    UDP_FRAGMENT

    \n
  • \n
  • \n

    GENERIC_UDP_REFLECTION

    \n
  • \n
  • \n

    DNS_REFLECTION

    \n
  • \n
  • \n

    NTP_REFLECTION

    \n
  • \n
  • \n

    CHARGEN_REFLECTION

    \n
  • \n
  • \n

    SSDP_REFLECTION

    \n
  • \n
  • \n

    PORT_MAPPER

    \n
  • \n
  • \n

    RIP_REFLECTION

    \n
  • \n
  • \n

    SNMP_REFLECTION

    \n
  • \n
  • \n

    MSSQL_REFLECTION

    \n
  • \n
  • \n

    NET_BIOS_REFLECTION

    \n
  • \n
  • \n

    SYN_FLOOD

    \n
  • \n
  • \n

    ACK_FLOOD

    \n
  • \n
  • \n

    REQUEST_FLOOD

    \n
  • \n
  • \n

    HTTP_REFLECTION

    \n
  • \n
  • \n

    UDS_REFLECTION

    \n
  • \n
  • \n

    MEMCACHED_REFLECTION

    \n
  • \n
", "smithy.api#required": {} } } @@ -1685,25 +1562,27 @@ } }, "com.amazonaws.shield#AutoRenew": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" } - ] + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } } }, "com.amazonaws.shield#BlockAction": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Specifies that Shield Advanced should configure its WAF rules with the WAF Block action.

\n

This is only used in the context of the ResponseAction setting.

\n

JSON specification: \"Block\": {}\n

" + "smithy.api#documentation": "

Specifies that Shield Advanced should configure its WAF rules with the WAF Block action.

\n

This is only used in the context of the ResponseAction setting.

\n

JSON specification: \"Block\": {}\n

" } }, "com.amazonaws.shield#ContactNotes": { @@ -1741,7 +1620,7 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

Specifies that Shield Advanced should configure its WAF rules with the WAF Count action.

\n

This is only used in the context of the ResponseAction setting.

\n

JSON specification: \"Count\": {}\n

" + "smithy.api#documentation": "

Specifies that Shield Advanced should configure its WAF rules with the WAF Count action.

\n

This is only used in the context of the ResponseAction setting.

\n

JSON specification: \"Count\": {}\n

" } }, "com.amazonaws.shield#CreateProtection": { @@ -1856,11 +1735,17 @@ "smithy.api#documentation": "

One or more tag key-value pairs for the protection group.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#CreateProtectionGroupResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#CreateProtectionRequest": { "type": "structure", @@ -1885,6 +1770,9 @@ "smithy.api#documentation": "

One or more tag key-value pairs for the Protection object that is created.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#CreateProtectionResponse": { @@ -1896,6 +1784,9 @@ "smithy.api#documentation": "

The unique identifier (ID) for the Protection object that is created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#CreateSubscription": { @@ -1915,16 +1806,22 @@ } ], "traits": { - "smithy.api#documentation": "

Activates Shield Advanced for an account.

\n \n

For accounts that are members of an Organizations organization, Shield Advanced subscriptions are billed against the organization's payer account,\n regardless of whether the payer account itself is subscribed.

\n
\n

When you initially create a subscription, your subscription is set to be automatically renewed at the end of the existing subscription period. You can change this by submitting an UpdateSubscription request.

" + "smithy.api#documentation": "

Activates Shield Advanced for an account.

\n \n

For accounts that are members of an Organizations organization, Shield Advanced subscriptions are billed against the organization's payer account,\n regardless of whether the payer account itself is subscribed.

\n
\n

When you initially create a subscription, your subscription is set to be automatically renewed at the end of the existing subscription period. You can change this by submitting an UpdateSubscription request.

" } }, "com.amazonaws.shield#CreateSubscriptionRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.shield#CreateSubscriptionResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#DeleteProtection": { "type": "operation", @@ -1982,11 +1879,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#DeleteProtectionGroupResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#DeleteProtectionRequest": { "type": "structure", @@ -1998,11 +1901,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#DeleteProtectionResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#DeleteSubscription": { "type": "operation", @@ -2032,14 +1941,16 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#deprecated": {} + "smithy.api#deprecated": {}, + "smithy.api#input": {} } }, "com.amazonaws.shield#DeleteSubscriptionResponse": { "type": "structure", "members": {}, "traits": { - "smithy.api#deprecated": {} + "smithy.api#deprecated": {}, + "smithy.api#output": {} } }, "com.amazonaws.shield#DescribeAttack": { @@ -2072,6 +1983,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#DescribeAttackResponse": { @@ -2083,6 +1997,9 @@ "smithy.api#documentation": "

The attack that you requested.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#DescribeAttackStatistics": { @@ -2104,7 +2021,10 @@ }, "com.amazonaws.shield#DescribeAttackStatisticsRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.shield#DescribeAttackStatisticsResponse": { "type": "structure", @@ -2123,6 +2043,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#DescribeDRTAccess": { @@ -2147,7 +2070,10 @@ }, "com.amazonaws.shield#DescribeDRTAccessRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.shield#DescribeDRTAccessResponse": { "type": "structure", @@ -2164,6 +2090,9 @@ "smithy.api#documentation": "

The list of Amazon S3 buckets accessed by the SRT.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#DescribeEmergencyContactSettings": { @@ -2188,7 +2117,10 @@ }, "com.amazonaws.shield#DescribeEmergencyContactSettingsRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.shield#DescribeEmergencyContactSettingsResponse": { "type": "structure", @@ -2199,6 +2131,9 @@ "smithy.api#documentation": "

A list of email addresses and phone numbers that the Shield Response Team (SRT) can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#DescribeProtection": { @@ -2254,6 +2189,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#DescribeProtectionGroupResponse": { @@ -2266,6 +2204,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#DescribeProtectionRequest": { @@ -2283,6 +2224,9 @@ "smithy.api#documentation": "

The ARN (Amazon Resource Name) of the protected Amazon Web Services resource. \n You must provide either the ResourceArn of the protected resource or the ProtectionID of the protection, but not both.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#DescribeProtectionResponse": { @@ -2294,6 +2238,9 @@ "smithy.api#documentation": "

The Protection that you requested.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#DescribeSubscription": { @@ -2318,7 +2265,10 @@ }, "com.amazonaws.shield#DescribeSubscriptionRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.shield#DescribeSubscriptionResponse": { "type": "structure", @@ -2329,6 +2279,9 @@ "smithy.api#documentation": "

The Shield Advanced subscription details for an account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#DisableApplicationLayerAutomaticResponse": { @@ -2370,11 +2323,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#DisableApplicationLayerAutomaticResponseResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#DisableProactiveEngagement": { "type": "operation", @@ -2407,11 +2366,17 @@ }, "com.amazonaws.shield#DisableProactiveEngagementRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.shield#DisableProactiveEngagementResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#DisassociateDRTLogBucket": { "type": "operation", @@ -2455,11 +2420,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#DisassociateDRTLogBucketResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#DisassociateDRTRole": { "type": "operation", @@ -2489,11 +2460,17 @@ }, "com.amazonaws.shield#DisassociateDRTRoleRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.shield#DisassociateDRTRoleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#DisassociateHealthCheck": { "type": "operation", @@ -2541,11 +2518,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#DisassociateHealthCheckResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#Double": { "type": "double", @@ -2660,11 +2643,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#EnableApplicationLayerAutomaticResponseResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#EnableProactiveEngagement": { "type": "operation", @@ -2697,11 +2686,17 @@ }, "com.amazonaws.shield#EnableProactiveEngagementRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.shield#EnableProactiveEngagementResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#GetSubscriptionState": { "type": "operation", @@ -2722,7 +2717,10 @@ }, "com.amazonaws.shield#GetSubscriptionStateRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.shield#GetSubscriptionStateResponse": { "type": "structure", @@ -2734,6 +2732,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#HealthCheckArn": { @@ -3005,15 +3006,18 @@ "NextToken": { "target": "com.amazonaws.shield#Token", "traits": { - "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

\n

On your first call to a list operation, leave this setting empty.

" + "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

\n

On your first call to a list operation, leave this setting empty.

" } }, "MaxResults": { "target": "com.amazonaws.shield#MaxResults", "traits": { - "smithy.api#documentation": "

The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects\n than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value\n in the response.

\n

The default setting is 20.

" + "smithy.api#documentation": "

The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects\n than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value\n in the response.

\n

The default setting is 20.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#ListAttacksResponse": { @@ -3028,9 +3032,12 @@ "NextToken": { "target": "com.amazonaws.shield#Token", "traits": { - "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

" + "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#ListProtectionGroups": { @@ -3067,13 +3074,13 @@ "NextToken": { "target": "com.amazonaws.shield#Token", "traits": { - "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

\n

On your first call to a list operation, leave this setting empty.

" + "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

\n

On your first call to a list operation, leave this setting empty.

" } }, "MaxResults": { "target": "com.amazonaws.shield#MaxResults", "traits": { - "smithy.api#documentation": "

The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects\n than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value\n in the response.

\n

The default setting is 20.

" + "smithy.api#documentation": "

The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects\n than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value\n in the response.

\n

The default setting is 20.

" } }, "InclusionFilters": { @@ -3082,6 +3089,9 @@ "smithy.api#documentation": "

Narrows the set of protection groups that the call retrieves. You can retrieve a single protection group by its name and you can retrieve all protection groups that are configured with specific pattern or aggregation settings. You can provide up to one criteria per filter type. Shield Advanced returns the protection groups that exactly match all of the search criteria that you provide.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#ListProtectionGroupsResponse": { @@ -3097,9 +3107,12 @@ "NextToken": { "target": "com.amazonaws.shield#Token", "traits": { - "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

" + "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#ListProtections": { @@ -3137,13 +3150,13 @@ "NextToken": { "target": "com.amazonaws.shield#Token", "traits": { - "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

\n

On your first call to a list operation, leave this setting empty.

" + "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

\n

On your first call to a list operation, leave this setting empty.

" } }, "MaxResults": { "target": "com.amazonaws.shield#MaxResults", "traits": { - "smithy.api#documentation": "

The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects\n than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value\n in the response.

\n

The default setting is 20.

" + "smithy.api#documentation": "

The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects\n than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value\n in the response.

\n

The default setting is 20.

" } }, "InclusionFilters": { @@ -3152,6 +3165,9 @@ "smithy.api#documentation": "

Narrows the set of protections that the call retrieves. You can retrieve a single protection by providing its name or the ARN (Amazon Resource Name) of its protected resource. You can also retrieve all protections for a specific resource type. You can provide up to one criteria per filter type. Shield Advanced returns protections that exactly match all of the filter criteria that you provide.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#ListProtectionsResponse": { @@ -3166,9 +3182,12 @@ "NextToken": { "target": "com.amazonaws.shield#Token", "traits": { - "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

" + "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#ListResourcesInProtectionGroup": { @@ -3212,15 +3231,18 @@ "NextToken": { "target": "com.amazonaws.shield#Token", "traits": { - "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

\n

On your first call to a list operation, leave this setting empty.

" + "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

\n

On your first call to a list operation, leave this setting empty.

" } }, "MaxResults": { "target": "com.amazonaws.shield#MaxResults", "traits": { - "smithy.api#documentation": "

The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects\n than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value\n in the response.

\n

The default setting is 20.

" + "smithy.api#documentation": "

The greatest number of objects that you want Shield Advanced to return to the list request. Shield Advanced might return fewer objects\n than you indicate in this setting, even if more objects are available. If there are more objects remaining, Shield Advanced will always also return a NextToken value\n in the response.

\n

The default setting is 20.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#ListResourcesInProtectionGroupResponse": { @@ -3236,9 +3258,12 @@ "NextToken": { "target": "com.amazonaws.shield#Token", "traits": { - "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

" + "smithy.api#documentation": "

When you request a list of objects from Shield Advanced, if the response does not include all of the remaining available objects,\n Shield Advanced includes a NextToken value in the response. You can retrieve the next batch of objects by requesting the list again and\n providing the token that was returned by the prior call in your request.

\n

You can indicate the maximum number of objects that you want Shield Advanced to return for a single call with the MaxResults\n setting. Shield Advanced will not return more than MaxResults objects, but may return fewer, even if more objects are still available.

\n

Whenever more objects remain that Shield Advanced has not yet returned to you, the response will include a NextToken value.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#ListTagsForResource": { @@ -3274,6 +3299,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#ListTagsForResourceResponse": { @@ -3285,6 +3313,9 @@ "smithy.api#documentation": "

A list of tag key and value pairs associated with the specified resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.shield#LockedSubscriptionException": { @@ -3391,53 +3422,67 @@ } }, "com.amazonaws.shield#ProactiveEngagementStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLED", - "name": "DISABLED" - }, - { - "value": "PENDING", - "name": "PENDING" + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" } - ] + } } }, "com.amazonaws.shield#ProtectedResourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CLOUDFRONT_DISTRIBUTION", - "name": "CLOUDFRONT_DISTRIBUTION" - }, - { - "value": "ROUTE_53_HOSTED_ZONE", - "name": "ROUTE_53_HOSTED_ZONE" - }, - { - "value": "ELASTIC_IP_ALLOCATION", - "name": "ELASTIC_IP_ALLOCATION" - }, - { - "value": "CLASSIC_LOAD_BALANCER", - "name": "CLASSIC_LOAD_BALANCER" - }, - { - "value": "APPLICATION_LOAD_BALANCER", - "name": "APPLICATION_LOAD_BALANCER" - }, - { - "value": "GLOBAL_ACCELERATOR", - "name": "GLOBAL_ACCELERATOR" + "type": "enum", + "members": { + "CLOUDFRONT_DISTRIBUTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLOUDFRONT_DISTRIBUTION" + } + }, + "ROUTE_53_HOSTED_ZONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROUTE_53_HOSTED_ZONE" + } + }, + "ELASTIC_IP_ALLOCATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ELASTIC_IP_ALLOCATION" + } + }, + "CLASSIC_LOAD_BALANCER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CLASSIC_LOAD_BALANCER" + } + }, + "APPLICATION_LOAD_BALANCER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPLICATION_LOAD_BALANCER" } - ] + }, + "GLOBAL_ACCELERATOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLOBAL_ACCELERATOR" + } + } } }, "com.amazonaws.shield#ProtectedResourceTypeFilters": { @@ -3545,22 +3590,26 @@ } }, "com.amazonaws.shield#ProtectionGroupAggregation": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SUM", - "name": "SUM" - }, - { - "value": "MEAN", - "name": "MEAN" - }, - { - "value": "MAX", - "name": "MAX" + "type": "enum", + "members": { + "SUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUM" + } + }, + "MEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MEAN" + } + }, + "MAX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MAX" } - ] + } } }, "com.amazonaws.shield#ProtectionGroupAggregationFilters": { @@ -3649,22 +3698,26 @@ } }, "com.amazonaws.shield#ProtectionGroupPattern": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ALL", - "name": "ALL" - }, - { - "value": "ARBITRARY", - "name": "ARBITRARY" - }, - { - "value": "BY_RESOURCE_TYPE", - "name": "BY_RESOURCE_TYPE" + "type": "enum", + "members": { + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL" + } + }, + "ARBITRARY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ARBITRARY" + } + }, + "BY_RESOURCE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BY_RESOURCE_TYPE" } - ] + } } }, "com.amazonaws.shield#ProtectionGroupPatternFilters": { @@ -3895,18 +3948,20 @@ } }, "com.amazonaws.shield#SubResourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IP", - "name": "IP" - }, - { - "value": "URL", - "name": "URL" + "type": "enum", + "members": { + "IP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IP" + } + }, + "URL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "URL" } - ] + } } }, "com.amazonaws.shield#Subscription": { @@ -3990,18 +4045,20 @@ } }, "com.amazonaws.shield#SubscriptionState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "INACTIVE", - "name": "INACTIVE" + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" } - ] + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INACTIVE" + } + } } }, "com.amazonaws.shield#SummarizedAttackVector": { @@ -4181,11 +4238,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#TagValue": { "type": "string", @@ -4236,26 +4299,32 @@ } }, "com.amazonaws.shield#Unit": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BITS", - "name": "BITS" - }, - { - "value": "BYTES", - "name": "BYTES" - }, - { - "value": "PACKETS", - "name": "PACKETS" - }, - { - "value": "REQUESTS", - "name": "REQUESTS" + "type": "enum", + "members": { + "BITS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BITS" + } + }, + "BYTES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BYTES" + } + }, + "PACKETS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PACKETS" + } + }, + "REQUESTS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REQUESTS" } - ] + } } }, "com.amazonaws.shield#UntagResource": { @@ -4301,11 +4370,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#UpdateApplicationLayerAutomaticResponse": { "type": "operation", @@ -4353,11 +4428,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#UpdateApplicationLayerAutomaticResponseResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#UpdateEmergencyContactSettings": { "type": "operation", @@ -4394,11 +4475,17 @@ "smithy.api#documentation": "

A list of email addresses and phone numbers that the Shield Response Team (SRT) can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.

\n

If you have proactive engagement enabled, the contact list must include at least one phone number.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#UpdateEmergencyContactSettingsResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#UpdateProtectionGroup": { "type": "operation", @@ -4462,11 +4549,17 @@ "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#UpdateProtectionGroupResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#UpdateSubscription": { "type": "operation", @@ -4494,7 +4587,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the details of an existing subscription. Only enter values for parameters you want to change. Empty parameters are not updated.

\n \n

For accounts that are members of an Organizations organization, Shield Advanced subscriptions are billed against the organization's payer account,\n regardless of whether the payer account itself is subscribed.

\n
" + "smithy.api#documentation": "

Updates the details of an existing subscription. Only enter values for parameters you want to change. Empty parameters are not updated.

\n \n

For accounts that are members of an Organizations organization, Shield Advanced subscriptions are billed against the organization's payer account,\n regardless of whether the payer account itself is subscribed.

\n
" } }, "com.amazonaws.shield#UpdateSubscriptionRequest": { @@ -4506,11 +4599,17 @@ "smithy.api#documentation": "

When you initally create a subscription, AutoRenew is set to ENABLED. If ENABLED, the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an UpdateSubscription request. If the UpdateSubscription request does not included a value for AutoRenew, the existing value for AutoRenew remains unchanged.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.shield#UpdateSubscriptionResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.shield#ValidationExceptionField": { "type": "structure", @@ -4541,18 +4640,20 @@ } }, "com.amazonaws.shield#ValidationExceptionReason": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "FIELD_VALIDATION_FAILED", - "name": "FIELD_VALIDATION_FAILED" - }, - { - "value": "OTHER", - "name": "OTHER" + "type": "enum", + "members": { + "FIELD_VALIDATION_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FIELD_VALIDATION_FAILED" } - ] + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OTHER" + } + } } }, "com.amazonaws.shield#errorMessage": { diff --git a/codegen/sdk-codegen/aws-models/signer.json b/codegen/sdk-codegen/aws-models/signer.json index d818fd25b56..6bc64142ba4 100644 --- a/codegen/sdk-codegen/aws-models/signer.json +++ b/codegen/sdk-codegen/aws-models/signer.json @@ -3145,52 +3145,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3198,13 +3202,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3214,224 +3227,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://signer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://signer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://signer-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://signer-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://signer.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://signer.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://signer.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://signer.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/sms.json b/codegen/sdk-codegen/aws-models/sms.json index fbace4101de..f5eaaf6a294 100644 --- a/codegen/sdk-codegen/aws-models/sms.json +++ b/codegen/sdk-codegen/aws-models/sms.json @@ -519,9 +519,9 @@ } }, "params": { + "Region": "af-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "af-south-1" + "UseDualStack": false } }, { @@ -532,9 +532,9 @@ } }, "params": { + "Region": "ap-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-east-1" + "UseDualStack": false } }, { @@ -545,9 +545,9 @@ } }, "params": { + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { @@ -558,9 +558,9 @@ } }, "params": { + "Region": "ap-northeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-2" + "UseDualStack": false } }, { @@ -571,9 +571,9 @@ } }, "params": { + "Region": "ap-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-south-1" + "UseDualStack": false } }, { @@ -584,9 +584,9 @@ } }, "params": { + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { @@ -597,9 +597,9 @@ } }, "params": { + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { @@ -610,9 +610,9 @@ } }, "params": { + "Region": "ca-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ca-central-1" + "UseDualStack": false } }, { @@ -623,9 +623,9 @@ } }, "params": { + "Region": "eu-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-central-1" + "UseDualStack": false } }, { @@ -636,9 +636,9 @@ } }, "params": { + "Region": "eu-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-north-1" + "UseDualStack": false } }, { @@ -649,9 +649,9 @@ } }, "params": { + "Region": "eu-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-south-1" + "UseDualStack": false } }, { @@ -662,9 +662,9 @@ } }, "params": { + "Region": "eu-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": false } }, { @@ -675,9 +675,9 @@ } }, "params": { + "Region": "eu-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-2" + "UseDualStack": false } }, { @@ -688,9 +688,9 @@ } }, "params": { + "Region": "eu-west-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-3" + "UseDualStack": false } }, { @@ -701,9 +701,9 @@ } }, "params": { + "Region": "me-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "me-south-1" + "UseDualStack": false } }, { @@ -714,9 +714,9 @@ } }, "params": { + "Region": "sa-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "sa-east-1" + "UseDualStack": false } }, { @@ -727,9 +727,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -740,9 +740,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -753,9 +753,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -766,9 +766,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -779,9 +779,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -792,9 +792,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -805,9 +805,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -818,9 +818,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -831,9 +831,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -844,9 +844,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -857,9 +857,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -870,9 +870,9 @@ } }, "params": { + "Region": "cn-northwest-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-northwest-1" + "UseDualStack": false } }, { @@ -883,9 +883,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -896,9 +896,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -909,9 +909,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -922,9 +922,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -935,9 +935,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -948,9 +948,9 @@ } }, "params": { + "Region": "us-gov-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-west-1" + "UseDualStack": false } }, { @@ -961,9 +961,9 @@ } }, "params": { + "Region": "us-gov-west-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-west-1" + "UseDualStack": false } }, { @@ -974,9 +974,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -987,9 +987,20 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1000,9 +1011,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -1013,9 +1035,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -1026,9 +1059,20 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-isob-east-1" + "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 } }, { @@ -1039,9 +1083,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -1052,9 +1096,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1077,9 +1121,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1089,11 +1133,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/snow-device-management.json b/codegen/sdk-codegen/aws-models/snow-device-management.json index e37fb963a1e..f4d2c8c3798 100644 --- a/codegen/sdk-codegen/aws-models/snow-device-management.json +++ b/codegen/sdk-codegen/aws-models/snow-device-management.json @@ -68,9 +68,9 @@ "traits": { "smithy.api#documentation": "

Sends a cancel request for a specified task. You can cancel a task only if it's still in a\n QUEUED state. Tasks that are already running can't be cancelled.

\n \n

A task might still run if it's processed from the queue before the\n CancelTask operation changes the task's state.

\n
", "smithy.api#http": { + "code": 200, "method": "POST", - "uri": "/task/{taskId}/cancel", - "code": 200 + "uri": "/task/{taskId}/cancel" } } }, @@ -227,9 +227,9 @@ "traits": { "smithy.api#documentation": "

Instructs one or more devices to start a task, such as unlocking or rebooting.

", "smithy.api#http": { + "code": 200, "method": "POST", - "uri": "/task", - "code": 200 + "uri": "/task" } } }, @@ -316,9 +316,9 @@ "traits": { "smithy.api#documentation": "

Checks device-specific information, such as the device type, software version, IP\n addresses, and lock status.

", "smithy.api#http": { + "code": 200, "method": "POST", - "uri": "/managed-device/{managedDeviceId}/describe", - "code": 200 + "uri": "/managed-device/{managedDeviceId}/describe" }, "smithy.api#readonly": {} } @@ -371,9 +371,9 @@ "traits": { "smithy.api#documentation": "

Checks the current state of the Amazon EC2 instances. The output is similar to\n describeDevice, but the results are sourced from the device cache in the\n Amazon Web Services Cloud and include a subset of the available fields.

", "smithy.api#http": { + "code": 200, "method": "POST", - "uri": "/managed-device/{managedDeviceId}/resources/ec2/describe", - "code": 200 + "uri": "/managed-device/{managedDeviceId}/resources/ec2/describe" }, "smithy.api#readonly": {} } @@ -501,9 +501,9 @@ "traits": { "smithy.api#documentation": "

Checks the status of a remote task running on one or more target devices.

", "smithy.api#http": { + "code": 200, "method": "POST", - "uri": "/task/{taskId}/execution/{managedDeviceId}", - "code": 200 + "uri": "/task/{taskId}/execution/{managedDeviceId}" }, "smithy.api#readonly": {} } @@ -598,9 +598,9 @@ "traits": { "smithy.api#documentation": "

Checks the metadata for a given task on a device.

", "smithy.api#http": { + "code": 200, "method": "POST", - "uri": "/task/{taskId}", - "code": 200 + "uri": "/task/{taskId}" }, "smithy.api#readonly": {} } @@ -1117,15 +1117,15 @@ "traits": { "smithy.api#documentation": "

Returns a list of the Amazon Web Services resources available for a device. Currently, Amazon EC2 instances are the only supported resource type.

", "smithy.api#http": { + "code": 200, "method": "GET", - "uri": "/managed-device/{managedDeviceId}/resources", - "code": 200 + "uri": "/managed-device/{managedDeviceId}/resources" }, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "resources", - "pageSize": "maxResults" + "pageSize": "maxResults", + "items": "resources" }, "smithy.api#readonly": {} } @@ -1210,15 +1210,15 @@ "traits": { "smithy.api#documentation": "

Returns a list of all devices on your Amazon Web Services account that have Amazon Web Services Snow Device Management\n enabled in the Amazon Web Services Region where the command is run.

", "smithy.api#http": { + "code": 200, "method": "GET", - "uri": "/managed-devices", - "code": 200 + "uri": "/managed-devices" }, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "devices", - "pageSize": "maxResults" + "pageSize": "maxResults", + "items": "devices" }, "smithy.api#readonly": {} } @@ -1294,15 +1294,15 @@ "traits": { "smithy.api#documentation": "

Returns the status of tasks for one or more target devices.

", "smithy.api#http": { + "code": 200, "method": "GET", - "uri": "/executions", - "code": 200 + "uri": "/executions" }, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "executions", - "pageSize": "maxResults" + "pageSize": "maxResults", + "items": "executions" }, "smithy.api#readonly": {} } @@ -1381,8 +1381,7 @@ "smithy.api#documentation": "

Returns a list of tags for a managed device or task.

", "smithy.api#http": { "method": "GET", - "uri": "/tags/{resourceArn}", - "code": 200 + "uri": "/tags/{resourceArn}" }, "smithy.api#readonly": {} } @@ -1436,15 +1435,15 @@ "traits": { "smithy.api#documentation": "

Returns a list of tasks that can be filtered by state.

", "smithy.api#http": { + "code": 200, "method": "GET", - "uri": "/tasks", - "code": 200 + "uri": "/tasks" }, "smithy.api#paginated": { "inputToken": "nextToken", "outputToken": "nextToken", - "items": "tasks", - "pageSize": "maxResults" + "pageSize": "maxResults", + "items": "tasks" }, "smithy.api#readonly": {} } @@ -1515,10 +1514,7 @@ ], "traits": { "aws.api#arn": { - "template": "managed-device/{managedDeviceId}", - "absolute": false, - "noAccount": false, - "noRegion": false + "template": "managed-device/{managedDeviceId}" } } }, @@ -1755,11 +1751,8 @@ ], "traits": { "aws.api#service": { - "sdkId": "Snow Device Management", "arnNamespace": "snow-device-management", - "cloudFormationName": "SnowDeviceManagement", - "cloudTrailEventSource": "snow-device-management.amazonaws.com", - "endpointPrefix": "snow-device-management" + "sdkId": "Snow Device Management" }, "aws.auth#sigv4": { "name": "snow-device-management" @@ -1828,52 +1821,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1881,13 +1878,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1897,224 +1903,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://snow-device-management-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://snow-device-management-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://snow-device-management-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://snow-device-management-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://snow-device-management.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://snow-device-management.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://snow-device-management.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://snow-device-management.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2129,8 +2086,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2142,8 +2099,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2155,8 +2112,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2168,8 +2125,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2181,8 +2138,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2194,8 +2151,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2207,8 +2164,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2220,8 +2177,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2233,8 +2190,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2246,8 +2203,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2259,8 +2216,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2272,8 +2229,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2285,8 +2253,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2298,8 +2277,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2311,8 +2301,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2324,8 +2325,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2337,8 +2338,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2350,8 +2351,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2362,8 +2363,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2374,10 +2375,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2448,8 +2455,7 @@ "smithy.api#documentation": "

Adds or replaces tags on a device or task.

", "smithy.api#http": { "method": "POST", - "uri": "/tags/{resourceArn}", - "code": 200 + "uri": "/tags/{resourceArn}" } } }, @@ -2513,10 +2519,7 @@ ], "traits": { "aws.api#arn": { - "template": "task/{taskId}", - "absolute": false, - "noAccount": false, - "noRegion": false + "template": "task/{taskId}" } } }, @@ -2665,8 +2668,7 @@ "smithy.api#documentation": "

Removes a tag from a device or task.

", "smithy.api#http": { "method": "DELETE", - "uri": "/tags/{resourceArn}", - "code": 200 + "uri": "/tags/{resourceArn}" }, "smithy.api#idempotent": {} } @@ -2709,4 +2711,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/snowball.json b/codegen/sdk-codegen/aws-models/snowball.json index 57dc68cd1a6..2de997b1ad4 100644 --- a/codegen/sdk-codegen/aws-models/snowball.json +++ b/codegen/sdk-codegen/aws-models/snowball.json @@ -189,52 +189,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -242,13 +246,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -258,224 +271,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://snowball-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://snowball-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://snowball-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://snowball-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://snowball.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://snowball.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://snowball.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://snowball.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1457,7 +1421,16 @@ } ], "traits": { - "smithy.api#documentation": "

Cancels a cluster job. You can only cancel a cluster job while it's in the\n AwaitingQuorum status. You'll have at least an hour after creating a cluster\n job to cancel it.

" + "smithy.api#documentation": "

Cancels a cluster job. You can only cancel a cluster job while it's in the\n AwaitingQuorum status. You'll have at least an hour after creating a cluster\n job to cancel it.

", + "smithy.api#examples": [ + { + "title": "To cancel a cluster job", + "documentation": "This operation cancels a cluster job. You can only cancel a cluster job while it's in the AwaitingQuorum status.", + "input": { + "ClusterId": "CID123e4567-e89b-12d3-a456-426655440000" + } + } + ] } }, "com.amazonaws.snowball#CancelClusterRequest": { @@ -1502,7 +1475,16 @@ } ], "traits": { - "smithy.api#documentation": "

Cancels the specified job. You can only cancel a job before its JobState\n value changes to PreparingAppliance. Requesting the ListJobs or\n DescribeJob action returns a job's JobState as part of the\n response element data returned.

" + "smithy.api#documentation": "

Cancels the specified job. You can only cancel a job before its JobState\n value changes to PreparingAppliance. Requesting the ListJobs or\n DescribeJob action returns a job's JobState as part of the\n response element data returned.

", + "smithy.api#examples": [ + { + "title": "To cancel a job for a Snowball device", + "documentation": "This operation cancels a job. You can only cancel a job before its JobState value changes to PreparingAppliance.", + "input": { + "JobId": "JID123e4567-e89b-12d3-a456-426655440000" + } + } + ] } }, "com.amazonaws.snowball#CancelJobRequest": { @@ -1781,7 +1763,28 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an address for a Snow device to be shipped to. In most regions,\n addresses are validated at the time of creation. The address you provide must be located\n within the serviceable area of your region. If the address is invalid or unsupported, then an\n exception is thrown.

" + "smithy.api#documentation": "

Creates an address for a Snow device to be shipped to. In most regions,\n addresses are validated at the time of creation. The address you provide must be located\n within the serviceable area of your region. If the address is invalid or unsupported, then an\n exception is thrown.

", + "smithy.api#examples": [ + { + "title": "To create an address for a job", + "documentation": "This operation creates an address for a job. Addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown.", + "input": { + "Address": { + "City": "Seattle", + "Company": "My Company's Name", + "Country": "USA", + "Name": "My Name", + "PhoneNumber": "425-555-5555", + "PostalCode": "98101", + "StateOrProvince": "WA", + "Street1": "123 Main Street" + } + }, + "output": { + "AddressId": "ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b" + } + } + ] } }, "com.amazonaws.snowball#CreateAddressRequest": { @@ -1836,7 +1839,37 @@ } ], "traits": { - "smithy.api#documentation": "

Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The\n cluster does not ship until these five node jobs have been created.

" + "smithy.api#documentation": "

Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The\n cluster does not ship until these five node jobs have been created.

", + "smithy.api#examples": [ + { + "title": "To create a cluster", + "documentation": "Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.", + "input": { + "JobType": "LOCAL_USE", + "Resources": { + "S3Resources": [ + { + "BucketArn": "arn:aws:s3:::MyBucket", + "KeyRange": {} + } + ] + }, + "Description": "MyCluster", + "AddressId": "ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b", + "KmsKeyARN": "arn:aws:kms:us-east-1:123456789012:key/abcd1234-12ab-34cd-56ef-123456123456", + "RoleARN": "arn:aws:iam::123456789012:role/snowball-import-S3-role", + "SnowballType": "EDGE", + "ShippingOption": "SECOND_DAY", + "Notification": { + "NotifyAll": false, + "JobStatesToNotify": [] + } + }, + "output": { + "ClusterId": "CID123e4567-e89b-12d3-a456-426655440000" + } + } + ] } }, "com.amazonaws.snowball#CreateClusterRequest": { @@ -2000,7 +2033,38 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a job to import or export data between Amazon S3 and your on-premises data\n center. Your Amazon Web Services account must have the right trust policies and permissions in\n place to create a job for a Snow device. If you're creating a job for a node in a cluster, you\n only need to provide the clusterId value; the other job attributes are inherited\n from the cluster.

\n \n

Only the Snowball; Edge device type is supported when ordering clustered jobs.

\n

The device capacity is optional.

\n

Availability of device types differ by Amazon Web Services Region. For more information\n about Region availability, see Amazon Web Services Regional Services.

\n
\n

\n

\n Snow Family devices and their capacities.\n

\n
    \n
  • \n

    Device type: SNC1_SSD\n

    \n
      \n
    • \n

      Capacity: T14

      \n
    • \n
    • \n

      Description: Snowcone

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: SNC1_HDD\n

    \n
      \n
    • \n

      Capacity: T8

      \n
    • \n
    • \n

      Description: Snowcone

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: EDGE_S\n

    \n
      \n
    • \n

      Capacity: T98

      \n
    • \n
    • \n

      Description: Snowball Edge Storage Optimized for data transfer only

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: EDGE_CG\n

    \n
      \n
    • \n

      Capacity: T42

      \n
    • \n
    • \n

      Description: Snowball Edge Compute Optimized with GPU

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: EDGE_C\n

    \n
      \n
    • \n

      Capacity: T42

      \n
    • \n
    • \n

      Description: Snowball Edge Compute Optimized without GPU

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: EDGE\n

    \n
      \n
    • \n

      Capacity: T100

      \n
    • \n
    • \n

      Description: Snowball Edge Storage Optimized with EC2 Compute

      \n
    • \n
    \n \n

    This device is replaced with T98.

    \n
    \n

    \n
  • \n
  • \n

    Device type: STANDARD\n

    \n
      \n
    • \n

      Capacity: T50

      \n
    • \n
    • \n

      Description: Original Snowball device

      \n \n

      This device is only available in the Ningxia, Beijing, and Singapore Amazon Web Services Region\n

      \n
      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: STANDARD\n

    \n
      \n
    • \n

      Capacity: T80

      \n
    • \n
    • \n

      Description: Original Snowball device

      \n \n

      This device is only available in the Ningxia, Beijing, and Singapore Amazon Web Services Region.

      \n
      \n
    • \n
    \n

    \n
  • \n
  • \n

    Snow Family device type: RACK_5U_C\n

    \n
      \n
    • \n

      Capacity: T13

      \n
    • \n
    • \n

      Description: Snowblade.

      \n
    • \n
    \n
  • \n
  • \n

    Device type: V3_5S\n

    \n
      \n
    • \n

      Capacity: T240

      \n
    • \n
    • \n

      Description: Snowball Edge Storage Optimized 210TB

      \n
    • \n
    \n
  • \n
" + "smithy.api#documentation": "

Creates a job to import or export data between Amazon S3 and your on-premises data\n center. Your Amazon Web Services account must have the right trust policies and permissions in\n place to create a job for a Snow device. If you're creating a job for a node in a cluster, you\n only need to provide the clusterId value; the other job attributes are inherited\n from the cluster.

\n \n

Only the Snowball; Edge device type is supported when ordering clustered jobs.

\n

The device capacity is optional.

\n

Availability of device types differ by Amazon Web Services Region. For more information\n about Region availability, see Amazon Web Services Regional Services.

\n
\n

\n

\n Snow Family devices and their capacities.\n

\n
    \n
  • \n

    Device type: SNC1_SSD\n

    \n
      \n
    • \n

      Capacity: T14

      \n
    • \n
    • \n

      Description: Snowcone

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: SNC1_HDD\n

    \n
      \n
    • \n

      Capacity: T8

      \n
    • \n
    • \n

      Description: Snowcone

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: EDGE_S\n

    \n
      \n
    • \n

      Capacity: T98

      \n
    • \n
    • \n

      Description: Snowball Edge Storage Optimized for data transfer only

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: EDGE_CG\n

    \n
      \n
    • \n

      Capacity: T42

      \n
    • \n
    • \n

      Description: Snowball Edge Compute Optimized with GPU

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: EDGE_C\n

    \n
      \n
    • \n

      Capacity: T42

      \n
    • \n
    • \n

      Description: Snowball Edge Compute Optimized without GPU

      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: EDGE\n

    \n
      \n
    • \n

      Capacity: T100

      \n
    • \n
    • \n

      Description: Snowball Edge Storage Optimized with EC2 Compute

      \n
    • \n
    \n \n

    This device is replaced with T98.

    \n
    \n

    \n
  • \n
  • \n

    Device type: STANDARD\n

    \n
      \n
    • \n

      Capacity: T50

      \n
    • \n
    • \n

      Description: Original Snowball device

      \n \n

      This device is only available in the Ningxia, Beijing, and Singapore Amazon Web Services Region\n

      \n
      \n
    • \n
    \n

    \n
  • \n
  • \n

    Device type: STANDARD\n

    \n
      \n
    • \n

      Capacity: T80

      \n
    • \n
    • \n

      Description: Original Snowball device

      \n \n

      This device is only available in the Ningxia, Beijing, and Singapore Amazon Web Services Region.

      \n
      \n
    • \n
    \n

    \n
  • \n
  • \n

    Snow Family device type: RACK_5U_C\n

    \n
      \n
    • \n

      Capacity: T13

      \n
    • \n
    • \n

      Description: Snowblade.

      \n
    • \n
    \n
  • \n
  • \n

    Device type: V3_5S\n

    \n
      \n
    • \n

      Capacity: T240

      \n
    • \n
    • \n

      Description: Snowball Edge Storage Optimized 210TB

      \n
    • \n
    \n
  • \n
", + "smithy.api#examples": [ + { + "title": "To create a job", + "documentation": "Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you're creating a job for a node in a cluster, you only need to provide the clusterId value; the other job attributes are inherited from the cluster.", + "input": { + "JobType": "IMPORT", + "Resources": { + "S3Resources": [ + { + "BucketArn": "arn:aws:s3:::MyBucket", + "KeyRange": {} + } + ] + }, + "Description": "My Job", + "AddressId": "ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b", + "KmsKeyARN": "arn:aws:kms:us-east-1:123456789012:key/abcd1234-12ab-34cd-56ef-123456123456", + "RoleARN": "arn:aws:iam::123456789012:role/snowball-import-S3-role", + "SnowballCapacityPreference": "T80", + "ShippingOption": "SECOND_DAY", + "Notification": { + "NotifyAll": false, + "JobStatesToNotify": [] + }, + "SnowballType": "STANDARD" + }, + "output": { + "JobId": "JID123e4567-e89b-12d3-a456-426655440000" + } + } + ] } }, "com.amazonaws.snowball#CreateJobRequest": { @@ -2338,7 +2402,29 @@ } ], "traits": { - "smithy.api#documentation": "

Takes an AddressId and returns specific details about that address in the\n form of an Address object.

" + "smithy.api#documentation": "

Takes an AddressId and returns specific details about that address in the\n form of an Address object.

", + "smithy.api#examples": [ + { + "title": "To describe an address for a job", + "documentation": "This operation describes an address for a job.", + "input": { + "AddressId": "ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b" + }, + "output": { + "Address": { + "City": "Seattle", + "Name": "My Name", + "AddressId": "ADID5643ec50-3eec-4eb3-9be6-9374c10eb51b", + "Street1": "123 Main Street", + "Company": "My Company", + "PhoneNumber": "425-555-5555", + "Country": "US", + "PostalCode": "98101", + "StateOrProvince": "WA" + } + } + } + ] } }, "com.amazonaws.snowball#DescribeAddressRequest": { @@ -2388,6 +2474,27 @@ ], "traits": { "smithy.api#documentation": "

Returns a specified number of ADDRESS objects. Calling this API in one of\n the US regions will return addresses from the list of all addresses associated with this\n account in all US regions.

", + "smithy.api#examples": [ + { + "title": "To describe all the addresses you've created for AWS Snowball", + "documentation": "This operation describes all the addresses that you've created for AWS Snowball. Calling this API in one of the US regions will return addresses from the list of all addresses associated with this account in all US regions.", + "output": { + "Addresses": [ + { + "City": "Seattle", + "Name": "My Name", + "AddressId": "ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b", + "Street1": "123 Main Street", + "Company": "My Company", + "PhoneNumber": "425-555-5555", + "Country": "US", + "PostalCode": "98101", + "StateOrProvince": "WA" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -2756,7 +2863,19 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a link to an Amazon S3 presigned URL for the manifest file associated with the\n specified JobId value. You can access the manifest file for up to 60 minutes\n after this request has been made. To access the manifest file after 60 minutes have passed,\n you'll have to make another call to the GetJobManifest action.

\n

The manifest is an encrypted file that you can download after your job enters the\n WithCustomer status. This is the only valid status for calling this API as the\n manifest and UnlockCode code value are used for securing your device and should\n only be used when you have the device. The manifest is decrypted by using the\n UnlockCode code value, when you pass both values to the Snow device through the\n Snowball client when the client is started for the first time.

\n

As a best practice, we recommend that you don't save a copy of an\n UnlockCode value in the same location as the manifest file for that job. Saving\n these separately helps prevent unauthorized parties from gaining access to the Snow device\n associated with that job.

\n

The credentials of a given job, including its manifest file and unlock code, expire 360\n days after the job is created.

" + "smithy.api#documentation": "

Returns a link to an Amazon S3 presigned URL for the manifest file associated with the\n specified JobId value. You can access the manifest file for up to 60 minutes\n after this request has been made. To access the manifest file after 60 minutes have passed,\n you'll have to make another call to the GetJobManifest action.

\n

The manifest is an encrypted file that you can download after your job enters the\n WithCustomer status. This is the only valid status for calling this API as the\n manifest and UnlockCode code value are used for securing your device and should\n only be used when you have the device. The manifest is decrypted by using the\n UnlockCode code value, when you pass both values to the Snow device through the\n Snowball client when the client is started for the first time.

\n

As a best practice, we recommend that you don't save a copy of an\n UnlockCode value in the same location as the manifest file for that job. Saving\n these separately helps prevent unauthorized parties from gaining access to the Snow device\n associated with that job.

\n

The credentials of a given job, including its manifest file and unlock code, expire 360\n days after the job is created.

", + "smithy.api#examples": [ + { + "title": "To get the manifest for a job you've created for AWS Snowball", + "documentation": "Returns a link to an Amazon S3 presigned URL for the manifest file associated with the specified JobId value. You can access the manifest file for up to 60 minutes after this request has been made. To access the manifest file after 60 minutes have passed, you'll have to make another call to the GetJobManifest action.\n\nThe manifest is an encrypted file that you can download after your job enters the WithCustomer status. The manifest is decrypted by using the UnlockCode code value, when you pass both values to the Snowball through the Snowball client when the client is started for the first time.\n\nAs a best practice, we recommend that you don't save a copy of an UnlockCode value in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.\n\nThe credentials of a given job, including its manifest file and unlock code, expire 90 days after the job is created.", + "input": { + "JobId": "JID123e4567-e89b-12d3-a456-426655440000" + }, + "output": { + "ManifestURI": "https://awsie-frosty-manifests-prod.s3.amazonaws.com/JID123e4567-e89b-12d3-a456-426655440000_manifest.bin?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20161224T005115Z&X-Amz-SignedHeaders=..." + } + } + ] } }, "com.amazonaws.snowball#GetJobManifestRequest": { @@ -2805,7 +2924,19 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the UnlockCode code value for the specified job. A particular\n UnlockCode value can be accessed for up to 360 days after the associated job\n has been created.

\n

The UnlockCode value is a 29-character code with 25 alphanumeric\n characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed\n along with the manifest to the Snow device through the Snowball client when the client is\n started for the first time. The only valid status for calling this API is\n WithCustomer as the manifest and Unlock code values are used for\n securing your device and should only be used when you have the device.

\n

As a best practice, we recommend that you don't save a copy of the\n UnlockCode in the same location as the manifest file for that job. Saving these\n separately helps prevent unauthorized parties from gaining access to the Snow device\n associated with that job.

" + "smithy.api#documentation": "

Returns the UnlockCode code value for the specified job. A particular\n UnlockCode value can be accessed for up to 360 days after the associated job\n has been created.

\n

The UnlockCode value is a 29-character code with 25 alphanumeric\n characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed\n along with the manifest to the Snow device through the Snowball client when the client is\n started for the first time. The only valid status for calling this API is\n WithCustomer as the manifest and Unlock code values are used for\n securing your device and should only be used when you have the device.

\n

As a best practice, we recommend that you don't save a copy of the\n UnlockCode in the same location as the manifest file for that job. Saving these\n separately helps prevent unauthorized parties from gaining access to the Snow device\n associated with that job.

", + "smithy.api#examples": [ + { + "title": "To get the unlock code for a job you've created for AWS Snowball", + "documentation": "Returns the UnlockCode code value for the specified job. A particular UnlockCode value can be accessed for up to 90 days after the associated job has been created.\n\nThe UnlockCode value is a 29-character code with 25 alphanumeric characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed along with the manifest to the Snowball through the Snowball client when the client is started for the first time.\n\nAs a best practice, we recommend that you don't save a copy of the UnlockCode in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.", + "input": { + "JobId": "JID123e4567-e89b-12d3-a456-426655440000" + }, + "output": { + "UnlockCode": "12345-abcde-56789-fghij-01234" + } + } + ] } }, "com.amazonaws.snowball#GetJobUnlockCodeRequest": { @@ -2846,7 +2977,17 @@ "target": "com.amazonaws.snowball#GetSnowballUsageResult" }, "traits": { - "smithy.api#documentation": "

Returns information about the Snow Family service limit for your account, and also the\n number of Snow devices your account has in use.

\n

The default service limit for the number of Snow devices that you can have at one time\n is 1. If you want to increase your service limit, contact Amazon Web Services Support.

" + "smithy.api#documentation": "

Returns information about the Snow Family service limit for your account, and also the\n number of Snow devices your account has in use.

\n

The default service limit for the number of Snow devices that you can have at one time\n is 1. If you want to increase your service limit, contact Amazon Web Services Support.

", + "smithy.api#examples": [ + { + "title": "To see your Snowball service limit and the number of Snowballs you have in use", + "documentation": "Returns information about the Snowball service limit for your account, and also the number of Snowballs your account has in use.\n\nThe default service limit for the number of Snowballs that you can have at one time is 1. If you want to increase your service limit, contact AWS Support.", + "output": { + "SnowballLimit": 1, + "SnowballsInUse": 0 + } + } + ] } }, "com.amazonaws.snowball#GetSnowballUsageRequest": { @@ -3870,6 +4011,27 @@ ], "traits": { "smithy.api#documentation": "

A list of locations from which the customer can choose to pickup a device.

", + "smithy.api#examples": [ + { + "title": "To get a list of locations from which the customer can choose to pickup a device.", + "documentation": "Returns a specified number of Address objects. Each Address is a pickup location address for Snow Family devices.", + "output": { + "Addresses": [ + { + "City": "Seattle", + "Name": "My Name", + "AddressId": "ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b", + "Street1": "123 Main Street", + "Company": "My Company", + "PhoneNumber": "425-555-5555", + "Country": "US", + "PostalCode": "98101", + "StateOrProvince": "WA" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -4891,7 +5053,18 @@ } ], "traits": { - "smithy.api#documentation": "

While a cluster's ClusterState value is in the AwaitingQuorum\n state, you can update some of the information associated with a cluster. Once the cluster\n changes to a different job state, usually 60 minutes after the cluster being created, this\n action is no longer available.

" + "smithy.api#documentation": "

While a cluster's ClusterState value is in the AwaitingQuorum\n state, you can update some of the information associated with a cluster. Once the cluster\n changes to a different job state, usually 60 minutes after the cluster being created, this\n action is no longer available.

", + "smithy.api#examples": [ + { + "title": "To update a cluster", + "documentation": "This action allows you to update certain parameters for a cluster. Once the cluster changes to a different state, usually within 60 minutes of it being created, this action is no longer available.", + "input": { + "ClusterId": "CID123e4567-e89b-12d3-a456-426655440000", + "Description": "updated-cluster-name", + "AddressId": "ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b" + } + } + ] } }, "com.amazonaws.snowball#UpdateClusterRequest": { @@ -4993,7 +5166,20 @@ } ], "traits": { - "smithy.api#documentation": "

While a job's JobState value is New, you can update some of\n the information associated with a job. Once the job changes to a different job state, usually\n within 60 minutes of the job being created, this action is no longer available.

" + "smithy.api#documentation": "

While a job's JobState value is New, you can update some of\n the information associated with a job. Once the job changes to a different job state, usually\n within 60 minutes of the job being created, this action is no longer available.

", + "smithy.api#examples": [ + { + "title": "To update a job", + "documentation": "This action allows you to update certain parameters for a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.", + "input": { + "JobId": "JID123e4567-e89b-12d3-a456-426655440000", + "AddressId": "ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b", + "ShippingOption": "NEXT_DAY", + "Description": "updated-job-name", + "SnowballCapacityPreference": "T100" + } + } + ] } }, "com.amazonaws.snowball#UpdateJobRequest": { diff --git a/codegen/sdk-codegen/aws-models/sns.json b/codegen/sdk-codegen/aws-models/sns.json index d224218e728..03d7767df5e 100644 --- a/codegen/sdk-codegen/aws-models/sns.json +++ b/codegen/sdk-codegen/aws-models/sns.json @@ -314,52 +314,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -367,13 +371,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -383,92 +396,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://sns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://sns-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -477,168 +481,128 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } + "ref": "Region" + }, + "us-gov-east-1" ] } ], - "type": "tree", - "rules": [ + "endpoint": { + "url": "https://sns.us-gov-east-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://sns.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + "fn": "stringEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://sns.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "Region" }, - { - "conditions": [], - "endpoint": { - "url": "https://sns-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "us-gov-west-1" ] } - ] + ], + "endpoint": { + "url": "https://sns.us-gov-west-1.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://sns-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sns.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://sns.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://sns.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://sns.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -653,8 +617,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -666,8 +630,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -679,8 +643,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -692,8 +656,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -705,8 +669,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -718,8 +682,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -731,8 +695,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -744,8 +708,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -757,8 +721,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -770,8 +734,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -783,8 +747,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -796,8 +760,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -809,8 +773,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -822,8 +786,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -835,8 +799,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -848,8 +812,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -861,8 +825,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -874,8 +838,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -887,8 +851,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -900,8 +864,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -913,8 +877,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -926,8 +890,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -939,8 +903,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -952,8 +916,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -965,8 +929,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -978,8 +942,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -991,8 +955,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1004,8 +968,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1017,8 +981,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1030,8 +994,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1043,8 +1007,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1056,8 +1020,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1069,8 +1033,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1082,8 +1046,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1095,8 +1059,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1108,8 +1072,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1121,8 +1085,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1134,8 +1098,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1147,8 +1111,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1160,8 +1124,8 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1173,8 +1137,19 @@ }, "params": { "Region": "us-iso-west-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1186,8 +1161,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1199,8 +1185,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1212,8 +1209,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1225,8 +1233,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1238,8 +1246,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1250,8 +1258,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1262,10 +1270,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1718,7 +1732,10 @@ }, "com.amazonaws.sns#CreateSMSSandboxPhoneNumberResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.sns#CreateTopic": { "type": "operation", @@ -1943,7 +1960,10 @@ }, "com.amazonaws.sns#DeleteSMSSandboxPhoneNumberResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.sns#DeleteTopic": { "type": "operation", @@ -2341,6 +2361,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sns#GetSubscriptionAttributes": { @@ -2903,6 +2926,9 @@ "smithy.api#documentation": "

A list of the calling account's verified and pending origination numbers.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sns#ListPhoneNumbersOptedOut": { @@ -3107,6 +3133,9 @@ "smithy.api#documentation": "

A NextToken string is returned when you call the\n ListSMSSandboxPhoneNumbersInput operation if additional pages of\n records are available.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sns#ListString": { @@ -5132,7 +5161,8 @@ "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

The destination phone number's verification status.

" + "smithy.api#documentation": "

The destination phone number's verification status.

", + "smithy.api#output": {} } }, "com.amazonaws.sns#account": { diff --git a/codegen/sdk-codegen/aws-models/sqs.json b/codegen/sdk-codegen/aws-models/sqs.json index 233b0853b67..dbbdbed91ce 100644 --- a/codegen/sdk-codegen/aws-models/sqs.json +++ b/codegen/sdk-codegen/aws-models/sqs.json @@ -250,52 +250,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -303,13 +307,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -319,92 +332,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sqs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://sqs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -413,155 +417,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://sqs.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://sqs-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://sqs.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://sqs-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sqs.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://sqs.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://sqs.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://sqs.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/ssm-contacts.json b/codegen/sdk-codegen/aws-models/ssm-contacts.json index 558db870962..7746181ae04 100644 --- a/codegen/sdk-codegen/aws-models/ssm-contacts.json +++ b/codegen/sdk-codegen/aws-models/ssm-contacts.json @@ -134,7 +134,10 @@ }, "com.amazonaws.ssmcontacts#AcceptPageResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#AcceptType": { "type": "enum", @@ -222,7 +225,10 @@ }, "com.amazonaws.ssmcontacts#ActivateContactChannelResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#ActivationCode": { "type": "string", @@ -686,6 +692,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#CreateContactRequest": { @@ -746,6 +755,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#CreateRotation": { @@ -864,6 +876,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#CreateRotationRequest": { @@ -930,6 +945,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#DailySettings": { @@ -1059,7 +1077,10 @@ }, "com.amazonaws.ssmcontacts#DeactivateContactChannelResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#DeferActivation": { "type": "boolean" @@ -1142,7 +1163,10 @@ }, "com.amazonaws.ssmcontacts#DeleteContactChannelResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#DeleteContactRequest": { "type": "structure", @@ -1161,7 +1185,10 @@ }, "com.amazonaws.ssmcontacts#DeleteContactResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#DeleteRotation": { "type": "operation", @@ -1248,7 +1275,10 @@ }, "com.amazonaws.ssmcontacts#DeleteRotationOverrideResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#DeleteRotationRequest": { "type": "structure", @@ -1267,7 +1297,10 @@ }, "com.amazonaws.ssmcontacts#DeleteRotationResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#DependentEntity": { "type": "structure", @@ -1412,6 +1445,9 @@ "smithy.api#documentation": "

The time that the engagement ended.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#DescribePage": { @@ -1542,6 +1578,9 @@ "smithy.api#documentation": "

The time that the contact channel received the engagement.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#Engagement": { @@ -1720,6 +1759,9 @@ "smithy.api#documentation": "

A Boolean value indicating if the contact channel has been activated or not.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#GetContactPolicy": { @@ -1781,6 +1823,9 @@ "smithy.api#documentation": "

Details about the resource policy attached to the contact or escalation plan.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#GetContactRequest": { @@ -1835,6 +1880,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#GetRotation": { @@ -1956,6 +2004,9 @@ "smithy.api#documentation": "

The date and time when the override was created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#GetRotationRequest": { @@ -2018,6 +2069,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#HandOffTime": { @@ -2182,6 +2236,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListContacts": { @@ -2263,6 +2320,9 @@ "smithy.api#documentation": "

A list of the contacts and escalation plans in your Incident Manager account.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListEngagements": { @@ -2345,6 +2405,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListPageReceipts": { @@ -2424,6 +2487,9 @@ "smithy.api#documentation": "

A list of each acknowledgement.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListPageResolutions": { @@ -2497,6 +2563,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListPagesByContact": { @@ -2577,6 +2646,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListPagesByEngagement": { @@ -2657,6 +2729,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListPreviewRotationShifts": { @@ -2772,6 +2847,9 @@ "smithy.api#documentation": "

The token for the next set of items to return. This token is used to get the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListRotationOverrides": { @@ -2865,6 +2943,9 @@ "smithy.api#documentation": "

The token for the next set of items to return. Use this token to get the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListRotationShifts": { @@ -2960,6 +3041,9 @@ "smithy.api#documentation": "

The token for the next set of items to return. Use this token to get the next set of\n results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListRotations": { @@ -3039,6 +3123,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#ListTagsForResource": { @@ -3094,6 +3181,9 @@ "smithy.api#documentation": "

The tags related to the contact or escalation plan.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#MaxResults": { @@ -3375,7 +3465,10 @@ }, "com.amazonaws.ssmcontacts#PutContactPolicyResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#Receipt": { "type": "structure", @@ -3998,52 +4091,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -4051,13 +4148,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -4067,224 +4173,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ssm-contacts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://ssm-contacts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://ssm-contacts-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://ssm-contacts-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ssm-contacts.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://ssm-contacts.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://ssm-contacts.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://ssm-contacts.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -4299,8 +4356,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4312,8 +4369,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4325,8 +4382,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4338,8 +4395,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4351,8 +4408,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4364,8 +4421,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4377,8 +4434,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4390,8 +4447,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4403,8 +4460,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -4416,8 +4473,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -4429,8 +4486,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -4442,8 +4499,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -4455,8 +4523,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -4468,8 +4547,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -4481,8 +4571,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -4494,8 +4595,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -4507,8 +4608,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4520,8 +4621,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4532,8 +4633,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4544,10 +4645,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -4606,7 +4713,10 @@ }, "com.amazonaws.ssmcontacts#SendActivationCodeResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#Sender": { "type": "string", @@ -4882,6 +4992,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssmcontacts#StopEngagement": { @@ -4936,7 +5049,10 @@ }, "com.amazonaws.ssmcontacts#StopEngagementResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#StopReason": { "type": "string", @@ -5059,7 +5175,10 @@ }, "com.amazonaws.ssmcontacts#TagResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#TagValue": { "type": "string", @@ -5228,7 +5347,10 @@ }, "com.amazonaws.ssmcontacts#UntagResourceResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#UpdateContact": { "type": "operation", @@ -5329,7 +5451,10 @@ }, "com.amazonaws.ssmcontacts#UpdateContactChannelResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#UpdateContactRequest": { "type": "structure", @@ -5360,7 +5485,10 @@ }, "com.amazonaws.ssmcontacts#UpdateContactResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#UpdateRotation": { "type": "operation", @@ -5436,7 +5564,10 @@ }, "com.amazonaws.ssmcontacts#UpdateRotationResult": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.ssmcontacts#Uuid": { "type": "string", diff --git a/codegen/sdk-codegen/aws-models/ssm-incidents.json b/codegen/sdk-codegen/aws-models/ssm-incidents.json index 64f4f89e7bb..755e53aac99 100644 --- a/codegen/sdk-codegen/aws-models/ssm-incidents.json +++ b/codegen/sdk-codegen/aws-models/ssm-incidents.json @@ -3381,52 +3381,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3434,13 +3438,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3450,224 +3463,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ssm-incidents-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://ssm-incidents-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ssm-incidents-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://ssm-incidents-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://ssm-incidents.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://ssm-incidents.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://ssm-incidents.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://ssm-incidents.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3681,9 +3645,9 @@ } }, "params": { + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { @@ -3694,9 +3658,9 @@ } }, "params": { + "Region": "ap-northeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-2" + "UseDualStack": false } }, { @@ -3707,9 +3671,9 @@ } }, "params": { + "Region": "ap-south-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-south-1" + "UseDualStack": false } }, { @@ -3720,9 +3684,9 @@ } }, "params": { + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { @@ -3733,9 +3697,9 @@ } }, "params": { + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { @@ -3746,9 +3710,9 @@ } }, "params": { + "Region": "ca-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ca-central-1" + "UseDualStack": false } }, { @@ -3759,9 +3723,9 @@ } }, "params": { + "Region": "eu-central-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-central-1" + "UseDualStack": false } }, { @@ -3772,9 +3736,9 @@ } }, "params": { + "Region": "eu-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-north-1" + "UseDualStack": false } }, { @@ -3785,9 +3749,9 @@ } }, "params": { + "Region": "eu-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": false } }, { @@ -3798,9 +3762,9 @@ } }, "params": { + "Region": "eu-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-2" + "UseDualStack": false } }, { @@ -3811,9 +3775,9 @@ } }, "params": { + "Region": "eu-west-3", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-3" + "UseDualStack": false } }, { @@ -3824,9 +3788,9 @@ } }, "params": { + "Region": "sa-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "sa-east-1" + "UseDualStack": false } }, { @@ -3837,9 +3801,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -3850,9 +3814,9 @@ } }, "params": { + "Region": "us-east-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-2" + "UseDualStack": false } }, { @@ -3863,9 +3827,9 @@ } }, "params": { + "Region": "us-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-1" + "UseDualStack": false } }, { @@ -3876,9 +3840,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -3889,9 +3853,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -3902,9 +3866,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -3915,9 +3879,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -3928,9 +3892,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -3941,9 +3905,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -3954,9 +3918,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -3967,9 +3931,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -3980,9 +3944,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -3993,9 +3957,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -4006,9 +3970,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -4019,9 +3983,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -4030,9 +3994,9 @@ "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, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -4043,9 +4007,9 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -4054,9 +4018,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -4067,9 +4031,9 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -4078,9 +4042,9 @@ "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, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -4091,9 +4055,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -4102,9 +4066,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -4115,9 +4079,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -4128,9 +4092,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -4153,9 +4117,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -4165,9 +4129,9 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, diff --git a/codegen/sdk-codegen/aws-models/ssm-sap.json b/codegen/sdk-codegen/aws-models/ssm-sap.json index 0b61cc03fbe..f4b11d866dc 100644 --- a/codegen/sdk-codegen/aws-models/ssm-sap.json +++ b/codegen/sdk-codegen/aws-models/ssm-sap.json @@ -2682,53 +2682,53 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://ssm-sap-fips.us-gov-east-1.api.aws" + "url": "https://ssm-sap-fips.us-east-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://ssm-sap-fips.us-gov-east-1.amazonaws.com" + "url": "https://ssm-sap-fips.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-gov-east-1", + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://ssm-sap.us-gov-east-1.api.aws" + "url": "https://ssm-sap.us-east-1.api.aws" } }, "params": { - "Region": "us-gov-east-1", + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://ssm-sap.us-gov-east-1.amazonaws.com" + "url": "https://ssm-sap.us-east-1.amazonaws.com" } }, "params": { - "Region": "us-gov-east-1", + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false } @@ -2786,101 +2786,101 @@ } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://ssm-sap-fips.us-gov-east-1.api.aws" + } }, "params": { - "Region": "us-iso-east-1", + "Region": "us-gov-east-1", "UseFIPS": true, "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://ssm-sap-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://ssm-sap-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-iso-east-1", + "Region": "us-gov-east-1", "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://ssm-sap.us-gov-east-1.api.aws" + } }, "params": { - "Region": "us-iso-east-1", + "Region": "us-gov-east-1", "UseFIPS": false, "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://ssm-sap.us-iso-east-1.c2s.ic.gov" + "url": "https://ssm-sap.us-gov-east-1.amazonaws.com" } }, "params": { - "Region": "us-iso-east-1", + "Region": "us-gov-east-1", "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://ssm-sap-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "Region": "us-east-1", + "Region": "us-iso-east-1", "UseFIPS": true, "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://ssm-sap-fips.us-east-1.amazonaws.com" + "url": "https://ssm-sap-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "Region": "us-east-1", + "Region": "us-iso-east-1", "UseFIPS": true, "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://ssm-sap.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "Region": "us-east-1", + "Region": "us-iso-east-1", "UseFIPS": false, "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://ssm-sap.us-east-1.amazonaws.com" + "url": "https://ssm-sap.us-iso-east-1.c2s.ic.gov" } }, "params": { - "Region": "us-east-1", + "Region": "us-iso-east-1", "UseFIPS": false, "UseDualStack": false } @@ -2934,7 +2934,7 @@ } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" @@ -2947,6 +2947,19 @@ "Endpoint": "https://example.com" } }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, { "documentation": "For custom endpoint with fips enabled and dualstack disabled", "expect": { @@ -2970,6 +2983,12 @@ "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/ssm.json b/codegen/sdk-codegen/aws-models/ssm.json index 9528457e18a..64f34d8b7de 100644 --- a/codegen/sdk-codegen/aws-models/ssm.json +++ b/codegen/sdk-codegen/aws-models/ssm.json @@ -892,52 +892,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -945,13 +949,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -961,92 +974,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -1055,155 +1059,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://ssm.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://ssm.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://ssm.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://ssm.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/sso-oidc.json b/codegen/sdk-codegen/aws-models/sso-oidc.json index 937b357dc30..e71cdd4a717 100644 --- a/codegen/sdk-codegen/aws-models/sso-oidc.json +++ b/codegen/sdk-codegen/aws-models/sso-oidc.json @@ -55,7 +55,7 @@ "name": "awsssooidc" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

AWS IAM Identity Center (successor to AWS Single Sign-On) OpenID Connect (OIDC) is a web service that enables a client (such as AWS CLI\n or a native application) to register with IAM Identity Center. The service also enables the client to\n fetch the user’s access token upon successful authentication and authorization with\n IAM Identity Center.

\n \n

Although AWS Single Sign-On was renamed, the sso and\n identitystore API namespaces will continue to retain their original name for\n backward compatibility purposes. For more information, see IAM Identity Center rename.

\n
\n

\n Considerations for Using This Guide\n

\n

Before you begin using this guide, we recommend that you first review the following\n important information about how the IAM Identity Center OIDC service works.

\n
    \n
  • \n

    The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0\n Device Authorization Grant standard (https://tools.ietf.org/html/rfc8628) that are necessary to enable single\n sign-on authentication with the AWS CLI. Support for other OIDC flows frequently needed\n for native applications, such as Authorization Code Flow (+ PKCE), will be addressed in\n future releases.

    \n
  • \n
  • \n

    The service emits only OIDC access tokens, such that obtaining a new token (For\n example, token refresh) requires explicit user re-authentication.

    \n
  • \n
  • \n

    The access tokens provided by this service grant access to all AWS account\n entitlements assigned to an IAM Identity Center user, not just a particular application.

    \n
  • \n
  • \n

    The documentation in this guide does not describe the mechanism to convert the access\n token into AWS Auth (“sigv4”) credentials for use with IAM-protected AWS service\n endpoints. For more information, see GetRoleCredentials in the IAM Identity Center Portal API Reference\n Guide.

    \n
  • \n
\n\n

For general information about IAM Identity Center, see What is\n IAM Identity Center? in the IAM Identity Center User Guide.

", + "smithy.api#documentation": "

AWS IAM Identity Center (successor to AWS Single Sign-On) OpenID Connect (OIDC) is a web service that enables a client (such as AWS CLI\n or a native application) to register with IAM Identity Center. The service also enables the client to\n fetch the user’s access token upon successful authentication and authorization with\n IAM Identity Center.

\n \n

Although AWS Single Sign-On was renamed, the sso and\n identitystore API namespaces will continue to retain their original name for\n backward compatibility purposes. For more information, see IAM Identity Center rename.

\n
\n

\n Considerations for Using This Guide\n

\n

Before you begin using this guide, we recommend that you first review the following\n important information about how the IAM Identity Center OIDC service works.

\n
    \n
  • \n

    The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0\n Device Authorization Grant standard (https://tools.ietf.org/html/rfc8628) that are necessary to enable single\n sign-on authentication with the AWS CLI. Support for other OIDC flows frequently needed\n for native applications, such as Authorization Code Flow (+ PKCE), will be addressed in\n future releases.

    \n
  • \n
  • \n

    The service emits only OIDC access tokens, such that obtaining a new token (For\n example, token refresh) requires explicit user re-authentication.

    \n
  • \n
  • \n

    The access tokens provided by this service grant access to all AWS account\n entitlements assigned to an IAM Identity Center user, not just a particular application.

    \n
  • \n
  • \n

    The documentation in this guide does not describe the mechanism to convert the access\n token into AWS Auth (“sigv4”) credentials for use with IAM-protected AWS service\n endpoints. For more information, see GetRoleCredentials in the IAM Identity Center Portal API Reference\n Guide.

    \n
  • \n
\n

For general information about IAM Identity Center, see What is\n IAM Identity Center? in the IAM Identity Center User Guide.

", "smithy.api#title": "AWS SSO OIDC", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -117,52 +117,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -170,639 +174,200 @@ { "conditions": [ { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "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": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] - }, - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-east-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.ap-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-northeast-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.ap-northeast-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-northeast-2" - ] - } - ], - "endpoint": { - "url": "https://oidc.ap-northeast-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-northeast-3" - ] - } - ], - "endpoint": { - "url": "https://oidc.ap-northeast-3.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-south-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.ap-south-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-southeast-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.ap-southeast-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-southeast-2" - ] - } - ], - "endpoint": { - "url": "https://oidc.ap-southeast-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ca-central-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.ca-central-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-central-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.eu-central-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-north-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.eu-north-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-south-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.eu-south-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-west-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.eu-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-west-2" - ] - } - ], - "endpoint": { - "url": "https://oidc.eu-west-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-west-3" - ] - } - ], - "endpoint": { - "url": "https://oidc.eu-west-3.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "me-south-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.me-south-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "sa-east-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.sa-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "https://oidc.us-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-east-2" + "supportsFIPS" ] } - ], - "endpoint": { - "url": "https://oidc.us-east-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + ] }, { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-west-2" + "supportsDualStack" ] } - ], + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], "endpoint": { - "url": "https://oidc.us-west-2.amazonaws.com", + "url": "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-gov-east-1" + "supportsFIPS" ] } - ], + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], "endpoint": { - "url": "https://oidc.us-gov-east-1.amazonaws.com", + "url": "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "us-gov-west-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://oidc.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://oidc.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://oidc.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -817,8 +382,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -830,8 +395,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -843,8 +408,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -856,8 +421,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -869,8 +434,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -882,8 +447,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -895,8 +460,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -908,8 +473,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -921,8 +486,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -934,8 +499,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -947,8 +512,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -960,8 +525,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -973,8 +538,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -986,8 +551,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -999,8 +564,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1012,8 +577,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1025,8 +590,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1038,8 +603,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1051,8 +616,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1064,8 +629,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1077,8 +642,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1090,8 +655,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1103,8 +668,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1116,8 +681,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1129,8 +694,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1142,8 +707,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1155,8 +720,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1168,8 +733,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1181,8 +746,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1194,8 +759,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1207,8 +772,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1220,8 +796,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1233,8 +820,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1246,8 +844,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1259,8 +868,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1272,8 +881,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1285,8 +894,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1297,8 +906,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1309,10 +918,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1443,7 +1058,7 @@ "grantType": { "target": "com.amazonaws.ssooidc#GrantType", "traits": { - "smithy.api#documentation": "

Supports grant types for the authorization code, refresh token, and device code request.\n For device code requests, specify the following value:

\n\n

\n urn:ietf:params:oauth:grant-type:device_code\n \n

\n\n

For information about how to obtain the device code, see the StartDeviceAuthorization topic.

", + "smithy.api#documentation": "

Supports grant types for the authorization code, refresh token, and device code request.\n For device code requests, specify the following value:

\n

\n urn:ietf:params:oauth:grant-type:device_code\n \n

\n

For information about how to obtain the device code, see the StartDeviceAuthorization topic.

", "smithy.api#required": {} } }, @@ -1477,6 +1092,9 @@ "smithy.api#documentation": "

The location of the application that will receive the authorization code. Users authorize\n the service to send the request to this location.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ssooidc#CreateTokenResponse": { @@ -1513,6 +1131,9 @@ "smithy.api#documentation": "

Currently, idToken is not yet implemented and is not supported. For more\n information about the features and limitations of the current IAM Identity Center OIDC implementation,\n see Considerations for Using this Guide in the IAM Identity Center\n OIDC API Reference.

\n

The identifier of the user that associated with the access token, if present.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssooidc#DeviceCode": { @@ -1719,6 +1340,9 @@ "smithy.api#documentation": "

The list of scopes that are defined by the client. Upon authorization, this list is used\n to restrict permissions when granting an access token.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ssooidc#RegisterClientResponse": { @@ -1762,6 +1386,9 @@ "smithy.api#documentation": "

The endpoint where the client can get an access token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssooidc#Scope": { @@ -1849,6 +1476,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.ssooidc#StartDeviceAuthorizationResponse": { @@ -1892,6 +1522,9 @@ "smithy.api#documentation": "

Indicates the number of seconds the client must wait between attempts when polling for a\n session.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.ssooidc#TokenType": { diff --git a/codegen/sdk-codegen/aws-models/sso.json b/codegen/sdk-codegen/aws-models/sso.json index 474fc293424..9804c216731 100644 --- a/codegen/sdk-codegen/aws-models/sso.json +++ b/codegen/sdk-codegen/aws-models/sso.json @@ -154,6 +154,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sso#GetRoleCredentialsResponse": { @@ -165,6 +168,9 @@ "smithy.api#documentation": "

The credentials for the role that is assigned to the user.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sso#InvalidRequestException": { @@ -252,6 +258,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sso#ListAccountRolesResponse": { @@ -269,6 +278,9 @@ "smithy.api#documentation": "

A paginated response with the list of roles and the next token if more results are\n available.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sso#ListAccounts": { @@ -335,6 +347,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sso#ListAccountsResponse": { @@ -352,6 +367,9 @@ "smithy.api#documentation": "

A paginated response with the list of account information and the next token if more\n results are available.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.sso#Logout": { @@ -375,7 +393,7 @@ ], "traits": { "smithy.api#auth": [], - "smithy.api#documentation": "

Removes the locally stored SSO tokens from the client-side cache and sends an API call to\n the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in\n session.

\n\n \n

If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM Identity Center sign in session is\n used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set.\n More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user,\n and the corresponding temporary AWS credentials are returned to the client.

\n\n

After user logout, any existing IAM role sessions that were created by using IAM Identity Center\n permission sets continue based on the duration configured in the permission set.\n For more information, see User\n authentications in the IAM Identity Center User\n Guide.

\n
", + "smithy.api#documentation": "

Removes the locally stored SSO tokens from the client-side cache and sends an API call to\n the IAM Identity Center service to invalidate the corresponding server-side IAM Identity Center sign in\n session.

\n \n

If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM Identity Center sign in session is\n used to obtain an IAM session, as specified in the corresponding IAM Identity Center permission set.\n More specifically, IAM Identity Center assumes an IAM role in the target account on behalf of the user,\n and the corresponding temporary AWS credentials are returned to the client.

\n

After user logout, any existing IAM role sessions that were created by using IAM Identity Center\n permission sets continue based on the duration configured in the permission set.\n For more information, see User\n authentications in the IAM Identity Center User\n Guide.

\n
", "smithy.api#http": { "method": "POST", "uri": "/logout", @@ -395,6 +413,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.sso#MaxResultType": { @@ -513,7 +534,7 @@ "name": "awsssoportal" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to\n IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles\n assigned to them and get federated into the application.

\n\n \n

Although AWS Single Sign-On was renamed, the sso and\n identitystore API namespaces will continue to retain their original name for\n backward compatibility purposes. For more information, see IAM Identity Center rename.

\n
\n\n

This reference guide describes the IAM Identity Center Portal operations that you can call\n programatically and includes detailed information on data types and errors.

\n\n \n

AWS provides SDKs that consist of libraries and sample code for various programming\n languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a\n convenient way to create programmatic access to IAM Identity Center and other AWS services. For more\n information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.

\n
", + "smithy.api#documentation": "

AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web service that makes it easy for you to assign user access to\n IAM Identity Center resources such as the AWS access portal. Users can get AWS account applications and roles\n assigned to them and get federated into the application.

\n \n

Although AWS Single Sign-On was renamed, the sso and\n identitystore API namespaces will continue to retain their original name for\n backward compatibility purposes. For more information, see IAM Identity Center rename.

\n
\n

This reference guide describes the IAM Identity Center Portal operations that you can call\n programatically and includes detailed information on data types and errors.

\n \n

AWS provides SDKs that consist of libraries and sample code for various programming\n languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a\n convenient way to create programmatic access to IAM Identity Center and other AWS services. For more\n information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services.

\n
", "smithy.api#title": "AWS Single Sign-On", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -575,52 +596,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -628,13 +653,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -644,623 +678,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "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": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-east-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.ap-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseFIPS" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "ap-northeast-1" + "supportsFIPS" ] } - ], - "endpoint": { - "url": "https://portal.sso.ap-northeast-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-northeast-2" - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://portal.sso.ap-northeast-2.amazonaws.com", + "url": "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" - }, + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-northeast-3" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.ap-northeast-3.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "ap-south-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://portal.sso.ap-south-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-southeast-1" - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://portal.sso.ap-southeast-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-southeast-2" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.ap-southeast-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ca-central-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.ca-central-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-central-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.eu-central-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-north-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.eu-north-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-south-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.eu-south-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-west-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.eu-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-west-2" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.eu-west-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-west-3" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.eu-west-3.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "me-south-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.me-south-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "sa-east-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.sa-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.us-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-2" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.us-east-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-west-2" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.us-west-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://portal.sso.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1275,8 +861,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1288,8 +874,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1301,8 +887,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1314,8 +900,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1327,8 +913,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1340,8 +926,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1353,8 +939,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1366,8 +952,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1379,8 +965,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1392,8 +978,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1405,8 +991,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1418,8 +1004,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1431,8 +1017,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1444,8 +1030,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1457,8 +1043,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1470,8 +1056,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1483,8 +1069,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1496,8 +1082,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1509,8 +1095,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1522,8 +1108,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1535,8 +1121,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1548,8 +1134,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1561,8 +1147,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1574,8 +1160,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1587,8 +1173,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1600,8 +1186,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1613,8 +1199,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1626,8 +1212,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1639,8 +1225,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1652,8 +1238,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1665,8 +1251,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1678,8 +1275,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1691,8 +1299,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1704,8 +1323,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1717,8 +1347,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1730,8 +1360,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1743,8 +1373,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1755,8 +1385,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1767,10 +1397,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/storage-gateway.json b/codegen/sdk-codegen/aws-models/storage-gateway.json index 4891e83c288..067147d1b51 100644 --- a/codegen/sdk-codegen/aws-models/storage-gateway.json +++ b/codegen/sdk-codegen/aws-models/storage-gateway.json @@ -46,7 +46,25 @@ } ], "traits": { - "smithy.api#documentation": "

Activates the gateway you previously deployed on your host. In the activation process,\n you specify information such as the Amazon Web Services Region that you want to use for\n storing snapshots or tapes, the time zone for scheduled snapshots the gateway snapshot\n schedule window, an activation key, and a name for your gateway. The activation process\n also associates your gateway with your account. For more information, see UpdateGatewayInformation.

\n \n

You must turn on the gateway VM before you can activate your gateway.

\n
" + "smithy.api#documentation": "

Activates the gateway you previously deployed on your host. In the activation process,\n you specify information such as the Amazon Web Services Region that you want to use for\n storing snapshots or tapes, the time zone for scheduled snapshots the gateway snapshot\n schedule window, an activation key, and a name for your gateway. The activation process\n also associates your gateway with your account. For more information, see UpdateGatewayInformation.

\n \n

You must turn on the gateway VM before you can activate your gateway.

\n
", + "smithy.api#examples": [ + { + "title": "To activate the gateway", + "documentation": "Activates the gateway you previously deployed on your host.", + "input": { + "ActivationKey": "29AV1-3OFV9-VVIUB-NKT0I-LRO6V", + "GatewayName": "My_Gateway", + "GatewayTimezone": "GMT-12:00", + "GatewayRegion": "us-east-1", + "GatewayType": "STORED", + "TapeDriveType": "IBM-ULT3580-TD5", + "MediumChangerType": "AWS-Gateway-VTL" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B" + } + } + ] } }, "com.amazonaws.storagegateway#ActivateGatewayInput": { @@ -55,7 +73,7 @@ "ActivationKey": { "target": "com.amazonaws.storagegateway#ActivationKey", "traits": { - "smithy.api#documentation": "

Your gateway activation key. You can obtain the activation key by sending an HTTP GET\n request with redirects enabled to the gateway IP address (port 80). The redirect URL\n returned in the response provides you the activation key for your gateway in the query\n string parameter activationKey. It may also include other activation-related\n parameters, however, these are merely defaults -- the arguments you pass to the\n ActivateGateway API call determine the actual configuration of your\n gateway.

\n\n \n\n

For more information, see Getting activation\n key in the Storage Gateway User Guide.

", + "smithy.api#documentation": "

Your gateway activation key. You can obtain the activation key by sending an HTTP GET\n request with redirects enabled to the gateway IP address (port 80). The redirect URL\n returned in the response provides you the activation key for your gateway in the query\n string parameter activationKey. It may also include other activation-related\n parameters, however, these are merely defaults -- the arguments you pass to the\n ActivateGateway API call determine the actual configuration of your\n gateway.

\n

For more information, see Getting activation\n key in the Storage Gateway User Guide.

", "smithy.api#required": {} } }, @@ -76,37 +94,38 @@ "GatewayRegion": { "target": "com.amazonaws.storagegateway#RegionId", "traits": { - "smithy.api#documentation": "

A value that indicates the Amazon Web Services Region where you want to store your data.\n The gateway Amazon Web Services Region specified must be the same Amazon Web Services Region\n as the Amazon Web Services Region in your Host header in the request. For more\n information about available Amazon Web Services Regions and endpoints for Storage Gateway, see \n Storage Gateway endpoints and quotas in the Amazon Web Services\n General Reference.

\n\n

Valid Values: See \n Storage Gateway endpoints and quotas in the Amazon Web Services\n General Reference.\n \n

", + "smithy.api#documentation": "

A value that indicates the Amazon Web Services Region where you want to store your data.\n The gateway Amazon Web Services Region specified must be the same Amazon Web Services Region\n as the Amazon Web Services Region in your Host header in the request. For more\n information about available Amazon Web Services Regions and endpoints for Storage Gateway, see \n Storage Gateway endpoints and quotas in the Amazon Web Services\n General Reference.

\n

Valid Values: See \n Storage Gateway endpoints and quotas in the Amazon Web Services\n General Reference.\n \n

", "smithy.api#required": {} } }, "GatewayType": { "target": "com.amazonaws.storagegateway#GatewayType", "traits": { - "smithy.api#documentation": "

A value that defines the type of gateway to activate. The type specified is critical to\n all later functions of the gateway and cannot be changed after activation. The default\n value is CACHED.

\n\n

Valid Values: STORED | CACHED | VTL |\n VTL_SNOW | FILE_S3 | FILE_FSX_SMB\n

" + "smithy.api#documentation": "

A value that defines the type of gateway to activate. The type specified is critical to\n all later functions of the gateway and cannot be changed after activation. The default\n value is CACHED.

\n

Valid Values: STORED | CACHED | VTL |\n VTL_SNOW | FILE_S3 | FILE_FSX_SMB\n

" } }, "TapeDriveType": { "target": "com.amazonaws.storagegateway#TapeDriveType", "traits": { - "smithy.api#documentation": "

The value that indicates the type of tape drive to use for tape gateway. This field is\n optional.

\n\n

Valid Values: IBM-ULT3580-TD5\n

" + "smithy.api#documentation": "

The value that indicates the type of tape drive to use for tape gateway. This field is\n optional.

\n

Valid Values: IBM-ULT3580-TD5\n

" } }, "MediumChangerType": { "target": "com.amazonaws.storagegateway#MediumChangerType", "traits": { - "smithy.api#documentation": "

The value that indicates the type of medium changer to use for tape gateway. This field\n is optional.

\n\n

Valid Values: STK-L700 | AWS-Gateway-VTL |\n IBM-03584L32-0402\n

" + "smithy.api#documentation": "

The value that indicates the type of medium changer to use for tape gateway. This field\n is optional.

\n

Valid Values: STK-L700 | AWS-Gateway-VTL |\n IBM-03584L32-0402\n

" } }, "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that you can assign to the gateway. Each tag is a key-value\n pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers that can be\n represented in UTF-8 format, and the following special characters: + - = . _ : / @. The\n maximum length of a tag's key is 128 characters, and the maximum length for a\n tag's value is 256 characters.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that you can assign to the gateway. Each tag is a key-value\n pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers that can be\n represented in UTF-8 format, and the following special characters: + - = . _ : / @. The\n maximum length of a tag's key is 128 characters, and the maximum length for a\n tag's value is 256 characters.

\n
" } } }, "traits": { - "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ActivateGatewayOutput": { @@ -117,7 +136,8 @@ } }, "traits": { - "smithy.api#documentation": "

Storage Gateway returns the Amazon Resource Name (ARN) of the activated gateway. It\n is a string made of information such as your account, gateway name, and Amazon Web Services Region. This ARN is used to reference the gateway in other API operations as\n well as resource-based authorization.

\n\n \n

For gateways activated prior to September 02, 2015, the gateway ARN contains the\n gateway name rather than the gateway ID. Changing the name of the gateway has no effect\n on the gateway ARN.

\n
" + "smithy.api#documentation": "

Storage Gateway returns the Amazon Resource Name (ARN) of the activated gateway. It\n is a string made of information such as your account, gateway name, and Amazon Web Services Region. This ARN is used to reference the gateway in other API operations as\n well as resource-based authorization.

\n \n

For gateways activated prior to September 02, 2015, the gateway ARN contains the\n gateway name rather than the gateway ID. Changing the name of the gateway has no effect\n on the gateway ARN.

\n
", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ActivationKey": { @@ -130,38 +150,50 @@ } }, "com.amazonaws.storagegateway#ActiveDirectoryStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACCESS_DENIED", - "name": "ACCESS_DENIED" - }, - { - "value": "DETACHED", - "name": "DETACHED" - }, - { - "value": "JOINED", - "name": "JOINED" - }, - { - "value": "JOINING", - "name": "JOINING" - }, - { - "value": "NETWORK_ERROR", - "name": "NETWORK_ERROR" - }, - { - "value": "TIMEOUT", - "name": "TIMEOUT" - }, - { - "value": "UNKNOWN_ERROR", - "name": "UNKNOWN_ERROR" + "type": "enum", + "members": { + "ACCESS_DENIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACCESS_DENIED" } - ] + }, + "DETACHED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DETACHED" + } + }, + "JOINED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JOINED" + } + }, + "JOINING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JOINING" + } + }, + "NETWORK_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NETWORK_ERROR" + } + }, + "TIMEOUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMEOUT" + } + }, + "UNKNOWN_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN_ERROR" + } + } } }, "com.amazonaws.storagegateway#AddCache": { @@ -181,7 +213,23 @@ } ], "traits": { - "smithy.api#documentation": "

Configures one or more gateway local disks as cache for a gateway. This operation is\n only supported in the cached volume, tape, and file gateway type (see How Storage Gateway works (architecture).

\n\n

In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to\n add cache, and one or more disk IDs that you want to configure as cache.

" + "smithy.api#documentation": "

Configures one or more gateway local disks as cache for a gateway. This operation is\n only supported in the cached volume, tape, and file gateway type (see How Storage Gateway works (architecture).

\n

In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to\n add cache, and one or more disk IDs that you want to configure as cache.

", + "smithy.api#examples": [ + { + "title": "To add a cache", + "documentation": "The following example shows a request that activates a gateway-stored volume.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "DiskIds": [ + "pci-0000:03:00.0-scsi-0:0:0:0", + "pci-0000:03:00.0-scsi-0:0:1:0" + ] + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#AddCacheInput": { @@ -200,6 +248,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#AddCacheOutput": { @@ -208,6 +259,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#AddTagsToResource": { @@ -227,7 +281,25 @@ } ], "traits": { - "smithy.api#documentation": "

Adds one or more tags to the specified resource. You use tags to add metadata to\n resources, which you can use to categorize these resources. For example, you can categorize\n resources by purpose, owner, environment, or team. Each tag consists of a key and a value,\n which you define. You can add tags to the following Storage Gateway resources:

\n\n
    \n
  • \n

    Storage gateways of all types

    \n
  • \n
  • \n

    Storage volumes

    \n
  • \n
  • \n

    Virtual tapes

    \n
  • \n
  • \n

    NFS and SMB file shares

    \n
  • \n
  • \n

    File System associations

    \n
  • \n
\n\n

You can create a maximum of 50 tags for each resource. Virtual tapes and storage volumes\n that are recovered to a new gateway maintain their tags.

" + "smithy.api#documentation": "

Adds one or more tags to the specified resource. You use tags to add metadata to\n resources, which you can use to categorize these resources. For example, you can categorize\n resources by purpose, owner, environment, or team. Each tag consists of a key and a value,\n which you define. You can add tags to the following Storage Gateway resources:

\n
    \n
  • \n

    Storage gateways of all types

    \n
  • \n
  • \n

    Storage volumes

    \n
  • \n
  • \n

    Virtual tapes

    \n
  • \n
  • \n

    NFS and SMB file shares

    \n
  • \n
  • \n

    File System associations

    \n
  • \n
\n

You can create a maximum of 50 tags for each resource. Virtual tapes and storage volumes\n that are recovered to a new gateway maintain their tags.

", + "smithy.api#examples": [ + { + "title": "To add tags to resource", + "documentation": "Adds one or more tags to the specified resource.", + "input": { + "ResourceARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B", + "Tags": [ + { + "Key": "Dev Gatgeway Region", + "Value": "East Coast" + } + ] + }, + "output": { + "ResourceARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B" + } + } + ] } }, "com.amazonaws.storagegateway#AddTagsToResourceInput": { @@ -243,13 +315,14 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

The key-value pair that represents the tag you want to add to the resource. The value\n can be an empty string.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
", + "smithy.api#documentation": "

The key-value pair that represents the tag you want to add to the resource. The value\n can be an empty string.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

AddTagsToResourceInput

" + "smithy.api#documentation": "

AddTagsToResourceInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#AddTagsToResourceOutput": { @@ -263,7 +336,8 @@ } }, "traits": { - "smithy.api#documentation": "

AddTagsToResourceOutput

" + "smithy.api#documentation": "

AddTagsToResourceOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#AddUploadBuffer": { @@ -283,7 +357,23 @@ } ], "traits": { - "smithy.api#documentation": "

Configures one or more gateway local disks as upload buffer for a specified gateway.\n This operation is supported for the stored volume, cached volume, and tape gateway\n types.

\n\n

In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to\n add upload buffer, and one or more disk IDs that you want to configure as upload\n buffer.

" + "smithy.api#documentation": "

Configures one or more gateway local disks as upload buffer for a specified gateway.\n This operation is supported for the stored volume, cached volume, and tape gateway\n types.

\n

In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to\n add upload buffer, and one or more disk IDs that you want to configure as upload\n buffer.

", + "smithy.api#examples": [ + { + "title": "To add upload buffer on local disk", + "documentation": "Configures one or more gateway local disks as upload buffer for a specified gateway.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "DiskIds": [ + "pci-0000:03:00.0-scsi-0:0:0:0", + "pci-0000:03:00.0-scsi-0:0:1:0" + ] + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#AddUploadBufferInput": { @@ -302,6 +392,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#AddUploadBufferOutput": { @@ -310,6 +403,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#AddWorkingStorage": { @@ -329,7 +425,23 @@ } ], "traits": { - "smithy.api#documentation": "

Configures one or more gateway local disks as working storage for a gateway. This\n operation is only supported in the stored volume gateway type. This operation is deprecated\n in cached volume API version 20120630. Use AddUploadBuffer\n instead.

\n\n \n

Working storage is also referred to as upload buffer. You can also use the AddUploadBuffer operation to add upload buffer to a stored volume\n gateway.

\n
\n\n

In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to\n add working storage, and one or more disk IDs that you want to configure as working\n storage.

" + "smithy.api#documentation": "

Configures one or more gateway local disks as working storage for a gateway. This\n operation is only supported in the stored volume gateway type. This operation is deprecated\n in cached volume API version 20120630. Use AddUploadBuffer\n instead.

\n \n

Working storage is also referred to as upload buffer. You can also use the AddUploadBuffer operation to add upload buffer to a stored volume\n gateway.

\n
\n

In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to\n add working storage, and one or more disk IDs that you want to configure as working\n storage.

", + "smithy.api#examples": [ + { + "title": "To add storage on local disk", + "documentation": "Configures one or more gateway local disks as working storage for a gateway. (Working storage is also referred to as upload buffer.)", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "DiskIds": [ + "pci-0000:03:00.0-scsi-0:0:0:0", + "pci-0000:03:00.0-scsi-0:0:1:0" + ] + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#AddWorkingStorageInput": { @@ -350,7 +462,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#AddWorkingStorageOutput": { @@ -361,7 +474,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway for which working\n storage was configured.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway for which working\n storage was configured.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#AssignTapePool": { @@ -405,9 +519,12 @@ "target": "com.amazonaws.storagegateway#Boolean2", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Set permissions to bypass governance retention. If the lock type of the archived tape is\n Governance, the tape's archived age is not older than\n RetentionLockInDays, and the user does not already have\n BypassGovernanceRetention, setting this to TRUE enables the user to bypass\n the retention lock. This parameter is set to true by default for calls from the\n console.

\n\n

Valid values: TRUE | FALSE\n

" + "smithy.api#documentation": "

Set permissions to bypass governance retention. If the lock type of the archived tape is\n Governance, the tape's archived age is not older than\n RetentionLockInDays, and the user does not already have\n BypassGovernanceRetention, setting this to TRUE enables the user to bypass\n the retention lock. This parameter is set to true by default for calls from the\n console.

\n

Valid values: TRUE | FALSE\n

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#AssignTapePoolOutput": { @@ -419,6 +536,9 @@ "smithy.api#documentation": "

The unique Amazon Resource Names (ARN) of the virtual tape that was added to the tape\n pool.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#AssociateFileSystem": { @@ -499,6 +619,9 @@ "smithy.api#documentation": "

Specifies the network configuration information for the gateway associated with the\n Amazon FSx file system.

\n \n

If multiple file systems are associated with this gateway, this parameter's\n IpAddresses field is required.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#AssociateFileSystemOutput": { @@ -510,6 +633,9 @@ "smithy.api#documentation": "

The ARN of the newly created file system association.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#AttachVolume": { @@ -545,7 +671,7 @@ "TargetName": { "target": "com.amazonaws.storagegateway#TargetName", "traits": { - "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

" + "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

" } }, "VolumeARN": { @@ -558,7 +684,7 @@ "NetworkInterfaceId": { "target": "com.amazonaws.storagegateway#NetworkInterfaceId", "traits": { - "smithy.api#documentation": "

The network interface of the gateway on which to expose the iSCSI target. Only IPv4\n addresses are accepted. Use DescribeGatewayInformation to get a list of\n the network interfaces available on a gateway.

\n\n

Valid Values: A valid IP address.

", + "smithy.api#documentation": "

The network interface of the gateway on which to expose the iSCSI target. Only IPv4\n addresses are accepted. Use DescribeGatewayInformation to get a list of\n the network interfaces available on a gateway.

\n

Valid Values: A valid IP address.

", "smithy.api#required": {} } }, @@ -570,7 +696,8 @@ } }, "traits": { - "smithy.api#documentation": "

AttachVolumeInput

" + "smithy.api#documentation": "

AttachVolumeInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#AttachVolumeOutput": { @@ -590,7 +717,8 @@ } }, "traits": { - "smithy.api#documentation": "

AttachVolumeOutput

" + "smithy.api#documentation": "

AttachVolumeOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#AuditDestinationARN": { @@ -605,7 +733,7 @@ "com.amazonaws.storagegateway#Authentication": { "type": "string", "traits": { - "smithy.api#documentation": "

The authentication method of the file share. The default is\n ActiveDirectory.

\n\n

Valid Values: ActiveDirectory | GuestAccess\n

", + "smithy.api#documentation": "

The authentication method of the file share. The default is\n ActiveDirectory.

\n

Valid Values: ActiveDirectory | GuestAccess\n

", "smithy.api#length": { "min": 5, "max": 15 @@ -641,7 +769,7 @@ "TapeBarcodePrefix": { "target": "com.amazonaws.storagegateway#TapeBarcodePrefix", "traits": { - "smithy.api#documentation": "

A prefix that you append to the barcode of the virtual tape that you are creating. This\n prefix makes the barcode unique.

\n\n \n

The prefix must be 1-4 characters in length and must be one of the uppercase letters\n from A to Z.

\n
", + "smithy.api#documentation": "

A prefix that you append to the barcode of the virtual tape that you are creating. This\n prefix makes the barcode unique.

\n \n

The prefix must be 1-4 characters in length and must be one of the uppercase letters\n from A to Z.

\n
", "smithy.api#required": {} } }, @@ -691,22 +819,26 @@ } }, "com.amazonaws.storagegateway#AvailabilityMonitorTestStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "COMPLETE", - "name": "COMPLETE" - }, - { - "value": "FAILED", - "name": "FAILED" - }, - { - "value": "PENDING", - "name": "PENDING" + "type": "enum", + "members": { + "COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETE" } - ] + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + } } }, "com.amazonaws.storagegateway#BandwidthDownloadRateLimit": { @@ -744,7 +876,7 @@ "EndMinuteOfHour": { "target": "com.amazonaws.storagegateway#MinuteOfHour", "traits": { - "smithy.api#documentation": "

The minute of the hour to end the bandwidth rate limit interval.

\n\n \n

The bandwidth rate limit interval ends at the end of the minute. To end an interval\n at the end of an hour, use the value 59.

\n
", + "smithy.api#documentation": "

The minute of the hour to end the bandwidth rate limit interval.

\n \n

The bandwidth rate limit interval ends at the end of the minute. To end an interval\n at the end of an hour, use the value 59.

\n
", "smithy.api#required": {} } }, @@ -816,7 +948,7 @@ "CacheStaleTimeoutInSeconds": { "target": "com.amazonaws.storagegateway#CacheStaleTimeoutInSeconds", "traits": { - "smithy.api#documentation": "

Refreshes a file share's cache by using Time To Live (TTL). TTL is the length of\n time since the last refresh after which access to the directory would cause the file\n gateway to first refresh that directory's contents from the Amazon S3 bucket\n or Amazon FSx file system. The TTL duration is in seconds.

\n\n

Valid Values:0, 300 to 2,592,000 seconds (5 minutes to 30 days)

" + "smithy.api#documentation": "

Refreshes a file share's cache by using Time To Live (TTL). TTL is the length of\n time since the last refresh after which access to the directory would cause the file\n gateway to first refresh that directory's contents from the Amazon S3 bucket\n or Amazon FSx file system. The TTL duration is in seconds.

\n

Valid Values:0, 300 to 2,592,000 seconds (5 minutes to 30 days)

" } } }, @@ -894,7 +1026,7 @@ "VolumeUsedInBytes": { "target": "com.amazonaws.storagegateway#VolumeUsedInBytes", "traits": { - "smithy.api#documentation": "

The size of the data stored on the volume in bytes. This value is calculated based on\n the number of blocks that are touched, instead of the actual amount of data written. This\n value can be useful for sequential write patterns but less accurate for random write\n patterns. VolumeUsedInBytes is different from the compressed size of the\n volume, which is the value that is used to calculate your bill.

\n\n \n

This value is not available for volumes created prior to May 13, 2015, until you\n store data on the volume.

\n\n

If you use a delete tool that overwrites the data on your volume with random data,\n your usage will not be reduced. This is because the random data is not compressible. If\n you want to reduce the amount of billed storage on your volume, we recommend overwriting\n your files with zeros to compress the data to a negligible amount of actual\n storage.

\n
" + "smithy.api#documentation": "

The size of the data stored on the volume in bytes. This value is calculated based on\n the number of blocks that are touched, instead of the actual amount of data written. This\n value can be useful for sequential write patterns but less accurate for random write\n patterns. VolumeUsedInBytes is different from the compressed size of the\n volume, which is the value that is used to calculate your bill.

\n \n

This value is not available for volumes created prior to May 13, 2015, until you\n store data on the volume.

\n

If you use a delete tool that overwrites the data on your volume with random data,\n your usage will not be reduced. This is because the random data is not compressible. If\n you want to reduce the amount of billed storage on your volume, we recommend overwriting\n your files with zeros to compress the data to a negligible amount of actual\n storage.

\n
" } }, "KMSKey": { @@ -903,7 +1035,7 @@ "TargetName": { "target": "com.amazonaws.storagegateway#TargetName", "traits": { - "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

" + "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

" } } }, @@ -934,7 +1066,20 @@ } ], "traits": { - "smithy.api#documentation": "

Cancels archiving of a virtual tape to the virtual tape shelf (VTS) after the archiving\n process is initiated. This operation is only supported in the tape gateway type.

" + "smithy.api#documentation": "

Cancels archiving of a virtual tape to the virtual tape shelf (VTS) after the archiving\n process is initiated. This operation is only supported in the tape gateway type.

", + "smithy.api#examples": [ + { + "title": "To cancel virtual tape archiving", + "documentation": "Cancels archiving of a virtual tape to the virtual tape shelf (VTS) after the archiving process is initiated.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/AMZN01A2A4" + }, + "output": { + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/AMZN01A2A4" + } + } + ] } }, "com.amazonaws.storagegateway#CancelArchivalInput": { @@ -955,7 +1100,8 @@ } }, "traits": { - "smithy.api#documentation": "

CancelArchivalInput

" + "smithy.api#documentation": "

CancelArchivalInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CancelArchivalOutput": { @@ -969,7 +1115,8 @@ } }, "traits": { - "smithy.api#documentation": "

CancelArchivalOutput

" + "smithy.api#documentation": "

CancelArchivalOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CancelRetrieval": { @@ -989,7 +1136,20 @@ } ], "traits": { - "smithy.api#documentation": "

Cancels retrieval of a virtual tape from the virtual tape shelf (VTS) to a gateway after\n the retrieval process is initiated. The virtual tape is returned to the VTS. This operation\n is only supported in the tape gateway type.

" + "smithy.api#documentation": "

Cancels retrieval of a virtual tape from the virtual tape shelf (VTS) to a gateway after\n the retrieval process is initiated. The virtual tape is returned to the VTS. This operation\n is only supported in the tape gateway type.

", + "smithy.api#examples": [ + { + "title": "To cancel virtual tape retrieval", + "documentation": "Cancels retrieval of a virtual tape from the virtual tape shelf (VTS) to a gateway after the retrieval process is initiated.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/AMZN01A2A4" + }, + "output": { + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/AMZN01A2A4" + } + } + ] } }, "com.amazonaws.storagegateway#CancelRetrievalInput": { @@ -1010,7 +1170,8 @@ } }, "traits": { - "smithy.api#documentation": "

CancelRetrievalInput

" + "smithy.api#documentation": "

CancelRetrievalInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CancelRetrievalOutput": { @@ -1024,22 +1185,25 @@ } }, "traits": { - "smithy.api#documentation": "

CancelRetrievalOutput

" + "smithy.api#documentation": "

CancelRetrievalOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CaseSensitivity": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ClientSpecified", - "name": "ClientSpecified" - }, - { - "value": "CaseSensitive", - "name": "CaseSensitive" + "type": "enum", + "members": { + "ClientSpecified": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ClientSpecified" } - ] + }, + "CaseSensitive": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CaseSensitive" + } + } } }, "com.amazonaws.storagegateway#ChapCredentials": { @@ -1054,7 +1218,7 @@ "TargetARN": { "target": "com.amazonaws.storagegateway#TargetARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the volume.

\n\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the volume.

\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" } }, "SecretToAuthenticateInitiator": { @@ -1125,7 +1289,25 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a cached volume on a specified cached volume gateway. This operation is only\n supported in the cached volume gateway type.

\n\n \n

Cache storage must be allocated to the gateway before you can create a cached volume.\n Use the AddCache operation to add cache storage to a gateway.

\n
\n\n

In the request, you must specify the gateway, size of the volume in bytes, the iSCSI\n target name, an IP address on which to expose the target, and a unique client token. In\n response, the gateway creates the volume and returns information about it. This information\n includes the volume Amazon Resource Name (ARN), its size, and the iSCSI target ARN that\n initiators can use to connect to the volume target.

\n\n

Optionally, you can provide the ARN for an existing volume as the\n SourceVolumeARN for this cached volume, which creates an exact copy of the\n existing volume’s latest recovery point. The VolumeSizeInBytes value must be\n equal to or larger than the size of the copied volume, in bytes.

" + "smithy.api#documentation": "

Creates a cached volume on a specified cached volume gateway. This operation is only\n supported in the cached volume gateway type.

\n \n

Cache storage must be allocated to the gateway before you can create a cached volume.\n Use the AddCache operation to add cache storage to a gateway.

\n
\n

In the request, you must specify the gateway, size of the volume in bytes, the iSCSI\n target name, an IP address on which to expose the target, and a unique client token. In\n response, the gateway creates the volume and returns information about it. This information\n includes the volume Amazon Resource Name (ARN), its size, and the iSCSI target ARN that\n initiators can use to connect to the volume target.

\n

Optionally, you can provide the ARN for an existing volume as the\n SourceVolumeARN for this cached volume, which creates an exact copy of the\n existing volume’s latest recovery point. The VolumeSizeInBytes value must be\n equal to or larger than the size of the copied volume, in bytes.

", + "smithy.api#examples": [ + { + "title": "To create a cached iSCSI volume", + "documentation": "Creates a cached volume on a specified cached gateway.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "VolumeSizeInBytes": 536870912000, + "SnapshotId": "snap-f47b7b94", + "TargetName": "my-volume", + "NetworkInterfaceId": "10.1.1.1", + "ClientToken": "cachedvol112233" + }, + "output": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume" + } + } + ] } }, "com.amazonaws.storagegateway#CreateCachediSCSIVolumeInput": { @@ -1154,7 +1336,7 @@ "TargetName": { "target": "com.amazonaws.storagegateway#TargetName", "traits": { - "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

", + "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

", "smithy.api#required": {} } }, @@ -1167,7 +1349,7 @@ "NetworkInterfaceId": { "target": "com.amazonaws.storagegateway#NetworkInterfaceId", "traits": { - "smithy.api#documentation": "

The network interface of the gateway on which to expose the iSCSI target. Only IPv4\n addresses are accepted. Use DescribeGatewayInformation to get a list of\n the network interfaces available on a gateway.

\n\n

Valid Values: A valid IP address.

", + "smithy.api#documentation": "

The network interface of the gateway on which to expose the iSCSI target. Only IPv4\n addresses are accepted. Use DescribeGatewayInformation to get a list of\n the network interfaces available on a gateway.

\n

Valid Values: A valid IP address.

", "smithy.api#required": {} } }, @@ -1181,7 +1363,7 @@ "KMSEncrypted": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -1193,9 +1375,12 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that you can assign to a cached volume. Each tag is a key-value\n pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers that you can\n represent in UTF-8 format, and the following special characters: + - = . _ : / @. The\n maximum length of a tag's key is 128 characters, and the maximum length for a\n tag's value is 256 characters.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that you can assign to a cached volume. Each tag is a key-value\n pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers that you can\n represent in UTF-8 format, and the following special characters: + - = . _ : / @. The\n maximum length of a tag's key is 128 characters, and the maximum length for a\n tag's value is 256 characters.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CreateCachediSCSIVolumeOutput": { @@ -1213,6 +1398,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the volume target, which includes the iSCSI name that\n initiators can use to connect to the target.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CreateNFSFileShare": { @@ -1232,7 +1420,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a Network File System (NFS) file share on an existing S3 File Gateway. In\n Storage Gateway, a file share is a file system mount point backed by Amazon S3\n cloud storage. Storage Gateway exposes file shares using an NFS interface. This operation\n is only supported for S3 File Gateways.

\n\n \n

S3 File gateway requires Security Token Service (Amazon Web Services STS) to be\n activated to enable you to create a file share. Make sure Amazon Web Services STS is\n activated in the Amazon Web Services Region you are creating your S3 File Gateway in. If\n Amazon Web Services STS is not activated in the Amazon Web Services Region, activate\n it. For information about how to activate Amazon Web Services STS, see Activating and\n deactivating Amazon Web Services STS in an Amazon Web Services Region in the\n Identity and Access Management User Guide.

\n\n

S3 File Gateways do not support creating hard or symbolic links on a file\n share.

\n
" + "smithy.api#documentation": "

Creates a Network File System (NFS) file share on an existing S3 File Gateway. In\n Storage Gateway, a file share is a file system mount point backed by Amazon S3\n cloud storage. Storage Gateway exposes file shares using an NFS interface. This operation\n is only supported for S3 File Gateways.

\n \n

S3 File gateway requires Security Token Service (Amazon Web Services STS) to be\n activated to enable you to create a file share. Make sure Amazon Web Services STS is\n activated in the Amazon Web Services Region you are creating your S3 File Gateway in. If\n Amazon Web Services STS is not activated in the Amazon Web Services Region, activate\n it. For information about how to activate Amazon Web Services STS, see Activating and\n deactivating Amazon Web Services STS in an Amazon Web Services Region in the\n Identity and Access Management User Guide.

\n

S3 File Gateways do not support creating hard or symbolic links on a file\n share.

\n
" } }, "com.amazonaws.storagegateway#CreateNFSFileShareInput": { @@ -1261,7 +1449,7 @@ "KMSEncrypted": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -1280,14 +1468,14 @@ "LocationARN": { "target": "com.amazonaws.storagegateway#LocationARN", "traits": { - "smithy.api#documentation": "

A custom ARN for the backend storage used for storing data for file shares. It includes\n a resource ARN with an optional prefix concatenation. The prefix must end with a forward\n slash (/).

\n \n

You can specify LocationARN as a bucket ARN, access point ARN or access point alias,\n as shown in the following examples.

\n\n

Bucket ARN:

\n

\n arn:aws:s3:::my-bucket/prefix/\n

\n\n

Access point ARN:

\n

\n arn:aws:s3:region:account-id:accesspoint/access-point-name/prefix/\n

\n\n

If you specify an access point, the bucket policy must be configured to delegate\n access control to the access point. For information, see Delegating access control to access points in the Amazon S3 User Guide.

\n\n

Access point alias:

\n

\n test-ap-ab123cdef4gehijklmn5opqrstuvuse1a-s3alias\n

\n
", + "smithy.api#documentation": "

A custom ARN for the backend storage used for storing data for file shares. It includes\n a resource ARN with an optional prefix concatenation. The prefix must end with a forward\n slash (/).

\n \n

You can specify LocationARN as a bucket ARN, access point ARN or access point alias,\n as shown in the following examples.

\n

Bucket ARN:

\n

\n arn:aws:s3:::my-bucket/prefix/\n

\n

Access point ARN:

\n

\n arn:aws:s3:region:account-id:accesspoint/access-point-name/prefix/\n

\n

If you specify an access point, the bucket policy must be configured to delegate\n access control to the access point. For information, see Delegating access control to access points in the Amazon S3 User Guide.

\n

Access point alias:

\n

\n test-ap-ab123cdef4gehijklmn5opqrstuvuse1a-s3alias\n

\n
", "smithy.api#required": {} } }, "DefaultStorageClass": { "target": "com.amazonaws.storagegateway#StorageClass", "traits": { - "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" + "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" } }, "ObjectACL": { @@ -1305,37 +1493,37 @@ "Squash": { "target": "com.amazonaws.storagegateway#Squash", "traits": { - "smithy.api#documentation": "

A value that maps a user to anonymous user.

\n\n

Valid values are the following:

\n\n
    \n
  • \n

    \n RootSquash: Only root is mapped to anonymous user.

    \n
  • \n
  • \n

    \n NoSquash: No one is mapped to anonymous user.

    \n
  • \n
  • \n

    \n AllSquash: Everyone is mapped to anonymous user.

    \n
  • \n
" + "smithy.api#documentation": "

A value that maps a user to anonymous user.

\n

Valid values are the following:

\n
    \n
  • \n

    \n RootSquash: Only root is mapped to anonymous user.

    \n
  • \n
  • \n

    \n NoSquash: No one is mapped to anonymous user.

    \n
  • \n
  • \n

    \n AllSquash: Everyone is mapped to anonymous user.

    \n
  • \n
" } }, "ReadOnly": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n

Valid Values: true | false\n

" } }, "GuessMIMETypeEnabled": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n

Valid Values: true | false\n

" } }, "RequesterPays": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n

Valid Values: true | false\n

" } }, "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to the NFS file share. Each tag is a\n key-value pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to the NFS file share. Each tag is a\n key-value pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" } }, "FileShareName": { "target": "com.amazonaws.storagegateway#FileShareName", "traits": { - "smithy.api#documentation": "

The name of the file share. Optional.

\n\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" + "smithy.api#documentation": "

The name of the file share. Optional.

\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" } }, "CacheAttributes": { @@ -1347,7 +1535,7 @@ "NotificationPolicy": { "target": "com.amazonaws.storagegateway#NotificationPolicy", "traits": { - "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n\n

The following example sets NotificationPolicy off.

\n\n

\n {}\n

" + "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n

The following example sets NotificationPolicy off.

\n

\n {}\n

" } }, "VPCEndpointDNSName": { @@ -1370,7 +1558,8 @@ } }, "traits": { - "smithy.api#documentation": "

CreateNFSFileShareInput

" + "smithy.api#documentation": "

CreateNFSFileShareInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CreateNFSFileShareOutput": { @@ -1384,7 +1573,8 @@ } }, "traits": { - "smithy.api#documentation": "

CreateNFSFileShareOutput

" + "smithy.api#documentation": "

CreateNFSFileShareOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CreateSMBFileShare": { @@ -1404,7 +1594,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a Server Message Block (SMB) file share on an existing S3 File Gateway. In\n Storage Gateway, a file share is a file system mount point backed by Amazon S3\n cloud storage. Storage Gateway exposes file shares using an SMB interface. This operation\n is only supported for S3 File Gateways.

\n\n \n

S3 File Gateways require Security Token Service (Amazon Web Services STS) to be\n activated to enable you to create a file share. Make sure that Amazon Web Services STS\n is activated in the Amazon Web Services Region you are creating your S3 File Gateway in.\n If Amazon Web Services STS is not activated in this Amazon Web Services Region, activate\n it. For information about how to activate Amazon Web Services STS, see Activating and\n deactivating Amazon Web Services STS in an Amazon Web Services Region in the\n Identity and Access Management User Guide.

\n\n

File gateways don't support creating hard or symbolic links on a file\n share.

\n
" + "smithy.api#documentation": "

Creates a Server Message Block (SMB) file share on an existing S3 File Gateway. In\n Storage Gateway, a file share is a file system mount point backed by Amazon S3\n cloud storage. Storage Gateway exposes file shares using an SMB interface. This operation\n is only supported for S3 File Gateways.

\n \n

S3 File Gateways require Security Token Service (Amazon Web Services STS) to be\n activated to enable you to create a file share. Make sure that Amazon Web Services STS\n is activated in the Amazon Web Services Region you are creating your S3 File Gateway in.\n If Amazon Web Services STS is not activated in this Amazon Web Services Region, activate\n it. For information about how to activate Amazon Web Services STS, see Activating and\n deactivating Amazon Web Services STS in an Amazon Web Services Region in the\n Identity and Access Management User Guide.

\n

File gateways don't support creating hard or symbolic links on a file\n share.

\n
" } }, "com.amazonaws.storagegateway#CreateSMBFileShareInput": { @@ -1427,7 +1617,7 @@ "KMSEncrypted": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -1446,14 +1636,14 @@ "LocationARN": { "target": "com.amazonaws.storagegateway#LocationARN", "traits": { - "smithy.api#documentation": "

A custom ARN for the backend storage used for storing data for file shares. It includes\n a resource ARN with an optional prefix concatenation. The prefix must end with a forward\n slash (/).

\n \n

You can specify LocationARN as a bucket ARN, access point ARN or access point alias,\n as shown in the following examples.

\n\n

Bucket ARN:

\n

\n arn:aws:s3:::my-bucket/prefix/\n

\n\n

Access point ARN:

\n

\n arn:aws:s3:region:account-id:accesspoint/access-point-name/prefix/\n

\n\n

If you specify an access point, the bucket policy must be configured to delegate\n access control to the access point. For information, see Delegating access control to access points in the Amazon S3 User Guide.

\n\n

Access point alias:

\n

\n test-ap-ab123cdef4gehijklmn5opqrstuvuse1a-s3alias\n

\n
", + "smithy.api#documentation": "

A custom ARN for the backend storage used for storing data for file shares. It includes\n a resource ARN with an optional prefix concatenation. The prefix must end with a forward\n slash (/).

\n \n

You can specify LocationARN as a bucket ARN, access point ARN or access point alias,\n as shown in the following examples.

\n

Bucket ARN:

\n

\n arn:aws:s3:::my-bucket/prefix/\n

\n

Access point ARN:

\n

\n arn:aws:s3:region:account-id:accesspoint/access-point-name/prefix/\n

\n

If you specify an access point, the bucket policy must be configured to delegate\n access control to the access point. For information, see Delegating access control to access points in the Amazon S3 User Guide.

\n

Access point alias:

\n

\n test-ap-ab123cdef4gehijklmn5opqrstuvuse1a-s3alias\n

\n
", "smithy.api#required": {} } }, "DefaultStorageClass": { "target": "com.amazonaws.storagegateway#StorageClass", "traits": { - "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" + "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" } }, "ObjectACL": { @@ -1465,25 +1655,25 @@ "ReadOnly": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n

Valid Values: true | false\n

" } }, "GuessMIMETypeEnabled": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n

Valid Values: true | false\n

" } }, "RequesterPays": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n

Valid Values: true | false\n

" } }, "SMBACLEnabled": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set this value to true to enable access control list (ACL) on the SMB file\n share. Set it to false to map file and directory permissions to the POSIX\n permissions.

\n\n \n\n

For more information, see Using Microsoft Windows ACLs to\n control access to an SMB file share in the Storage Gateway User\n Guide.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set this value to true to enable access control list (ACL) on the SMB file\n share. Set it to false to map file and directory permissions to the POSIX\n permissions.

\n

For more information, see Using Microsoft Windows ACLs to\n control access to an SMB file share in the Storage Gateway User\n Guide.

\n

Valid Values: true | false\n

" } }, "AccessBasedEnumeration": { @@ -1495,7 +1685,7 @@ "AdminUserList": { "target": "com.amazonaws.storagegateway#UserList", "traits": { - "smithy.api#documentation": "

A list of users or groups in the Active Directory that will be granted administrator\n privileges on the file share. These users can do all file operations as the super-user.\n Acceptable formats include: DOMAIN\\User1, user1,\n @group1, and @DOMAIN\\group1.

\n\n \n

Use this option very carefully, because any user in this list can do anything they\n like on the file share, regardless of file permissions.

\n
" + "smithy.api#documentation": "

A list of users or groups in the Active Directory that will be granted administrator\n privileges on the file share. These users can do all file operations as the super-user.\n Acceptable formats include: DOMAIN\\User1, user1,\n @group1, and @DOMAIN\\group1.

\n \n

Use this option very carefully, because any user in this list can do anything they\n like on the file share, regardless of file permissions.

\n
" } }, "ValidUserList": { @@ -1519,7 +1709,7 @@ "Authentication": { "target": "com.amazonaws.storagegateway#Authentication", "traits": { - "smithy.api#documentation": "

The authentication method that users use to access the file share. The default is\n ActiveDirectory.

\n\n

Valid Values: ActiveDirectory | GuestAccess\n

" + "smithy.api#documentation": "

The authentication method that users use to access the file share. The default is\n ActiveDirectory.

\n

Valid Values: ActiveDirectory | GuestAccess\n

" } }, "CaseSensitivity": { @@ -1531,13 +1721,13 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to the NFS file share. Each tag is a\n key-value pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to the NFS file share. Each tag is a\n key-value pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" } }, "FileShareName": { "target": "com.amazonaws.storagegateway#FileShareName", "traits": { - "smithy.api#documentation": "

The name of the file share. Optional.

\n\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" + "smithy.api#documentation": "

The name of the file share. Optional.

\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" } }, "CacheAttributes": { @@ -1549,7 +1739,7 @@ "NotificationPolicy": { "target": "com.amazonaws.storagegateway#NotificationPolicy", "traits": { - "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n\n

The following example sets NotificationPolicy off.

\n\n

\n {}\n

" + "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n

The following example sets NotificationPolicy off.

\n

\n {}\n

" } }, "VPCEndpointDNSName": { @@ -1572,7 +1762,8 @@ } }, "traits": { - "smithy.api#documentation": "

CreateSMBFileShareInput

" + "smithy.api#documentation": "

CreateSMBFileShareInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CreateSMBFileShareOutput": { @@ -1586,7 +1777,8 @@ } }, "traits": { - "smithy.api#documentation": "

CreateSMBFileShareOutput

" + "smithy.api#documentation": "

CreateSMBFileShareOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CreateSnapshot": { @@ -1609,7 +1801,21 @@ } ], "traits": { - "smithy.api#documentation": "

Initiates a snapshot of a volume.

\n\n

Storage Gateway provides the ability to back up point-in-time snapshots of your\n data to Amazon Simple Storage (Amazon S3) for durable off-site recovery, and also\n import the data to an Amazon Elastic Block Store (EBS) volume in Amazon Elastic Compute\n Cloud (EC2). You can take snapshots of your gateway volume on a scheduled or ad hoc basis.\n This API enables you to take an ad hoc snapshot. For more information, see Editing a\n snapshot schedule.

\n\n

In the CreateSnapshot request, you identify the volume by providing its\n Amazon Resource Name (ARN). You must also provide description for the snapshot. When\n Storage Gateway takes the snapshot of specified volume, the snapshot and\n description appears in the Storage Gateway console. In response, Storage Gateway\n returns you a snapshot ID. You can use this snapshot ID to check the snapshot progress or\n later use it when you want to create a volume from a snapshot. This operation is only\n supported in stored and cached volume gateway type.

\n\n \n

To list or delete a snapshot, you must use the Amazon EC2 API. For more information,\n see DescribeSnapshots\n or DeleteSnapshot in the Amazon Elastic Compute Cloud API\n Reference.

\n
\n\n \n

Volume and snapshot IDs are changing to a longer length ID format. For more\n information, see the important note on the Welcome page.

\n
" + "smithy.api#documentation": "

Initiates a snapshot of a volume.

\n

Storage Gateway provides the ability to back up point-in-time snapshots of your\n data to Amazon Simple Storage (Amazon S3) for durable off-site recovery, and also\n import the data to an Amazon Elastic Block Store (EBS) volume in Amazon Elastic Compute\n Cloud (EC2). You can take snapshots of your gateway volume on a scheduled or ad hoc basis.\n This API enables you to take an ad hoc snapshot. For more information, see Editing a\n snapshot schedule.

\n

In the CreateSnapshot request, you identify the volume by providing its\n Amazon Resource Name (ARN). You must also provide description for the snapshot. When\n Storage Gateway takes the snapshot of specified volume, the snapshot and\n description appears in the Storage Gateway console. In response, Storage Gateway\n returns you a snapshot ID. You can use this snapshot ID to check the snapshot progress or\n later use it when you want to create a volume from a snapshot. This operation is only\n supported in stored and cached volume gateway type.

\n \n

To list or delete a snapshot, you must use the Amazon EC2 API. For more information,\n see DescribeSnapshots\n or DeleteSnapshot in the Amazon Elastic Compute Cloud API\n Reference.

\n
\n \n

Volume and snapshot IDs are changing to a longer length ID format. For more\n information, see the important note on the Welcome page.

\n
", + "smithy.api#examples": [ + { + "title": "To create a snapshot of a gateway volume", + "documentation": "Initiates an ad-hoc snapshot of a gateway volume.", + "input": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "SnapshotDescription": "My root volume snapshot as of 10/03/2017" + }, + "output": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "SnapshotId": "snap-78e22663" + } + } + ] } }, "com.amazonaws.storagegateway#CreateSnapshotFromVolumeRecoveryPoint": { @@ -1632,7 +1838,22 @@ } ], "traits": { - "smithy.api#documentation": "

Initiates a snapshot of a gateway from a volume recovery point. This operation is only\n supported in the cached volume gateway type.

\n\n

A volume recovery point is a point in time at which all data of the volume is consistent\n and from which you can create a snapshot. To get a list of volume recovery point for cached\n volume gateway, use ListVolumeRecoveryPoints.

\n\n

In the CreateSnapshotFromVolumeRecoveryPoint request, you identify the\n volume by providing its Amazon Resource Name (ARN). You must also provide a description for\n the snapshot. When the gateway takes a snapshot of the specified volume, the snapshot and\n its description appear in the Storage Gateway console.\n In response, the gateway returns\n you a snapshot ID. You can use this snapshot ID to check the snapshot progress or later use\n it when you want to create a volume from a snapshot.

\n\n \n

To list or delete a snapshot, you must use the Amazon EC2 API. For more information,\n see DescribeSnapshots\n or DeleteSnapshot in the Amazon Elastic Compute Cloud API\n Reference.

\n
" + "smithy.api#documentation": "

Initiates a snapshot of a gateway from a volume recovery point. This operation is only\n supported in the cached volume gateway type.

\n

A volume recovery point is a point in time at which all data of the volume is consistent\n and from which you can create a snapshot. To get a list of volume recovery point for cached\n volume gateway, use ListVolumeRecoveryPoints.

\n

In the CreateSnapshotFromVolumeRecoveryPoint request, you identify the\n volume by providing its Amazon Resource Name (ARN). You must also provide a description for\n the snapshot. When the gateway takes a snapshot of the specified volume, the snapshot and\n its description appear in the Storage Gateway console.\n In response, the gateway returns\n you a snapshot ID. You can use this snapshot ID to check the snapshot progress or later use\n it when you want to create a volume from a snapshot.

\n \n

To list or delete a snapshot, you must use the Amazon EC2 API. For more information,\n see DescribeSnapshots\n or DeleteSnapshot in the Amazon Elastic Compute Cloud API\n Reference.

\n
", + "smithy.api#examples": [ + { + "title": "To create a snapshot of a gateway volume", + "documentation": "Initiates a snapshot of a gateway from a volume recovery point.", + "input": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "SnapshotDescription": "My root volume snapshot as of 2017-06-30T10:10:10.000Z" + }, + "output": { + "SnapshotId": "snap-78e22663", + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "VolumeRecoveryPointTime": "2017-06-30T10:10:10.000Z" + } + } + ] } }, "com.amazonaws.storagegateway#CreateSnapshotFromVolumeRecoveryPointInput": { @@ -1655,9 +1876,12 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value\n pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value\n pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CreateSnapshotFromVolumeRecoveryPointOutput": { @@ -1681,6 +1905,9 @@ "smithy.api#documentation": "

The time the volume was created from the recovery point.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CreateSnapshotInput": { @@ -1703,12 +1930,13 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value\n pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value\n pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" } } }, "traits": { - "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CreateSnapshotOutput": { @@ -1728,7 +1956,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

" + "smithy.api#documentation": "

A JSON object containing the following fields:

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CreateStorediSCSIVolume": { @@ -1748,7 +1977,26 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a volume on a specified gateway. This operation is only supported in the stored\n volume gateway type.

\n\n

The size of the volume to create is inferred from the disk size. You can choose to\n preserve existing data on the disk, create volume from an existing snapshot, or create an\n empty volume. If you choose to create an empty gateway volume, then any existing data on\n the disk is erased.

\n\n

In the request, you must specify the gateway and the disk information on which you are\n creating the volume. In response, the gateway creates the volume and returns volume\n information such as the volume Amazon Resource Name (ARN), its size, and the iSCSI target\n ARN that initiators can use to connect to the volume target.

" + "smithy.api#documentation": "

Creates a volume on a specified gateway. This operation is only supported in the stored\n volume gateway type.

\n

The size of the volume to create is inferred from the disk size. You can choose to\n preserve existing data on the disk, create volume from an existing snapshot, or create an\n empty volume. If you choose to create an empty gateway volume, then any existing data on\n the disk is erased.

\n

In the request, you must specify the gateway and the disk information on which you are\n creating the volume. In response, the gateway creates the volume and returns volume\n information such as the volume Amazon Resource Name (ARN), its size, and the iSCSI target\n ARN that initiators can use to connect to the volume target.

", + "smithy.api#examples": [ + { + "title": "To create a stored iSCSI volume", + "documentation": "Creates a stored volume on a specified stored gateway.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "DiskId": "pci-0000:03:00.0-scsi-0:0:0:0", + "SnapshotId": "snap-f47b7b94", + "PreserveExistingData": true, + "TargetName": "my-volume", + "NetworkInterfaceId": "10.1.1.1" + }, + "output": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "VolumeSizeInBytes": 1099511627776, + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume" + } + } + ] } }, "com.amazonaws.storagegateway#CreateStorediSCSIVolumeInput": { @@ -1777,28 +2025,28 @@ "target": "com.amazonaws.storagegateway#Boolean2", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Set to true if you want to preserve the data on the local disk. Otherwise,\n set to false to create an empty volume.

\n\n

Valid Values: true | false\n

", + "smithy.api#documentation": "

Set to true if you want to preserve the data on the local disk. Otherwise,\n set to false to create an empty volume.

\n

Valid Values: true | false\n

", "smithy.api#required": {} } }, "TargetName": { "target": "com.amazonaws.storagegateway#TargetName", "traits": { - "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

", + "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

", "smithy.api#required": {} } }, "NetworkInterfaceId": { "target": "com.amazonaws.storagegateway#NetworkInterfaceId", "traits": { - "smithy.api#documentation": "

The network interface of the gateway on which to expose the iSCSI target. Only IPv4\n addresses are accepted. Use DescribeGatewayInformation to get a list of\n the network interfaces available on a gateway.

\n\n

Valid Values: A valid IP address.

", + "smithy.api#documentation": "

The network interface of the gateway on which to expose the iSCSI target. Only IPv4\n addresses are accepted. Use DescribeGatewayInformation to get a list of\n the network interfaces available on a gateway.

\n

Valid Values: A valid IP address.

", "smithy.api#required": {} } }, "KMSEncrypted": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -1810,12 +2058,13 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a stored volume. Each tag is a key-value\n pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a stored volume. Each tag is a key-value\n pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" } } }, "traits": { - "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CreateStorediSCSIVolumeOutput": { @@ -1842,7 +2091,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

" + "smithy.api#documentation": "

A JSON object containing the following fields:

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CreateTapePool": { @@ -1897,9 +2147,12 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to tape pool. Each tag is a key-value\n pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to tape pool. Each tag is a key-value\n pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CreateTapePoolOutput": { @@ -1911,6 +2164,9 @@ "smithy.api#documentation": "

The unique Amazon Resource Name (ARN) that represents the custom tape pool. Use the\n ListTapePools operation to return a list of tape pools for your\n account and Amazon Web Services Region.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CreateTapeWithBarcode": { @@ -1930,7 +2186,21 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a virtual tape by using your own barcode. You write data to the virtual tape and\n then archive the tape. A barcode is unique and cannot be reused if it has already been used\n on a tape. This applies to barcodes used on deleted tapes. This operation is only supported\n in the tape gateway type.

\n\n \n

Cache storage must be allocated to the gateway before you can create a virtual tape.\n Use the AddCache operation to add cache storage to a gateway.

\n
" + "smithy.api#documentation": "

Creates a virtual tape by using your own barcode. You write data to the virtual tape and\n then archive the tape. A barcode is unique and cannot be reused if it has already been used\n on a tape. This applies to barcodes used on deleted tapes. This operation is only supported\n in the tape gateway type.

\n \n

Cache storage must be allocated to the gateway before you can create a virtual tape.\n Use the AddCache operation to add cache storage to a gateway.

\n
", + "smithy.api#examples": [ + { + "title": "To create a virtual tape using a barcode", + "documentation": "Creates a virtual tape by using your own barcode.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", + "TapeSizeInBytes": 107374182400, + "TapeBarcode": "TEST12345" + }, + "output": { + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST12345" + } + } + ] } }, "com.amazonaws.storagegateway#CreateTapeWithBarcodeInput": { @@ -1946,21 +2216,21 @@ "TapeSizeInBytes": { "target": "com.amazonaws.storagegateway#TapeSize", "traits": { - "smithy.api#documentation": "

The size, in bytes, of the virtual tape that you want to create.

\n\n \n

The size must be aligned by gigabyte (1024*1024*1024 bytes).

\n
", + "smithy.api#documentation": "

The size, in bytes, of the virtual tape that you want to create.

\n \n

The size must be aligned by gigabyte (1024*1024*1024 bytes).

\n
", "smithy.api#required": {} } }, "TapeBarcode": { "target": "com.amazonaws.storagegateway#TapeBarcode", "traits": { - "smithy.api#documentation": "

The barcode that you want to assign to the tape.

\n\n \n

Barcodes cannot be reused. This includes barcodes used for tapes that have been\n deleted.

\n
", + "smithy.api#documentation": "

The barcode that you want to assign to the tape.

\n \n

Barcodes cannot be reused. This includes barcodes used for tapes that have been\n deleted.

\n
", "smithy.api#required": {} } }, "KMSEncrypted": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -1985,12 +2255,13 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a virtual tape that has a barcode. Each\n tag is a key-value pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a virtual tape that has a barcode. Each\n tag is a key-value pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" } } }, "traits": { - "smithy.api#documentation": "

CreateTapeWithBarcodeInput

" + "smithy.api#documentation": "

CreateTapeWithBarcodeInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CreateTapeWithBarcodeOutput": { @@ -2004,7 +2275,8 @@ } }, "traits": { - "smithy.api#documentation": "

CreateTapeOutput

" + "smithy.api#documentation": "

CreateTapeOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CreateTapes": { @@ -2024,7 +2296,27 @@ } ], "traits": { - "smithy.api#documentation": "

Creates one or more virtual tapes. You write data to the virtual tapes and then archive\n the tapes. This operation is only supported in the tape gateway type.

\n\n \n

Cache storage must be allocated to the gateway before you can create virtual tapes.\n Use the AddCache operation to add cache storage to a gateway.

\n
" + "smithy.api#documentation": "

Creates one or more virtual tapes. You write data to the virtual tapes and then archive\n the tapes. This operation is only supported in the tape gateway type.

\n \n

Cache storage must be allocated to the gateway before you can create virtual tapes.\n Use the AddCache operation to add cache storage to a gateway.

\n
", + "smithy.api#examples": [ + { + "title": "To create a virtual tape", + "documentation": "Creates one or more virtual tapes.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", + "TapeSizeInBytes": 107374182400, + "ClientToken": "77777", + "NumTapesToCreate": 3, + "TapeBarcodePrefix": "TEST" + }, + "output": { + "TapeARNs": [ + "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST38A29D", + "arn:aws:storagegateway:us-east-1:204469490176:tape/TEST3AA29F", + "arn:aws:storagegateway:us-east-1:204469490176:tape/TEST3BA29E" + ] + } + } + ] } }, "com.amazonaws.storagegateway#CreateTapesInput": { @@ -2040,14 +2332,14 @@ "TapeSizeInBytes": { "target": "com.amazonaws.storagegateway#TapeSize", "traits": { - "smithy.api#documentation": "

The size, in bytes, of the virtual tapes that you want to create.

\n\n \n

The size must be aligned by gigabyte (1024*1024*1024 bytes).

\n
", + "smithy.api#documentation": "

The size, in bytes, of the virtual tapes that you want to create.

\n \n

The size must be aligned by gigabyte (1024*1024*1024 bytes).

\n
", "smithy.api#required": {} } }, "ClientToken": { "target": "com.amazonaws.storagegateway#ClientToken", "traits": { - "smithy.api#documentation": "

A unique identifier that you use to retry a request. If you retry a request, use the\n same ClientToken you specified in the initial request.

\n\n \n

Using the same ClientToken prevents creating the tape multiple\n times.

\n
", + "smithy.api#documentation": "

A unique identifier that you use to retry a request. If you retry a request, use the\n same ClientToken you specified in the initial request.

\n \n

Using the same ClientToken prevents creating the tape multiple\n times.

\n
", "smithy.api#required": {} } }, @@ -2061,14 +2353,14 @@ "TapeBarcodePrefix": { "target": "com.amazonaws.storagegateway#TapeBarcodePrefix", "traits": { - "smithy.api#documentation": "

A prefix that you append to the barcode of the virtual tape you are creating. This\n prefix makes the barcode unique.

\n\n \n

The prefix must be 1-4 characters in length and must be one of the uppercase letters\n from A to Z.

\n
", + "smithy.api#documentation": "

A prefix that you append to the barcode of the virtual tape you are creating. This\n prefix makes the barcode unique.

\n \n

The prefix must be 1-4 characters in length and must be one of the uppercase letters\n from A to Z.

\n
", "smithy.api#required": {} } }, "KMSEncrypted": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -2093,12 +2385,13 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a virtual tape. Each tag is a key-value\n pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a virtual tape. Each tag is a key-value\n pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" } } }, "traits": { - "smithy.api#documentation": "

CreateTapesInput

" + "smithy.api#documentation": "

CreateTapesInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#CreateTapesOutput": { @@ -2112,7 +2405,8 @@ } }, "traits": { - "smithy.api#documentation": "

CreateTapeOutput

" + "smithy.api#documentation": "

CreateTapeOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#CreatedDate": { @@ -2187,6 +2481,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteAutomaticTapeCreationPolicyOutput": { @@ -2195,6 +2492,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeleteBandwidthRateLimit": { @@ -2214,7 +2514,20 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the bandwidth rate limits of a gateway. You can delete either the upload and\n download bandwidth rate limit, or you can delete both. If you delete only one of the\n limits, the other limit remains unchanged. To specify which gateway to work with, use the\n Amazon Resource Name (ARN) of the gateway in your request. This operation is supported only\n for the stored volume, cached volume, and tape gateway types.

" + "smithy.api#documentation": "

Deletes the bandwidth rate limits of a gateway. You can delete either the upload and\n download bandwidth rate limit, or you can delete both. If you delete only one of the\n limits, the other limit remains unchanged. To specify which gateway to work with, use the\n Amazon Resource Name (ARN) of the gateway in your request. This operation is supported only\n for the stored volume, cached volume, and tape gateway types.

", + "smithy.api#examples": [ + { + "title": "To delete bandwidth rate limits of gateway", + "documentation": "Deletes the bandwidth rate limits of a gateway; either the upload or download limit, or both.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "BandwidthType": "All" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#DeleteBandwidthRateLimitInput": { @@ -2229,13 +2542,14 @@ "BandwidthType": { "target": "com.amazonaws.storagegateway#BandwidthType", "traits": { - "smithy.api#documentation": "

One of the BandwidthType values that indicates the gateway bandwidth rate limit to\n delete.

\n\n

Valid Values: UPLOAD | DOWNLOAD | ALL\n

", + "smithy.api#documentation": "

One of the BandwidthType values that indicates the gateway bandwidth rate limit to\n delete.

\n

Valid Values: UPLOAD | DOWNLOAD | ALL\n

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteBandwidthRateLimitOutput": { @@ -2246,7 +2560,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway whose bandwidth\n rate information was deleted.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway whose bandwidth\n rate information was deleted.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeleteChapCredentials": { @@ -2266,7 +2581,21 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified\n iSCSI target and initiator pair. This operation is supported in volume and tape gateway\n types.

" + "smithy.api#documentation": "

Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified\n iSCSI target and initiator pair. This operation is supported in volume and tape gateway\n types.

", + "smithy.api#examples": [ + { + "title": "To delete CHAP credentials", + "documentation": "Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator pair.", + "input": { + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume", + "InitiatorName": "iqn.1991-05.com.microsoft:computername.domain.example.com" + }, + "output": { + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume", + "InitiatorName": "iqn.1991-05.com.microsoft:computername.domain.example.com" + } + } + ] } }, "com.amazonaws.storagegateway#DeleteChapCredentialsInput": { @@ -2288,7 +2617,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteChapCredentialsOutput": { @@ -2308,7 +2638,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

" + "smithy.api#documentation": "

A JSON object containing the following fields:

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeleteFileShare": { @@ -2345,12 +2676,13 @@ "target": "com.amazonaws.storagegateway#Boolean2", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

If this value is set to true, the operation deletes a file share\n immediately and aborts all data uploads to Amazon Web Services. Otherwise, the file share is\n not deleted until all data is uploaded to Amazon Web Services. This process aborts the data\n upload process, and the file share enters the FORCE_DELETING status.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

If this value is set to true, the operation deletes a file share\n immediately and aborts all data uploads to Amazon Web Services. Otherwise, the file share is\n not deleted until all data is uploaded to Amazon Web Services. This process aborts the data\n upload process, and the file share enters the FORCE_DELETING status.

\n

Valid Values: true | false\n

" } } }, "traits": { - "smithy.api#documentation": "

DeleteFileShareInput

" + "smithy.api#documentation": "

DeleteFileShareInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteFileShareOutput": { @@ -2364,7 +2696,8 @@ } }, "traits": { - "smithy.api#documentation": "

DeleteFileShareOutput

" + "smithy.api#documentation": "

DeleteFileShareOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeleteGateway": { @@ -2384,7 +2717,19 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a gateway. To specify which gateway to delete, use the Amazon Resource Name\n (ARN) of the gateway in your request. The operation deletes the gateway; however, it does\n not delete the gateway virtual machine (VM) from your host computer.

\n\n

After you delete a gateway, you cannot reactivate it. Completed snapshots of the gateway\n volumes are not deleted upon deleting the gateway, however, pending snapshots will not\n complete. After you delete a gateway, your next step is to remove it from your\n environment.

\n\n \n

You no longer pay software charges after the gateway is deleted; however, your\n existing Amazon EBS snapshots persist and you will continue to be billed for these\n snapshots. You can choose to remove all remaining Amazon EBS snapshots by canceling your\n Amazon EC2 subscription.  If you prefer not to cancel your Amazon EC2 subscription, you\n can delete your snapshots using the Amazon EC2 console. For more information, see the\n Storage Gateway detail\n page.

\n
" + "smithy.api#documentation": "

Deletes a gateway. To specify which gateway to delete, use the Amazon Resource Name\n (ARN) of the gateway in your request. The operation deletes the gateway; however, it does\n not delete the gateway virtual machine (VM) from your host computer.

\n

After you delete a gateway, you cannot reactivate it. Completed snapshots of the gateway\n volumes are not deleted upon deleting the gateway, however, pending snapshots will not\n complete. After you delete a gateway, your next step is to remove it from your\n environment.

\n \n

You no longer pay software charges after the gateway is deleted; however, your\n existing Amazon EBS snapshots persist and you will continue to be billed for these\n snapshots. You can choose to remove all remaining Amazon EBS snapshots by canceling your\n Amazon EC2 subscription.  If you prefer not to cancel your Amazon EC2 subscription, you\n can delete your snapshots using the Amazon EC2 console. For more information, see the\n Storage Gateway detail\n page.

\n
", + "smithy.api#examples": [ + { + "title": "To delete a gatgeway", + "documentation": "This operation deletes the gateway, but not the gateway's VM from the host computer.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#DeleteGatewayInput": { @@ -2398,7 +2743,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the ID of the gateway to delete.

" + "smithy.api#documentation": "

A JSON object containing the ID of the gateway to delete.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteGatewayOutput": { @@ -2409,7 +2755,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the ID of the deleted gateway.

" + "smithy.api#documentation": "

A JSON object containing the ID of the deleted gateway.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeleteSnapshotSchedule": { @@ -2429,7 +2776,19 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes a snapshot of a volume.

\n\n

You can take snapshots of your gateway volumes on a scheduled or ad hoc basis. This API\n action enables you to delete a snapshot schedule for a volume. For more information, see\n Backing up your\n volumes. In the DeleteSnapshotSchedule request, you identify the\n volume by providing its Amazon Resource Name (ARN). This operation is only supported for\n cached volume gateway types.

\n\n \n\n

To list or delete a snapshot, you must use the Amazon EC2 API. For more information,\n go to DescribeSnapshots\n in the Amazon Elastic Compute Cloud API Reference.

\n
" + "smithy.api#documentation": "

Deletes a snapshot of a volume.

\n

You can take snapshots of your gateway volumes on a scheduled or ad hoc basis. This API\n action enables you to delete a snapshot schedule for a volume. For more information, see\n Backing up your\n volumes. In the DeleteSnapshotSchedule request, you identify the\n volume by providing its Amazon Resource Name (ARN). This operation is only supported for\n cached volume gateway types.

\n \n

To list or delete a snapshot, you must use the Amazon EC2 API. For more information,\n go to DescribeSnapshots\n in the Amazon Elastic Compute Cloud API Reference.

\n
", + "smithy.api#examples": [ + { + "title": "To delete a snapshot of a volume", + "documentation": "This action enables you to delete a snapshot schedule for a volume.", + "input": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" + }, + "output": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" + } + } + ] } }, "com.amazonaws.storagegateway#DeleteSnapshotScheduleInput": { @@ -2442,6 +2801,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteSnapshotScheduleOutput": { @@ -2453,6 +2815,9 @@ "smithy.api#documentation": "

The volume which snapshot schedule was deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeleteTape": { @@ -2472,7 +2837,20 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified virtual tape. This operation is only supported in the tape gateway\n type.

" + "smithy.api#documentation": "

Deletes the specified virtual tape. This operation is only supported in the tape gateway\n type.

", + "smithy.api#examples": [ + { + "title": "To delete a virtual tape", + "documentation": "This example deletes the specified virtual tape.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:204469490176:gateway/sgw-12A3456B", + "TapeARN": "arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0" + }, + "output": { + "TapeARN": "arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0" + } + } + ] } }, "com.amazonaws.storagegateway#DeleteTapeArchive": { @@ -2492,7 +2870,19 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified virtual tape from the virtual tape shelf (VTS). This operation is\n only supported in the tape gateway type.

" + "smithy.api#documentation": "

Deletes the specified virtual tape from the virtual tape shelf (VTS). This operation is\n only supported in the tape gateway type.

", + "smithy.api#examples": [ + { + "title": "To delete a virtual tape from the shelf (VTS)", + "documentation": "Deletes the specified virtual tape from the virtual tape shelf (VTS).", + "input": { + "TapeARN": "arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0" + }, + "output": { + "TapeARN": "arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0" + } + } + ] } }, "com.amazonaws.storagegateway#DeleteTapeArchiveInput": { @@ -2514,7 +2904,8 @@ } }, "traits": { - "smithy.api#documentation": "

DeleteTapeArchiveInput

" + "smithy.api#documentation": "

DeleteTapeArchiveInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteTapeArchiveOutput": { @@ -2528,7 +2919,8 @@ } }, "traits": { - "smithy.api#documentation": "

DeleteTapeArchiveOutput

" + "smithy.api#documentation": "

DeleteTapeArchiveOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeleteTapeInput": { @@ -2557,7 +2949,8 @@ } }, "traits": { - "smithy.api#documentation": "

DeleteTapeInput

" + "smithy.api#documentation": "

DeleteTapeInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteTapeOutput": { @@ -2571,7 +2964,8 @@ } }, "traits": { - "smithy.api#documentation": "

DeleteTapeOutput

" + "smithy.api#documentation": "

DeleteTapeOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeleteTapePool": { @@ -2604,6 +2998,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteTapePoolOutput": { @@ -2615,6 +3012,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the custom tape pool being deleted.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeleteVolume": { @@ -2634,7 +3034,19 @@ } ], "traits": { - "smithy.api#documentation": "

Deletes the specified storage volume that you previously created using the CreateCachediSCSIVolume or CreateStorediSCSIVolume API.\n This operation is only supported in the cached volume and stored volume types. For stored\n volume gateways, the local disk that was configured as the storage volume is not deleted.\n You can reuse the local disk to create another storage volume.

\n\n

Before you delete a volume, make sure there are no iSCSI connections to the volume you\n are deleting. You should also make sure there is no snapshot in progress. You can use the\n Amazon Elastic Compute Cloud (Amazon EC2) API to query snapshots on the volume you are\n deleting and check the snapshot status. For more information, go to DescribeSnapshots in the Amazon Elastic Compute Cloud API\n Reference.

\n\n

In the request, you must provide the Amazon Resource Name (ARN) of the storage volume\n you want to delete.

" + "smithy.api#documentation": "

Deletes the specified storage volume that you previously created using the CreateCachediSCSIVolume or CreateStorediSCSIVolume API.\n This operation is only supported in the cached volume and stored volume types. For stored\n volume gateways, the local disk that was configured as the storage volume is not deleted.\n You can reuse the local disk to create another storage volume.

\n

Before you delete a volume, make sure there are no iSCSI connections to the volume you\n are deleting. You should also make sure there is no snapshot in progress. You can use the\n Amazon Elastic Compute Cloud (Amazon EC2) API to query snapshots on the volume you are\n deleting and check the snapshot status. For more information, go to DescribeSnapshots in the Amazon Elastic Compute Cloud API\n Reference.

\n

In the request, you must provide the Amazon Resource Name (ARN) of the storage volume\n you want to delete.

", + "smithy.api#examples": [ + { + "title": "To delete a gateway volume", + "documentation": "Deletes the specified gateway volume that you previously created using the CreateCachediSCSIVolume or CreateStorediSCSIVolume API.", + "input": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" + }, + "output": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" + } + } + ] } }, "com.amazonaws.storagegateway#DeleteVolumeInput": { @@ -2649,7 +3061,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the DeleteVolumeInput$VolumeARN to\n delete.

" + "smithy.api#documentation": "

A JSON object containing the DeleteVolumeInput$VolumeARN to\n delete.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DeleteVolumeOutput": { @@ -2663,7 +3076,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the storage volume that was\n deleted.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the storage volume that was\n deleted.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeprecationDate": { @@ -2704,6 +3118,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeAvailabilityMonitorTestOutput": { @@ -2724,6 +3141,9 @@ "smithy.api#documentation": "

The time the high availability monitoring test was started. If a test hasn't been\n performed, the value of this field is null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeBandwidthRateLimit": { @@ -2743,7 +3163,21 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the bandwidth rate limits of a gateway. By default, these limits are not set,\n which means no bandwidth rate limiting is in effect. This operation is supported only for\n the stored volume, cached volume, and tape gateway types. To describe bandwidth rate limits\n for S3 file gateways, use DescribeBandwidthRateLimitSchedule.

\n\n

This operation returns a value for a bandwidth rate limit only if the limit is set. If\n no limits are set for the gateway, then this operation returns only the gateway ARN in the\n response body. To specify which gateway to describe, use the Amazon Resource Name (ARN) of\n the gateway in your request.

" + "smithy.api#documentation": "

Returns the bandwidth rate limits of a gateway. By default, these limits are not set,\n which means no bandwidth rate limiting is in effect. This operation is supported only for\n the stored volume, cached volume, and tape gateway types. To describe bandwidth rate limits\n for S3 file gateways, use DescribeBandwidthRateLimitSchedule.

\n

This operation returns a value for a bandwidth rate limit only if the limit is set. If\n no limits are set for the gateway, then this operation returns only the gateway ARN in the\n response body. To specify which gateway to describe, use the Amazon Resource Name (ARN) of\n the gateway in your request.

", + "smithy.api#examples": [ + { + "title": "To describe the bandwidth rate limits of a gateway", + "documentation": "Returns a value for a bandwidth rate limit if set. If not set, then only the gateway ARN is returned.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "AverageUploadRateLimitInBitsPerSec": 102400, + "AverageDownloadRateLimitInBitsPerSec": 204800 + } + } + ] } }, "com.amazonaws.storagegateway#DescribeBandwidthRateLimitInput": { @@ -2757,7 +3191,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeBandwidthRateLimitOutput": { @@ -2780,7 +3215,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

" + "smithy.api#documentation": "

A JSON object containing the following fields:

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeBandwidthRateLimitSchedule": { @@ -2800,7 +3236,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns information about the bandwidth rate limit schedule of a gateway. By default,\n gateways do not have bandwidth rate limit schedules, which means no bandwidth rate limiting\n is in effect. This operation is supported only for volume, tape and S3 file gateways. FSx\n file gateways do not support bandwidth rate limits.

\n\n

This operation returns information about a gateway's bandwidth rate limit schedule. A\n bandwidth rate limit schedule consists of one or more bandwidth rate limit intervals. A\n bandwidth rate limit interval defines a period of time on one or more days of the week,\n during which bandwidth rate limits are specified for uploading, downloading, or both.

\n\n

A bandwidth rate limit interval consists of one or more days of the week, a start hour\n and minute, an ending hour and minute, and bandwidth rate limits for uploading and\n downloading

\n\n

If no bandwidth rate limit schedule intervals are set for the gateway, this operation\n returns an empty response. To specify which gateway to describe, use the Amazon Resource\n Name (ARN) of the gateway in your request.

" + "smithy.api#documentation": "

Returns information about the bandwidth rate limit schedule of a gateway. By default,\n gateways do not have bandwidth rate limit schedules, which means no bandwidth rate limiting\n is in effect. This operation is supported only for volume, tape and S3 file gateways. FSx\n file gateways do not support bandwidth rate limits.

\n

This operation returns information about a gateway's bandwidth rate limit schedule. A\n bandwidth rate limit schedule consists of one or more bandwidth rate limit intervals. A\n bandwidth rate limit interval defines a period of time on one or more days of the week,\n during which bandwidth rate limits are specified for uploading, downloading, or both.

\n

A bandwidth rate limit interval consists of one or more days of the week, a start hour\n and minute, an ending hour and minute, and bandwidth rate limits for uploading and\n downloading

\n

If no bandwidth rate limit schedule intervals are set for the gateway, this operation\n returns an empty response. To specify which gateway to describe, use the Amazon Resource\n Name (ARN) of the gateway in your request.

" } }, "com.amazonaws.storagegateway#DescribeBandwidthRateLimitScheduleInput": { @@ -2812,6 +3248,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeBandwidthRateLimitScheduleOutput": { @@ -2826,6 +3265,9 @@ "smithy.api#documentation": "

An array that contains the bandwidth rate limit intervals for a tape or volume gateway.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeCache": { @@ -2845,7 +3287,28 @@ } ], "traits": { - "smithy.api#documentation": "

Returns information about the cache of a gateway. This operation is only supported in\n the cached volume, tape, and file gateway types.

\n\n

The response includes disk IDs that are configured as cache, and it includes the amount\n of cache allocated and used.

" + "smithy.api#documentation": "

Returns information about the cache of a gateway. This operation is only supported in\n the cached volume, tape, and file gateway types.

\n

The response includes disk IDs that are configured as cache, and it includes the amount\n of cache allocated and used.

", + "smithy.api#examples": [ + { + "title": "To describe cache information", + "documentation": "Returns information about the cache of a gateway.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "DiskIds": [ + "pci-0000:03:00.0-scsi-0:0:0:0", + "pci-0000:04:00.0-scsi-0:1:0:0" + ], + "CacheAllocatedInBytes": 2199023255552, + "CacheUsedPercentage": 0.07, + "CacheDirtyPercentage": 0.07, + "CacheHitPercentage": 99.68, + "CacheMissPercentage": 0.32 + } + } + ] } }, "com.amazonaws.storagegateway#DescribeCacheInput": { @@ -2857,6 +3320,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeCacheOutput": { @@ -2906,6 +3372,9 @@ "smithy.api#documentation": "

Percent of application read operations from the file shares that are not served from\n cache. The sample is taken at the end of the reporting period.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeCachediSCSIVolumes": { @@ -2925,7 +3394,36 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a description of the gateway volumes specified in the request. This operation is\n only supported in the cached volume gateway types.

\n\n

The list of gateway volumes in the request must be from one gateway. In the response,\n Storage Gateway returns volume information sorted by volume Amazon Resource Name\n (ARN).

" + "smithy.api#documentation": "

Returns a description of the gateway volumes specified in the request. This operation is\n only supported in the cached volume gateway types.

\n

The list of gateway volumes in the request must be from one gateway. In the response,\n Storage Gateway returns volume information sorted by volume Amazon Resource Name\n (ARN).

", + "smithy.api#examples": [ + { + "title": "To describe gateway cached iSCSI volumes", + "documentation": "Returns a description of the gateway cached iSCSI volumes specified in the request.", + "input": { + "VolumeARNs": [ + "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" + ] + }, + "output": { + "CachediSCSIVolumes": [ + { + "VolumeiSCSIAttributes": { + "ChapEnabled": true, + "LunNumber": 1, + "NetworkInterfaceId": "10.243.43.207", + "NetworkInterfacePort": 3260, + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume" + }, + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "VolumeId": "vol-1122AABB", + "VolumeSizeInBytes": 1099511627776, + "VolumeStatus": "AVAILABLE", + "VolumeType": "CACHED iSCSI" + } + ] + } + } + ] } }, "com.amazonaws.storagegateway#DescribeCachediSCSIVolumesInput": { @@ -2938,6 +3436,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeCachediSCSIVolumesOutput": { @@ -2951,7 +3452,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

" + "smithy.api#documentation": "

A JSON object containing the following fields:

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeChapCredentials": { @@ -2971,7 +3473,26 @@ } ], "traits": { - "smithy.api#documentation": "

Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials\n information for a specified iSCSI target, one for each target-initiator pair. This\n operation is supported in the volume and tape gateway types.

" + "smithy.api#documentation": "

Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials\n information for a specified iSCSI target, one for each target-initiator pair. This\n operation is supported in the volume and tape gateway types.

", + "smithy.api#examples": [ + { + "title": "To describe CHAP credetnitals for an iSCSI", + "documentation": "Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials information for a specified iSCSI target, one for each target-initiator pair.", + "input": { + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume" + }, + "output": { + "ChapCredentials": [ + { + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume", + "SecretToAuthenticateInitiator": "111111111111", + "InitiatorName": "iqn.1991-05.com.microsoft:computername.domain.example.com", + "SecretToAuthenticateTarget": "222222222222" + } + ] + } + } + ] } }, "com.amazonaws.storagegateway#DescribeChapCredentialsInput": { @@ -2986,7 +3507,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the iSCSI volume\n target.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the iSCSI volume\n target.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeChapCredentialsOutput": { @@ -2995,12 +3517,13 @@ "ChapCredentials": { "target": "com.amazonaws.storagegateway#ChapCredentials", "traits": { - "smithy.api#documentation": "

An array of ChapInfo objects that represent CHAP credentials. Each\n object in the array contains CHAP credential information for one target-initiator pair. If\n no CHAP credentials are set, an empty array is returned. CHAP credential information is\n provided in a JSON object with the following fields:

\n\n
    \n
  • \n

    \n InitiatorName: The iSCSI initiator that connects to\n the target.

    \n\n
  • \n
  • \n

    \n SecretToAuthenticateInitiator: The secret key that\n the initiator (for example, the Windows client) must provide to participate in mutual\n CHAP with the target.

    \n\n
  • \n
  • \n

    \n SecretToAuthenticateTarget: The secret key that the\n target must provide to participate in mutual CHAP with the initiator (e.g. Windows\n client).

    \n\n
  • \n
  • \n

    \n TargetARN: The Amazon Resource Name (ARN) of the\n storage volume.

    \n\n
  • \n
" + "smithy.api#documentation": "

An array of ChapInfo objects that represent CHAP credentials. Each\n object in the array contains CHAP credential information for one target-initiator pair. If\n no CHAP credentials are set, an empty array is returned. CHAP credential information is\n provided in a JSON object with the following fields:

\n
    \n
  • \n

    \n InitiatorName: The iSCSI initiator that connects to\n the target.

    \n
  • \n
  • \n

    \n SecretToAuthenticateInitiator: The secret key that\n the initiator (for example, the Windows client) must provide to participate in mutual\n CHAP with the target.

    \n
  • \n
  • \n

    \n SecretToAuthenticateTarget: The secret key that the\n target must provide to participate in mutual CHAP with the initiator (e.g. Windows\n client).

    \n
  • \n
  • \n

    \n TargetARN: The Amazon Resource Name (ARN) of the\n storage volume.

    \n
  • \n
" } } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

" + "smithy.api#documentation": "

A JSON object containing the following fields:

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeFileSystemAssociations": { @@ -3033,7 +3556,10 @@ "smithy.api#required": {} } } - } + }, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.storagegateway#DescribeFileSystemAssociationsOutput": { "type": "structure", @@ -3044,6 +3570,9 @@ "smithy.api#documentation": "

An array containing the FileSystemAssociationInfo data type of each file\n system association to be described.\n

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeGatewayInformation": { @@ -3063,7 +3592,31 @@ } ], "traits": { - "smithy.api#documentation": "

Returns metadata about a gateway such as its name, network interfaces, configured time\n zone, and the state (whether the gateway is running or not). To specify which gateway to\n describe, use the Amazon Resource Name (ARN) of the gateway in your request.

" + "smithy.api#documentation": "

Returns metadata about a gateway such as its name, network interfaces, configured time\n zone, and the state (whether the gateway is running or not). To specify which gateway to\n describe, use the Amazon Resource Name (ARN) of the gateway in your request.

", + "smithy.api#examples": [ + { + "title": "To describe metadata about the gateway", + "documentation": "Returns metadata about a gateway such as its name, network interfaces, configured time zone, and the state (whether the gateway is running or not).", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "GatewayId": "sgw-AABB1122", + "GatewayName": "My_Gateway", + "GatewayTimezone": "GMT-8:00", + "GatewayState": "STATE_RUNNING", + "GatewayNetworkInterfaces": [ + { + "Ipv4Address": "10.35.69.216" + } + ], + "GatewayType": "STORED", + "NextUpdateAvailabilityDate": "2017-01-02T16:00:00", + "LastSoftwareUpdate": "2016-01-02T16:00:00" + } + } + ] } }, "com.amazonaws.storagegateway#DescribeGatewayInformationInput": { @@ -3077,7 +3630,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the ID of the gateway.

" + "smithy.api#documentation": "

A JSON object containing the ID of the gateway.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeGatewayInformationOutput": { @@ -3173,7 +3727,7 @@ "EndpointType": { "target": "com.amazonaws.storagegateway#EndpointType", "traits": { - "smithy.api#documentation": "

The type of endpoint for your gateway.

\n\n

Valid Values: STANDARD | FIPS\n

" + "smithy.api#documentation": "

The type of endpoint for your gateway.

\n

Valid Values: STANDARD | FIPS\n

" } }, "SoftwareUpdatesEndDate": { @@ -3208,7 +3762,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

" + "smithy.api#documentation": "

A JSON object containing the following fields:

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeMaintenanceStartTime": { @@ -3228,7 +3783,23 @@ } ], "traits": { - "smithy.api#documentation": "

Returns your gateway's weekly maintenance start time including the day and time of\n the week. Note that values are in terms of the gateway's time zone.

" + "smithy.api#documentation": "

Returns your gateway's weekly maintenance start time including the day and time of\n the week. Note that values are in terms of the gateway's time zone.

", + "smithy.api#examples": [ + { + "title": "To describe gateway's maintenance start time", + "documentation": "Returns your gateway's weekly maintenance start time including the day and time of the week.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "HourOfDay": 15, + "MinuteOfHour": 35, + "DayOfWeek": 2, + "Timezone": "GMT+7:00" + } + } + ] } }, "com.amazonaws.storagegateway#DescribeMaintenanceStartTimeInput": { @@ -3242,7 +3813,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeMaintenanceStartTimeOutput": { @@ -3283,7 +3855,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing the following fields:

\n ", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeNFSFileShares": { @@ -3318,7 +3891,8 @@ } }, "traits": { - "smithy.api#documentation": "

DescribeNFSFileSharesInput

" + "smithy.api#documentation": "

DescribeNFSFileSharesInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeNFSFileSharesOutput": { @@ -3332,7 +3906,8 @@ } }, "traits": { - "smithy.api#documentation": "

DescribeNFSFileSharesOutput

" + "smithy.api#documentation": "

DescribeNFSFileSharesOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeSMBFileShares": { @@ -3367,7 +3942,8 @@ } }, "traits": { - "smithy.api#documentation": "

DescribeSMBFileSharesInput

" + "smithy.api#documentation": "

DescribeSMBFileSharesInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeSMBFileSharesOutput": { @@ -3381,7 +3957,8 @@ } }, "traits": { - "smithy.api#documentation": "

DescribeSMBFileSharesOutput

" + "smithy.api#documentation": "

DescribeSMBFileSharesOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeSMBSettings": { @@ -3413,6 +3990,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeSMBSettingsOutput": { @@ -3430,19 +4010,19 @@ "ActiveDirectoryStatus": { "target": "com.amazonaws.storagegateway#ActiveDirectoryStatus", "traits": { - "smithy.api#documentation": "

Indicates the status of a gateway that is a member of the Active Directory\n domain.

\n\n
    \n
  • \n

    \n ACCESS_DENIED: Indicates that the JoinDomain operation\n failed due to an authentication error.

    \n
  • \n
  • \n

    \n DETACHED: Indicates that gateway is not joined to a domain.

    \n
  • \n
  • \n

    \n JOINED: Indicates that the gateway has successfully joined a\n domain.

    \n
  • \n
  • \n

    \n JOINING: Indicates that a JoinDomain operation is in\n progress.

    \n
  • \n
  • \n

    \n NETWORK_ERROR: Indicates that JoinDomain operation\n failed due to a network or connectivity error.

    \n
  • \n
  • \n

    \n TIMEOUT: Indicates that the JoinDomain operation failed\n because the operation didn't complete within the allotted time.

    \n
  • \n
  • \n

    \n UNKNOWN_ERROR: Indicates that the JoinDomain operation\n failed due to another type of error.

    \n
  • \n
" + "smithy.api#documentation": "

Indicates the status of a gateway that is a member of the Active Directory\n domain.

\n
    \n
  • \n

    \n ACCESS_DENIED: Indicates that the JoinDomain operation\n failed due to an authentication error.

    \n
  • \n
  • \n

    \n DETACHED: Indicates that gateway is not joined to a domain.

    \n
  • \n
  • \n

    \n JOINED: Indicates that the gateway has successfully joined a\n domain.

    \n
  • \n
  • \n

    \n JOINING: Indicates that a JoinDomain operation is in\n progress.

    \n
  • \n
  • \n

    \n NETWORK_ERROR: Indicates that JoinDomain operation\n failed due to a network or connectivity error.

    \n
  • \n
  • \n

    \n TIMEOUT: Indicates that the JoinDomain operation failed\n because the operation didn't complete within the allotted time.

    \n
  • \n
  • \n

    \n UNKNOWN_ERROR: Indicates that the JoinDomain operation\n failed due to another type of error.

    \n
  • \n
" } }, "SMBGuestPasswordSet": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

This value is true if a password for the guest user smbguest\n is set, otherwise false. Only supported for S3 File Gateways.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

This value is true if a password for the guest user smbguest\n is set, otherwise false. Only supported for S3 File Gateways.

\n

Valid Values: true | false\n

" } }, "SMBSecurityStrategy": { "target": "com.amazonaws.storagegateway#SMBSecurityStrategy", "traits": { - "smithy.api#documentation": "

The type of security strategy that was specified for file gateway.

\n\n
    \n
  • \n

    \n ClientSpecified: If you use this option, requests are established\n based on what is negotiated by the client. This option is recommended when you want\n to maximize compatibility across different clients in your environment. Only\n supported for S3 File Gateways.

    \n
  • \n
  • \n

    \n MandatorySigning: If you use this option, file gateway only allows\n connections from SMBv2 or SMBv3 clients that have signing enabled. This option works\n with SMB clients on Microsoft Windows Vista, Windows Server 2008 or newer.

    \n
  • \n
  • \n

    \n MandatoryEncryption: If you use this option, file gateway only allows\n connections from SMBv3 clients that have encryption enabled. This option is highly\n recommended for environments that handle sensitive data. This option works with SMB\n clients on Microsoft Windows 8, Windows Server 2012 or newer.

    \n
  • \n
" + "smithy.api#documentation": "

The type of security strategy that was specified for file gateway.

\n
    \n
  • \n

    \n ClientSpecified: If you use this option, requests are established\n based on what is negotiated by the client. This option is recommended when you want\n to maximize compatibility across different clients in your environment. Only\n supported for S3 File Gateways.

    \n
  • \n
  • \n

    \n MandatorySigning: If you use this option, file gateway only allows\n connections from SMBv2 or SMBv3 clients that have signing enabled. This option works\n with SMB clients on Microsoft Windows Vista, Windows Server 2008 or newer.

    \n
  • \n
  • \n

    \n MandatoryEncryption: If you use this option, file gateway only allows\n connections from SMBv3 clients that have encryption enabled. This option is highly\n recommended for environments that handle sensitive data. This option works with SMB\n clients on Microsoft Windows 8, Windows Server 2012 or newer.

    \n
  • \n
" } }, "FileSharesVisible": { @@ -3457,6 +4037,9 @@ "smithy.api#documentation": "

A list of Active Directory users and groups that have special permissions for SMB file\n shares on the gateway.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeSnapshotSchedule": { @@ -3476,7 +4059,23 @@ } ], "traits": { - "smithy.api#documentation": "

Describes the snapshot schedule for the specified gateway volume. The snapshot schedule\n information includes intervals at which snapshots are automatically initiated on the\n volume. This operation is only supported in the cached volume and stored volume\n types.

" + "smithy.api#documentation": "

Describes the snapshot schedule for the specified gateway volume. The snapshot schedule\n information includes intervals at which snapshots are automatically initiated on the\n volume. This operation is only supported in the cached volume and stored volume\n types.

", + "smithy.api#examples": [ + { + "title": "To describe snapshot schedule for gateway volume", + "documentation": "Describes the snapshot schedule for the specified gateway volume including intervals at which snapshots are automatically initiated.", + "input": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" + }, + "output": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "StartAt": 6, + "RecurrenceInHours": 24, + "Description": "sgw-AABB1122:vol-AABB1122:Schedule", + "Timezone": "GMT+7:00" + } + } + ] } }, "com.amazonaws.storagegateway#DescribeSnapshotScheduleInput": { @@ -3491,7 +4090,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the DescribeSnapshotScheduleInput$VolumeARN\n of the volume.

" + "smithy.api#documentation": "

A JSON object containing the DescribeSnapshotScheduleInput$VolumeARN\n of the volume.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeSnapshotScheduleOutput": { @@ -3533,6 +4133,9 @@ "smithy.api#documentation": "

A list of up to 50 tags assigned to the snapshot schedule, sorted alphabetically by key\n name. Each tag is a key-value pair. For a gateway with more than 10 tags assigned, you can\n view all tags using the ListTagsForResource API operation.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeStorediSCSIVolumes": { @@ -3552,7 +4155,37 @@ } ], "traits": { - "smithy.api#documentation": "

Returns the description of the gateway volumes specified in the request. The list of\n gateway volumes in the request must be from one gateway. In the response, Storage Gateway returns volume information sorted by volume ARNs. This operation is only\n supported in stored volume gateway type.

" + "smithy.api#documentation": "

Returns the description of the gateway volumes specified in the request. The list of\n gateway volumes in the request must be from one gateway. In the response, Storage Gateway returns volume information sorted by volume ARNs. This operation is only\n supported in stored volume gateway type.

", + "smithy.api#examples": [ + { + "title": "To describe the volumes of a gateway", + "documentation": "Returns the description of the gateway volumes specified in the request belonging to the same gateway.", + "input": { + "VolumeARNs": [ + "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" + ] + }, + "output": { + "StorediSCSIVolumes": [ + { + "VolumeiSCSIAttributes": { + "ChapEnabled": true, + "NetworkInterfaceId": "10.243.43.207", + "NetworkInterfacePort": 3260, + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume" + }, + "PreservedExistingData": false, + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "VolumeDiskId": "pci-0000:03:00.0-scsi-0:0:0:0", + "VolumeId": "vol-1122AABB", + "VolumeProgress": 23.7, + "VolumeSizeInBytes": 1099511627776, + "VolumeStatus": "BOOTSTRAPPING" + } + ] + } + } + ] } }, "com.amazonaws.storagegateway#DescribeStorediSCSIVolumesInput": { @@ -3567,7 +4200,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing a list of DescribeStorediSCSIVolumesInput$VolumeARNs.

" + "smithy.api#documentation": "

A JSON object containing a list of DescribeStorediSCSIVolumesInput$VolumeARNs.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeStorediSCSIVolumesOutput": { @@ -3576,9 +4210,12 @@ "StorediSCSIVolumes": { "target": "com.amazonaws.storagegateway#StorediSCSIVolumes", "traits": { - "smithy.api#documentation": "

Describes a single unit of output from DescribeStorediSCSIVolumes. The\n following fields are returned:

\n\n
    \n
  • \n

    \n ChapEnabled: Indicates whether mutual CHAP is enabled for the iSCSI\n target.

    \n
  • \n
  • \n

    \n LunNumber: The logical disk number.

    \n
  • \n
  • \n

    \n NetworkInterfaceId: The network interface ID of the stored volume that\n initiator use to map the stored volume as an iSCSI target.

    \n
  • \n
  • \n

    \n NetworkInterfacePort: The port used to communicate with iSCSI\n targets.

    \n
  • \n
  • \n

    \n PreservedExistingData: Indicates when the stored volume was created,\n existing data on the underlying local disk was preserved.

    \n
  • \n
  • \n

    \n SourceSnapshotId: If the stored volume was created from a snapshot, this\n field contains the snapshot ID used, e.g. snap-1122aabb. Otherwise, this\n field is not included.

    \n
  • \n
  • \n

    \n StorediSCSIVolumes: An array of StorediSCSIVolume objects where each\n object contains metadata about one stored volume.

    \n
  • \n
  • \n

    \n TargetARN: The Amazon Resource Name (ARN) of the volume target.

    \n
  • \n
  • \n

    \n VolumeARN: The Amazon Resource Name (ARN) of the stored volume.

    \n
  • \n
  • \n

    \n VolumeDiskId: The disk ID of the local disk that was specified in the\n CreateStorediSCSIVolume operation.

    \n
  • \n
  • \n

    \n VolumeId: The unique identifier of the storage volume, e.g.\n vol-1122AABB.

    \n
  • \n
  • \n

    \n VolumeiSCSIAttributes: An VolumeiSCSIAttributes object\n that represents a collection of iSCSI attributes for one stored volume.

    \n
  • \n
  • \n

    \n VolumeProgress: Represents the percentage complete if the volume is\n restoring or bootstrapping that represents the percent of data transferred. This\n field does not appear in the response if the stored volume is not restoring or\n bootstrapping.

    \n
  • \n
  • \n

    \n VolumeSizeInBytes: The size of the volume in bytes.

    \n
  • \n
  • \n

    \n VolumeStatus: One of the VolumeStatus values that indicates\n the state of the volume.

    \n
  • \n
  • \n

    \n VolumeType: One of the enumeration values describing the type of the\n volume. Currently, only STORED volumes are supported.

    \n
  • \n
" + "smithy.api#documentation": "

Describes a single unit of output from DescribeStorediSCSIVolumes. The\n following fields are returned:

\n
    \n
  • \n

    \n ChapEnabled: Indicates whether mutual CHAP is enabled for the iSCSI\n target.

    \n
  • \n
  • \n

    \n LunNumber: The logical disk number.

    \n
  • \n
  • \n

    \n NetworkInterfaceId: The network interface ID of the stored volume that\n initiator use to map the stored volume as an iSCSI target.

    \n
  • \n
  • \n

    \n NetworkInterfacePort: The port used to communicate with iSCSI\n targets.

    \n
  • \n
  • \n

    \n PreservedExistingData: Indicates when the stored volume was created,\n existing data on the underlying local disk was preserved.

    \n
  • \n
  • \n

    \n SourceSnapshotId: If the stored volume was created from a snapshot, this\n field contains the snapshot ID used, e.g. snap-1122aabb. Otherwise, this\n field is not included.

    \n
  • \n
  • \n

    \n StorediSCSIVolumes: An array of StorediSCSIVolume objects where each\n object contains metadata about one stored volume.

    \n
  • \n
  • \n

    \n TargetARN: The Amazon Resource Name (ARN) of the volume target.

    \n
  • \n
  • \n

    \n VolumeARN: The Amazon Resource Name (ARN) of the stored volume.

    \n
  • \n
  • \n

    \n VolumeDiskId: The disk ID of the local disk that was specified in the\n CreateStorediSCSIVolume operation.

    \n
  • \n
  • \n

    \n VolumeId: The unique identifier of the storage volume, e.g.\n vol-1122AABB.

    \n
  • \n
  • \n

    \n VolumeiSCSIAttributes: An VolumeiSCSIAttributes object\n that represents a collection of iSCSI attributes for one stored volume.

    \n
  • \n
  • \n

    \n VolumeProgress: Represents the percentage complete if the volume is\n restoring or bootstrapping that represents the percent of data transferred. This\n field does not appear in the response if the stored volume is not restoring or\n bootstrapping.

    \n
  • \n
  • \n

    \n VolumeSizeInBytes: The size of the volume in bytes.

    \n
  • \n
  • \n

    \n VolumeStatus: One of the VolumeStatus values that indicates\n the state of the volume.

    \n
  • \n
  • \n

    \n VolumeType: One of the enumeration values describing the type of the\n volume. Currently, only STORED volumes are supported.

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeTapeArchives": { @@ -3598,7 +4235,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a description of specified virtual tapes in the virtual tape shelf (VTS). This\n operation is only supported in the tape gateway type.

\n\n

If a specific TapeARN is not specified, Storage Gateway returns a\n description of all virtual tapes found in the VTS associated with your account.

", + "smithy.api#documentation": "

Returns a description of specified virtual tapes in the virtual tape shelf (VTS). This\n operation is only supported in the tape gateway type.

\n

If a specific TapeARN is not specified, Storage Gateway returns a\n description of all virtual tapes found in the VTS associated with your account.

", "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -3630,7 +4267,8 @@ } }, "traits": { - "smithy.api#documentation": "

DescribeTapeArchivesInput

" + "smithy.api#documentation": "

DescribeTapeArchivesInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeTapeArchivesOutput": { @@ -3650,7 +4288,8 @@ } }, "traits": { - "smithy.api#documentation": "

DescribeTapeArchivesOutput

" + "smithy.api#documentation": "

DescribeTapeArchivesOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeTapeRecoveryPoints": { @@ -3670,7 +4309,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of virtual tape recovery points that are available for the specified tape\n gateway.

\n\n

A recovery point is a point-in-time view of a virtual tape at which all the data on the\n virtual tape is consistent. If your gateway crashes, virtual tapes that have recovery\n points can be recovered to a new gateway. This operation is only supported in the tape\n gateway type.

", + "smithy.api#documentation": "

Returns a list of virtual tape recovery points that are available for the specified tape\n gateway.

\n

A recovery point is a point-in-time view of a virtual tape at which all the data on the\n virtual tape is consistent. If your gateway crashes, virtual tapes that have recovery\n points can be recovered to a new gateway. This operation is only supported in the tape\n gateway type.

", "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -3702,7 +4341,8 @@ } }, "traits": { - "smithy.api#documentation": "

DescribeTapeRecoveryPointsInput

" + "smithy.api#documentation": "

DescribeTapeRecoveryPointsInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeTapeRecoveryPointsOutput": { @@ -3720,12 +4360,13 @@ "Marker": { "target": "com.amazonaws.storagegateway#Marker", "traits": { - "smithy.api#documentation": "

An opaque string that indicates the position at which the virtual tape recovery points\n that were listed for description ended.

\n\n

Use this marker in your next request to list the next set of virtual tape recovery\n points in the list. If there are no more recovery points to describe, this field does not\n appear in the response.

" + "smithy.api#documentation": "

An opaque string that indicates the position at which the virtual tape recovery points\n that were listed for description ended.

\n

Use this marker in your next request to list the next set of virtual tape recovery\n points in the list. If there are no more recovery points to describe, this field does not\n appear in the response.

" } } }, "traits": { - "smithy.api#documentation": "

DescribeTapeRecoveryPointsOutput

" + "smithy.api#documentation": "

DescribeTapeRecoveryPointsOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeTapes": { @@ -3746,6 +4387,38 @@ ], "traits": { "smithy.api#documentation": "

Returns a description of the specified Amazon Resource Name (ARN) of virtual tapes. If a\n TapeARN is not specified, returns a description of all virtual tapes\n associated with the specified gateway. This operation is only supported in the tape gateway\n type.

", + "smithy.api#examples": [ + { + "title": "To describe virtual tape(s) associated with gateway", + "documentation": "Returns a description of the specified Amazon Resource Name (ARN) of virtual tapes. If a TapeARN is not specified, returns a description of all virtual tapes.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", + "TapeARNs": [ + "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST04A2A1", + "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST05A2A0" + ], + "Marker": "1", + "Limit": 2 + }, + "output": { + "Tapes": [ + { + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST04A2A1", + "TapeBarcode": "TEST04A2A1", + "TapeSizeInBytes": 107374182400, + "TapeStatus": "AVAILABLE" + }, + { + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST05A2A0", + "TapeBarcode": "TEST05A2A0", + "TapeSizeInBytes": 107374182400, + "TapeStatus": "AVAILABLE" + } + ], + "Marker": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -3772,18 +4445,19 @@ "Marker": { "target": "com.amazonaws.storagegateway#Marker", "traits": { - "smithy.api#documentation": "

A marker value, obtained in a previous call to DescribeTapes. This marker\n indicates which page of results to retrieve.

\n\n

If not specified, the first page of results is retrieved.

" + "smithy.api#documentation": "

A marker value, obtained in a previous call to DescribeTapes. This marker\n indicates which page of results to retrieve.

\n

If not specified, the first page of results is retrieved.

" } }, "Limit": { "target": "com.amazonaws.storagegateway#PositiveIntObject", "traits": { - "smithy.api#documentation": "

Specifies that the number of virtual tapes described be limited to the specified\n number.

\n\n \n

Amazon Web Services may impose its own limit, if this field is not set.

\n
" + "smithy.api#documentation": "

Specifies that the number of virtual tapes described be limited to the specified\n number.

\n \n

Amazon Web Services may impose its own limit, if this field is not set.

\n
" } } }, "traits": { - "smithy.api#documentation": "

DescribeTapesInput

" + "smithy.api#documentation": "

DescribeTapesInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeTapesOutput": { @@ -3798,12 +4472,13 @@ "Marker": { "target": "com.amazonaws.storagegateway#Marker", "traits": { - "smithy.api#documentation": "

An opaque string that can be used as part of a subsequent DescribeTapes\n call to retrieve the next page of results.

\n\n

If a response does not contain a marker, then there are no more results to be\n retrieved.

" + "smithy.api#documentation": "

An opaque string that can be used as part of a subsequent DescribeTapes\n call to retrieve the next page of results.

\n

If a response does not contain a marker, then there are no more results to be\n retrieved.

" } } }, "traits": { - "smithy.api#documentation": "

DescribeTapesOutput

" + "smithy.api#documentation": "

DescribeTapesOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeUploadBuffer": { @@ -3823,7 +4498,25 @@ } ], "traits": { - "smithy.api#documentation": "

Returns information about the upload buffer of a gateway. This operation is supported\n for the stored volume, cached volume, and tape gateway types.

\n\n

The response includes disk IDs that are configured as upload buffer space, and it\n includes the amount of upload buffer space allocated and used.

" + "smithy.api#documentation": "

Returns information about the upload buffer of a gateway. This operation is supported\n for the stored volume, cached volume, and tape gateway types.

\n

The response includes disk IDs that are configured as upload buffer space, and it\n includes the amount of upload buffer space allocated and used.

", + "smithy.api#examples": [ + { + "title": "To describe upload buffer of gateway", + "documentation": "Returns information about the upload buffer of a gateway including disk IDs and the amount of upload buffer space allocated/used.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "DiskIds": [ + "pci-0000:03:00.0-scsi-0:0:0:0", + "pci-0000:04:00.0-scsi-0:1:0:0" + ], + "UploadBufferUsedInBytes": 161061273600, + "UploadBufferAllocatedInBytes": 0 + } + } + ] } }, "com.amazonaws.storagegateway#DescribeUploadBufferInput": { @@ -3835,6 +4528,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeUploadBufferOutput": { @@ -3863,6 +4559,9 @@ "smithy.api#documentation": "

The total number of bytes allocated in the gateway's as upload buffer.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeVTLDevices": { @@ -3882,7 +4581,61 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a description of virtual tape library (VTL) devices for the specified tape\n gateway. In the response, Storage Gateway returns VTL device information.

\n\n

This operation is only supported in the tape gateway type.

", + "smithy.api#documentation": "

Returns a description of virtual tape library (VTL) devices for the specified tape\n gateway. In the response, Storage Gateway returns VTL device information.

\n

This operation is only supported in the tape gateway type.

", + "smithy.api#examples": [ + { + "title": "To describe virtual tape library (VTL) devices of a single gateway", + "documentation": "Returns a description of virtual tape library (VTL) devices for the specified gateway.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", + "VTLDeviceARNs": [], + "Marker": "1", + "Limit": 123 + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", + "VTLDevices": [ + { + "DeviceiSCSIAttributes": { + "ChapEnabled": false, + "NetworkInterfaceId": "10.243.43.207", + "NetworkInterfacePort": 3260, + "TargetARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:sgw-1fad4876-mediachanger" + }, + "VTLDeviceARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/device/AMZN_SGW-1FAD4876_MEDIACHANGER_00001", + "VTLDeviceProductIdentifier": "L700", + "VTLDeviceType": "Medium Changer", + "VTLDeviceVendor": "STK" + }, + { + "DeviceiSCSIAttributes": { + "ChapEnabled": false, + "NetworkInterfaceId": "10.243.43.209", + "NetworkInterfacePort": 3260, + "TargetARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:sgw-1fad4876-tapedrive-01" + }, + "VTLDeviceARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/device/AMZN_SGW-1FAD4876_TAPEDRIVE_00001", + "VTLDeviceProductIdentifier": "ULT3580-TD5", + "VTLDeviceType": "Tape Drive", + "VTLDeviceVendor": "IBM" + }, + { + "DeviceiSCSIAttributes": { + "ChapEnabled": false, + "NetworkInterfaceId": "10.243.43.209", + "NetworkInterfacePort": 3260, + "TargetARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:sgw-1fad4876-tapedrive-02" + }, + "VTLDeviceARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/device/AMZN_SGW-1FAD4876_TAPEDRIVE_00002", + "VTLDeviceProductIdentifier": "ULT3580-TD5", + "VTLDeviceType": "Tape Drive", + "VTLDeviceVendor": "IBM" + } + ], + "Marker": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -3903,7 +4656,7 @@ "VTLDeviceARNs": { "target": "com.amazonaws.storagegateway#VTLDeviceARNs", "traits": { - "smithy.api#documentation": "

An array of strings, where each string represents the Amazon Resource Name (ARN) of a\n VTL device.

\n\n \n

All of the specified VTL devices must be from the same gateway. If no VTL devices are\n specified, the result will contain all devices on the specified gateway.

\n
" + "smithy.api#documentation": "

An array of strings, where each string represents the Amazon Resource Name (ARN) of a\n VTL device.

\n \n

All of the specified VTL devices must be from the same gateway. If no VTL devices are\n specified, the result will contain all devices on the specified gateway.

\n
" } }, "Marker": { @@ -3920,7 +4673,8 @@ } }, "traits": { - "smithy.api#documentation": "

DescribeVTLDevicesInput

" + "smithy.api#documentation": "

DescribeVTLDevicesInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeVTLDevicesOutput": { @@ -3943,7 +4697,8 @@ } }, "traits": { - "smithy.api#documentation": "

DescribeVTLDevicesOutput

" + "smithy.api#documentation": "

DescribeVTLDevicesOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DescribeWorkingStorage": { @@ -3963,7 +4718,25 @@ } ], "traits": { - "smithy.api#documentation": "

Returns information about the working storage of a gateway. This operation is only\n supported in the stored volumes gateway type. This operation is deprecated in cached\n volumes API version (20120630). Use DescribeUploadBuffer instead.

\n\n \n

Working storage is also referred to as upload buffer. You can also use the\n DescribeUploadBuffer operation to add upload buffer to a stored volume gateway.

\n
\n\n

The response includes disk IDs that are configured as working storage, and it includes\n the amount of working storage allocated and used.

" + "smithy.api#documentation": "

Returns information about the working storage of a gateway. This operation is only\n supported in the stored volumes gateway type. This operation is deprecated in cached\n volumes API version (20120630). Use DescribeUploadBuffer instead.

\n \n

Working storage is also referred to as upload buffer. You can also use the\n DescribeUploadBuffer operation to add upload buffer to a stored volume gateway.

\n
\n

The response includes disk IDs that are configured as working storage, and it includes\n the amount of working storage allocated and used.

", + "smithy.api#examples": [ + { + "title": "To describe the working storage of a gateway [Depreciated]", + "documentation": "This operation is supported only for the gateway-stored volume architecture. This operation is deprecated in cached-volumes API version (20120630). Use DescribeUploadBuffer instead.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "DiskIds": [ + "pci-0000:03:00.0-scsi-0:0:0:0", + "pci-0000:03:00.0-scsi-0:0:1:0" + ], + "WorkingStorageUsedInBytes": 789207040, + "WorkingStorageAllocatedInBytes": 2199023255552 + } + } + ] } }, "com.amazonaws.storagegateway#DescribeWorkingStorageInput": { @@ -3977,7 +4750,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DescribeWorkingStorageOutput": { @@ -4008,7 +4782,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

" + "smithy.api#documentation": "

A JSON object containing the following fields:

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#Description": { @@ -4053,12 +4828,13 @@ "ForceDetach": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set to true to forcibly remove the iSCSI connection of the target volume\n and detach the volume. The default is false. If this value is set to\n false, you must manually disconnect the iSCSI connection from the target\n volume.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to forcibly remove the iSCSI connection of the target volume\n and detach the volume. The default is false. If this value is set to\n false, you must manually disconnect the iSCSI connection from the target\n volume.

\n

Valid Values: true | false\n

" } } }, "traits": { - "smithy.api#documentation": "

AttachVolumeInput

" + "smithy.api#documentation": "

AttachVolumeInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DetachVolumeOutput": { @@ -4072,7 +4848,8 @@ } }, "traits": { - "smithy.api#documentation": "

AttachVolumeOutput

" + "smithy.api#documentation": "

AttachVolumeOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DeviceType": { @@ -4135,7 +4912,19 @@ } ], "traits": { - "smithy.api#documentation": "

Disables a tape gateway when the gateway is no longer functioning. For example, if your\n gateway VM is damaged, you can disable the gateway so you can recover virtual tapes.

\n\n

Use this operation for a tape gateway that is not reachable or not functioning. This\n operation is only supported in the tape gateway type.

\n\n \n

After a gateway is disabled, it cannot be enabled.

\n
" + "smithy.api#documentation": "

Disables a tape gateway when the gateway is no longer functioning. For example, if your\n gateway VM is damaged, you can disable the gateway so you can recover virtual tapes.

\n

Use this operation for a tape gateway that is not reachable or not functioning. This\n operation is only supported in the tape gateway type.

\n \n

After a gateway is disabled, it cannot be enabled.

\n
", + "smithy.api#examples": [ + { + "title": "To disable a gateway when it is no longer functioning", + "documentation": "Disables a gateway when the gateway is no longer functioning. Use this operation for a gateway-VTL that is not reachable or not functioning.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#DisableGatewayInput": { @@ -4149,7 +4938,8 @@ } }, "traits": { - "smithy.api#documentation": "

DisableGatewayInput

" + "smithy.api#documentation": "

DisableGatewayInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DisableGatewayOutput": { @@ -4163,7 +4953,8 @@ } }, "traits": { - "smithy.api#documentation": "

DisableGatewayOutput

" + "smithy.api#documentation": "

DisableGatewayOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#DisassociateFileSystem": { @@ -4203,6 +4994,9 @@ "smithy.api#documentation": "

If this value is set to true, the operation disassociates an Amazon FSx file\n system immediately. It ends all data uploads to the file system, and the file system\n association enters the FORCE_DELETING status. If this value is set to false,\n the Amazon FSx file system does not disassociate until all data is uploaded.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#DisassociateFileSystemOutput": { @@ -4214,6 +5008,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the deleted file system association.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#Disk": { @@ -4270,7 +5067,7 @@ "com.amazonaws.storagegateway#DiskAllocationType": { "type": "string", "traits": { - "smithy.api#documentation": "

One of the DiskAllocationType enumeration values that identifies how a\n local disk is used.

\n\n

Valid Values: UPLOAD_BUFFER | CACHE_STORAGE\n

", + "smithy.api#documentation": "

One of the DiskAllocationType enumeration values that identifies how a\n local disk is used.

\n

Valid Values: UPLOAD_BUFFER | CACHE_STORAGE\n

", "smithy.api#length": { "min": 3, "max": 100 @@ -4384,258 +5181,380 @@ } }, "com.amazonaws.storagegateway#ErrorCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ActivationKeyExpired", - "name": "ActivationKeyExpired" - }, - { - "value": "ActivationKeyInvalid", - "name": "ActivationKeyInvalid" - }, - { - "value": "ActivationKeyNotFound", - "name": "ActivationKeyNotFound" - }, - { - "value": "GatewayInternalError", - "name": "GatewayInternalError" - }, - { - "value": "GatewayNotConnected", - "name": "GatewayNotConnected" - }, - { - "value": "GatewayNotFound", - "name": "GatewayNotFound" - }, - { - "value": "GatewayProxyNetworkConnectionBusy", - "name": "GatewayProxyNetworkConnectionBusy" - }, - { - "value": "AuthenticationFailure", - "name": "AuthenticationFailure" - }, - { - "value": "BandwidthThrottleScheduleNotFound", - "name": "BandwidthThrottleScheduleNotFound" - }, - { - "value": "Blocked", - "name": "Blocked" - }, - { - "value": "CannotExportSnapshot", - "name": "CannotExportSnapshot" - }, - { - "value": "ChapCredentialNotFound", - "name": "ChapCredentialNotFound" - }, - { - "value": "DiskAlreadyAllocated", - "name": "DiskAlreadyAllocated" - }, - { - "value": "DiskDoesNotExist", - "name": "DiskDoesNotExist" - }, - { - "value": "DiskSizeGreaterThanVolumeMaxSize", - "name": "DiskSizeGreaterThanVolumeMaxSize" - }, - { - "value": "DiskSizeLessThanVolumeSize", - "name": "DiskSizeLessThanVolumeSize" - }, - { - "value": "DiskSizeNotGigAligned", - "name": "DiskSizeNotGigAligned" - }, - { - "value": "DuplicateCertificateInfo", - "name": "DuplicateCertificateInfo" - }, - { - "value": "DuplicateSchedule", - "name": "DuplicateSchedule" - }, - { - "value": "EndpointNotFound", - "name": "EndpointNotFound" - }, - { - "value": "IAMNotSupported", - "name": "IAMNotSupported" - }, - { - "value": "InitiatorInvalid", - "name": "InitiatorInvalid" - }, - { - "value": "InitiatorNotFound", - "name": "InitiatorNotFound" - }, - { - "value": "InternalError", - "name": "InternalError" - }, - { - "value": "InvalidGateway", - "name": "InvalidGateway" - }, - { - "value": "InvalidEndpoint", - "name": "InvalidEndpoint" - }, - { - "value": "InvalidParameters", - "name": "InvalidParameters" - }, - { - "value": "InvalidSchedule", - "name": "InvalidSchedule" - }, - { - "value": "LocalStorageLimitExceeded", - "name": "LocalStorageLimitExceeded" - }, - { - "value": "LunAlreadyAllocated ", - "name": "LunAlreadyAllocated_" - }, - { - "value": "LunInvalid", - "name": "LunInvalid" - }, - { - "value": "JoinDomainInProgress", - "name": "JoinDomainInProgress" - }, - { - "value": "MaximumContentLengthExceeded", - "name": "MaximumContentLengthExceeded" - }, - { - "value": "MaximumTapeCartridgeCountExceeded", - "name": "MaximumTapeCartridgeCountExceeded" - }, - { - "value": "MaximumVolumeCountExceeded", - "name": "MaximumVolumeCountExceeded" - }, - { - "value": "NetworkConfigurationChanged", - "name": "NetworkConfigurationChanged" - }, - { - "value": "NoDisksAvailable", - "name": "NoDisksAvailable" - }, - { - "value": "NotImplemented", - "name": "NotImplemented" - }, - { - "value": "NotSupported", - "name": "NotSupported" - }, - { - "value": "OperationAborted", - "name": "OperationAborted" - }, - { - "value": "OutdatedGateway", - "name": "OutdatedGateway" - }, - { - "value": "ParametersNotImplemented", - "name": "ParametersNotImplemented" - }, - { - "value": "RegionInvalid", - "name": "RegionInvalid" - }, - { - "value": "RequestTimeout", - "name": "RequestTimeout" - }, - { - "value": "ServiceUnavailable", - "name": "ServiceUnavailable" - }, - { - "value": "SnapshotDeleted", - "name": "SnapshotDeleted" - }, - { - "value": "SnapshotIdInvalid", - "name": "SnapshotIdInvalid" - }, - { - "value": "SnapshotInProgress", - "name": "SnapshotInProgress" - }, - { - "value": "SnapshotNotFound", - "name": "SnapshotNotFound" - }, - { - "value": "SnapshotScheduleNotFound", - "name": "SnapshotScheduleNotFound" - }, - { - "value": "StagingAreaFull", - "name": "StagingAreaFull" - }, - { - "value": "StorageFailure", - "name": "StorageFailure" - }, - { - "value": "TapeCartridgeNotFound", - "name": "TapeCartridgeNotFound" - }, - { - "value": "TargetAlreadyExists", - "name": "TargetAlreadyExists" - }, - { - "value": "TargetInvalid", - "name": "TargetInvalid" - }, - { - "value": "TargetNotFound", - "name": "TargetNotFound" - }, - { - "value": "UnauthorizedOperation", - "name": "UnauthorizedOperation" - }, - { - "value": "VolumeAlreadyExists", - "name": "VolumeAlreadyExists" - }, - { - "value": "VolumeIdInvalid", - "name": "VolumeIdInvalid" - }, - { - "value": "VolumeInUse", - "name": "VolumeInUse" - }, - { - "value": "VolumeNotFound", - "name": "VolumeNotFound" - }, - { - "value": "VolumeNotReady", - "name": "VolumeNotReady" + "type": "enum", + "members": { + "ActivationKeyExpired": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ActivationKeyExpired" + } + }, + "ActivationKeyInvalid": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ActivationKeyInvalid" + } + }, + "ActivationKeyNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ActivationKeyNotFound" + } + }, + "GatewayInternalError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GatewayInternalError" + } + }, + "GatewayNotConnected": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GatewayNotConnected" + } + }, + "GatewayNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GatewayNotFound" + } + }, + "GatewayProxyNetworkConnectionBusy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GatewayProxyNetworkConnectionBusy" + } + }, + "AuthenticationFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AuthenticationFailure" + } + }, + "BandwidthThrottleScheduleNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BandwidthThrottleScheduleNotFound" + } + }, + "Blocked": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Blocked" + } + }, + "CannotExportSnapshot": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CannotExportSnapshot" + } + }, + "ChapCredentialNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ChapCredentialNotFound" + } + }, + "DiskAlreadyAllocated": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DiskAlreadyAllocated" + } + }, + "DiskDoesNotExist": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DiskDoesNotExist" + } + }, + "DiskSizeGreaterThanVolumeMaxSize": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DiskSizeGreaterThanVolumeMaxSize" + } + }, + "DiskSizeLessThanVolumeSize": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DiskSizeLessThanVolumeSize" + } + }, + "DiskSizeNotGigAligned": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DiskSizeNotGigAligned" + } + }, + "DuplicateCertificateInfo": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DuplicateCertificateInfo" + } + }, + "DuplicateSchedule": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DuplicateSchedule" + } + }, + "EndpointNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EndpointNotFound" + } + }, + "IAMNotSupported": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IAMNotSupported" + } + }, + "InitiatorInvalid": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InitiatorInvalid" + } + }, + "InitiatorNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InitiatorNotFound" + } + }, + "InternalError": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InternalError" + } + }, + "InvalidGateway": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidGateway" + } + }, + "InvalidEndpoint": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidEndpoint" + } + }, + "InvalidParameters": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidParameters" + } + }, + "InvalidSchedule": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InvalidSchedule" + } + }, + "LocalStorageLimitExceeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LocalStorageLimitExceeded" } - ] + }, + "LunAlreadyAllocated_": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LunAlreadyAllocated " + } + }, + "LunInvalid": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LunInvalid" + } + }, + "JoinDomainInProgress": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JoinDomainInProgress" + } + }, + "MaximumContentLengthExceeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MaximumContentLengthExceeded" + } + }, + "MaximumTapeCartridgeCountExceeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MaximumTapeCartridgeCountExceeded" + } + }, + "MaximumVolumeCountExceeded": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MaximumVolumeCountExceeded" + } + }, + "NetworkConfigurationChanged": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NetworkConfigurationChanged" + } + }, + "NoDisksAvailable": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NoDisksAvailable" + } + }, + "NotImplemented": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NotImplemented" + } + }, + "NotSupported": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NotSupported" + } + }, + "OperationAborted": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OperationAborted" + } + }, + "OutdatedGateway": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OutdatedGateway" + } + }, + "ParametersNotImplemented": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ParametersNotImplemented" + } + }, + "RegionInvalid": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RegionInvalid" + } + }, + "RequestTimeout": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RequestTimeout" + } + }, + "ServiceUnavailable": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ServiceUnavailable" + } + }, + "SnapshotDeleted": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SnapshotDeleted" + } + }, + "SnapshotIdInvalid": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SnapshotIdInvalid" + } + }, + "SnapshotInProgress": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SnapshotInProgress" + } + }, + "SnapshotNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SnapshotNotFound" + } + }, + "SnapshotScheduleNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SnapshotScheduleNotFound" + } + }, + "StagingAreaFull": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "StagingAreaFull" + } + }, + "StorageFailure": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "StorageFailure" + } + }, + "TapeCartridgeNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TapeCartridgeNotFound" + } + }, + "TargetAlreadyExists": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TargetAlreadyExists" + } + }, + "TargetInvalid": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TargetInvalid" + } + }, + "TargetNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TargetNotFound" + } + }, + "UnauthorizedOperation": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UnauthorizedOperation" + } + }, + "VolumeAlreadyExists": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VolumeAlreadyExists" + } + }, + "VolumeIdInvalid": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VolumeIdInvalid" + } + }, + "VolumeInUse": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VolumeInUse" + } + }, + "VolumeNotFound": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VolumeNotFound" + } + }, + "VolumeNotReady": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VolumeNotReady" + } + } } }, "com.amazonaws.storagegateway#FileShareARN": { @@ -4724,7 +5643,7 @@ "com.amazonaws.storagegateway#FileShareStatus": { "type": "string", "traits": { - "smithy.api#documentation": "

The status of the file share.

\n\n

Valid Values: CREATING | UPDATING | AVAILABLE |\n DELETING\n

", + "smithy.api#documentation": "

The status of the file share.

\n

Valid Values: CREATING | UPDATING | AVAILABLE |\n DELETING\n

", "smithy.api#length": { "min": 3, "max": 50 @@ -4732,19 +5651,23 @@ } }, "com.amazonaws.storagegateway#FileShareType": { - "type": "string", - "traits": { - "smithy.api#documentation": "

The type of the file share.

", - "smithy.api#enum": [ - { - "value": "NFS", - "name": "NFS" - }, - { - "value": "SMB", - "name": "SMB" + "type": "enum", + "members": { + "NFS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NFS" } - ] + }, + "SMB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SMB" + } + } + }, + "traits": { + "smithy.api#documentation": "

The type of the file share.

" } }, "com.amazonaws.storagegateway#FileSystemAssociationARN": { @@ -4947,22 +5870,26 @@ } }, "com.amazonaws.storagegateway#GatewayCapacity": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Small", - "name": "Small" - }, - { - "value": "Medium", - "name": "Medium" - }, - { - "value": "Large", - "name": "Large" + "type": "enum", + "members": { + "Small": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Small" } - ] + }, + "Medium": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Medium" + } + }, + "Large": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Large" + } + } } }, "com.amazonaws.storagegateway#GatewayId": { @@ -4998,7 +5925,7 @@ "GatewayOperationalState": { "target": "com.amazonaws.storagegateway#GatewayOperationalState", "traits": { - "smithy.api#documentation": "

The state of the gateway.

\n\n

Valid Values: DISABLED | ACTIVE\n

" + "smithy.api#documentation": "

The state of the gateway.

\n

Valid Values: DISABLED | ACTIVE\n

" } }, "GatewayName": { @@ -5106,34 +6033,44 @@ } }, "com.amazonaws.storagegateway#HostEnvironment": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "VMWARE", - "name": "VMWARE" - }, - { - "value": "HYPER-V", - "name": "HYPER_V" - }, - { - "value": "EC2", - "name": "EC2" - }, - { - "value": "KVM", - "name": "KVM" - }, - { - "value": "OTHER", - "name": "OTHER" - }, - { - "value": "SNOWBALL", - "name": "SNOWBALL" + "type": "enum", + "members": { + "VMWARE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VMWARE" } - ] + }, + "HYPER_V": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HYPER-V" + } + }, + "EC2": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EC2" + } + }, + "KVM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KVM" + } + }, + "OTHER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OTHER" + } + }, + "SNOWBALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SNOWBALL" + } + } } }, "com.amazonaws.storagegateway#HostEnvironmentId": { @@ -5328,7 +6265,8 @@ } }, "traits": { - "smithy.api#documentation": "

JoinDomainInput

" + "smithy.api#documentation": "

JoinDomainInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#JoinDomainOutput": { @@ -5343,12 +6281,13 @@ "ActiveDirectoryStatus": { "target": "com.amazonaws.storagegateway#ActiveDirectoryStatus", "traits": { - "smithy.api#documentation": "

Indicates the status of the gateway as a member of the Active Directory domain.

\n\n
    \n
  • \n

    \n ACCESS_DENIED: Indicates that the JoinDomain operation\n failed due to an authentication error.

    \n
  • \n
  • \n

    \n DETACHED: Indicates that gateway is not joined to a domain.

    \n
  • \n
  • \n

    \n JOINED: Indicates that the gateway has successfully joined a\n domain.

    \n
  • \n
  • \n

    \n JOINING: Indicates that a JoinDomain operation is in\n progress.

    \n
  • \n
  • \n

    \n NETWORK_ERROR: Indicates that JoinDomain operation\n failed due to a network or connectivity error.

    \n
  • \n
  • \n

    \n TIMEOUT: Indicates that the JoinDomain operation failed\n because the operation didn't complete within the allotted time.

    \n
  • \n
  • \n

    \n UNKNOWN_ERROR: Indicates that the JoinDomain operation\n failed due to another type of error.

    \n
  • \n
" + "smithy.api#documentation": "

Indicates the status of the gateway as a member of the Active Directory domain.

\n
    \n
  • \n

    \n ACCESS_DENIED: Indicates that the JoinDomain operation\n failed due to an authentication error.

    \n
  • \n
  • \n

    \n DETACHED: Indicates that gateway is not joined to a domain.

    \n
  • \n
  • \n

    \n JOINED: Indicates that the gateway has successfully joined a\n domain.

    \n
  • \n
  • \n

    \n JOINING: Indicates that a JoinDomain operation is in\n progress.

    \n
  • \n
  • \n

    \n NETWORK_ERROR: Indicates that JoinDomain operation\n failed due to a network or connectivity error.

    \n
  • \n
  • \n

    \n TIMEOUT: Indicates that the JoinDomain operation failed\n because the operation didn't complete within the allotted time.

    \n
  • \n
  • \n

    \n UNKNOWN_ERROR: Indicates that the JoinDomain operation\n failed due to another type of error.

    \n
  • \n
" } } }, "traits": { - "smithy.api#documentation": "

JoinDomainOutput

" + "smithy.api#documentation": "

JoinDomainOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#KMSKey": { @@ -5388,7 +6327,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the automatic tape creation policies for a gateway. If there are no automatic tape\n creation policies for the gateway, it returns an empty list.

\n\n

This operation is only supported for tape gateways.

" + "smithy.api#documentation": "

Lists the automatic tape creation policies for a gateway. If there are no automatic tape\n creation policies for the gateway, it returns an empty list.

\n

This operation is only supported for tape gateways.

" } }, "com.amazonaws.storagegateway#ListAutomaticTapeCreationPoliciesInput": { @@ -5397,6 +6336,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListAutomaticTapeCreationPoliciesOutput": { @@ -5408,6 +6350,9 @@ "smithy.api#documentation": "

Gets a listing of information about the gateway's automatic tape creation policies,\n including the automatic tape creation rules and the gateway that is using the\n policies.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListFileShares": { @@ -5459,7 +6404,8 @@ } }, "traits": { - "smithy.api#documentation": "

ListFileShareInput

" + "smithy.api#documentation": "

ListFileShareInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListFileSharesOutput": { @@ -5485,7 +6431,8 @@ } }, "traits": { - "smithy.api#documentation": "

ListFileShareOutput

" + "smithy.api#documentation": "

ListFileShareOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListFileSystemAssociations": { @@ -5532,6 +6479,9 @@ "smithy.api#documentation": "

Opaque pagination token returned from a previous ListFileSystemAssociations\n operation. If present, Marker specifies where to continue the list from after\n a previous call to ListFileSystemAssociations. Optional.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListFileSystemAssociationsOutput": { @@ -5555,6 +6505,9 @@ "smithy.api#documentation": "

An array of information about the Amazon FSx gateway's file system\n associations.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListGateways": { @@ -5574,7 +6527,28 @@ } ], "traits": { - "smithy.api#documentation": "

Lists gateways owned by an Amazon Web Services account in an Amazon Web Services Region\n specified in the request. The returned list is ordered by gateway Amazon Resource Name\n (ARN).

\n\n

By default, the operation returns a maximum of 100 gateways. This operation supports\n pagination that allows you to optionally reduce the number of gateways returned in a\n response.

\n\n

If you have more gateways than are returned in a response (that is, the response returns\n only a truncated list of your gateways), the response contains a marker that you can\n specify in your next request to fetch the next page of gateways.

", + "smithy.api#documentation": "

Lists gateways owned by an Amazon Web Services account in an Amazon Web Services Region\n specified in the request. The returned list is ordered by gateway Amazon Resource Name\n (ARN).

\n

By default, the operation returns a maximum of 100 gateways. This operation supports\n pagination that allows you to optionally reduce the number of gateways returned in a\n response.

\n

If you have more gateways than are returned in a response (that is, the response returns\n only a truncated list of your gateways), the response contains a marker that you can\n specify in your next request to fetch the next page of gateways.

", + "smithy.api#examples": [ + { + "title": "To lists region specific gateways per AWS account", + "documentation": "Lists gateways owned by an AWS account in a specified region as requested. Results are sorted by gateway ARN up to a maximum of 100 gateways.", + "input": { + "Marker": "1", + "Limit": 2 + }, + "output": { + "Gateways": [ + { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-23A4567C" + } + ], + "Marker": "1" + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5600,7 +6574,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing zero or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing zero or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListGatewaysOutput": { @@ -5618,6 +6593,9 @@ "smithy.api#documentation": "

Use the marker in your next request to fetch the next set of gateways in the list. If\n there are no more gateways to list, this field does not appear in the response.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListLocalDisks": { @@ -5637,7 +6615,38 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of the gateway's local disks. To specify which gateway to describe,\n you use the Amazon Resource Name (ARN) of the gateway in the body of the request.

\n\n

The request returns a list of all disks, specifying which are configured as working\n storage, cache storage, or stored volume or not configured at all. The response includes a\n DiskStatus field. This field can have a value of present (the disk is\n available to use), missing (the disk is no longer connected to the gateway), or mismatch\n (the disk node is occupied by a disk that has incorrect metadata or the disk content is\n corrupted).

" + "smithy.api#documentation": "

Returns a list of the gateway's local disks. To specify which gateway to describe,\n you use the Amazon Resource Name (ARN) of the gateway in the body of the request.

\n

The request returns a list of all disks, specifying which are configured as working\n storage, cache storage, or stored volume or not configured at all. The response includes a\n DiskStatus field. This field can have a value of present (the disk is\n available to use), missing (the disk is no longer connected to the gateway), or mismatch\n (the disk node is occupied by a disk that has incorrect metadata or the disk content is\n corrupted).

", + "smithy.api#examples": [ + { + "title": "To list the gateway's local disks", + "documentation": "The request returns a list of all disks, specifying which are configured as working storage, cache storage, or stored volume or not configured at all.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "Disks": [ + { + "DiskAllocationType": "CACHE_STORAGE", + "DiskId": "pci-0000:03:00.0-scsi-0:0:0:0", + "DiskNode": "SCSI(0:0)", + "DiskPath": "/dev/sda", + "DiskSizeInBytes": 1099511627776, + "DiskStatus": "missing" + }, + { + "DiskAllocationType": "UPLOAD_BUFFER", + "DiskAllocationResource": "", + "DiskId": "pci-0000:03:00.0-scsi-0:0:1:0", + "DiskNode": "SCSI(0:1)", + "DiskPath": "/dev/sdb", + "DiskSizeInBytes": 1099511627776, + "DiskStatus": "present" + } + ] + } + } + ] } }, "com.amazonaws.storagegateway#ListLocalDisksInput": { @@ -5651,7 +6660,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListLocalDisksOutput": { @@ -5663,9 +6673,12 @@ "Disks": { "target": "com.amazonaws.storagegateway#Disks", "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing the following fields:

\n " } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListTagsForResource": { @@ -5686,6 +6699,27 @@ ], "traits": { "smithy.api#documentation": "

Lists the tags that have been added to the specified resource. This operation is\n supported in storage gateways of all types.

", + "smithy.api#examples": [ + { + "title": "To list tags that have been added to a resource", + "documentation": "Lists the tags that have been added to the specified resource.", + "input": { + "ResourceARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B", + "Marker": "1", + "Limit": 1 + }, + "output": { + "ResourceARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B", + "Marker": "1", + "Tags": [ + { + "Key": "Dev Gatgeway Region", + "Value": "East Coast" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5718,7 +6752,8 @@ } }, "traits": { - "smithy.api#documentation": "

ListTagsForResourceInput

" + "smithy.api#documentation": "

ListTagsForResourceInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListTagsForResourceOutput": { @@ -5744,7 +6779,8 @@ } }, "traits": { - "smithy.api#documentation": "

ListTagsForResourceOutput

" + "smithy.api#documentation": "

ListTagsForResourceOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListTapePools": { @@ -5764,7 +6800,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists custom tape pools. You specify custom tape pools to list by specifying one or more\n custom tape pool Amazon Resource Names (ARNs). If you don't specify a custom tape pool ARN,\n the operation lists all custom tape pools.

\n\n

This operation supports pagination. You can optionally specify the Limit\n parameter in the body to limit the number of tape pools in the response. If the number of\n tape pools returned in the response is truncated, the response includes a\n Marker element that you can use in your subsequent request to retrieve the\n next set of tape pools.

", + "smithy.api#documentation": "

Lists custom tape pools. You specify custom tape pools to list by specifying one or more\n custom tape pool Amazon Resource Names (ARNs). If you don't specify a custom tape pool ARN,\n the operation lists all custom tape pools.

\n

This operation supports pagination. You can optionally specify the Limit\n parameter in the body to limit the number of tape pools in the response. If the number of\n tape pools returned in the response is truncated, the response includes a\n Marker element that you can use in your subsequent request to retrieve the\n next set of tape pools.

", "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5794,6 +6830,9 @@ "smithy.api#documentation": "

An optional number limit for the tape pools in the list returned by this call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListTapePoolsOutput": { @@ -5811,6 +6850,9 @@ "smithy.api#documentation": "

A string that indicates the position at which to begin the returned list of tape pools.\n Use the marker in your next request to continue pagination of tape pools. If there are no\n more tape pools to list, this element does not appear in the response body.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListTapes": { @@ -5830,7 +6872,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists virtual tapes in your virtual tape library (VTL) and your virtual tape shelf\n (VTS). You specify the tapes to list by specifying one or more tape Amazon Resource Names\n (ARNs). If you don't specify a tape ARN, the operation lists all virtual tapes in both\n your VTL and VTS.

\n\n

This operation supports pagination. By default, the operation returns a maximum of up to\n 100 tapes. You can optionally specify the Limit parameter in the body to limit\n the number of tapes in the response. If the number of tapes returned in the response is\n truncated, the response includes a Marker element that you can use in your\n subsequent request to retrieve the next set of tapes. This operation is only supported in\n the tape gateway type.

", + "smithy.api#documentation": "

Lists virtual tapes in your virtual tape library (VTL) and your virtual tape shelf\n (VTS). You specify the tapes to list by specifying one or more tape Amazon Resource Names\n (ARNs). If you don't specify a tape ARN, the operation lists all virtual tapes in both\n your VTL and VTS.

\n

This operation supports pagination. By default, the operation returns a maximum of up to\n 100 tapes. You can optionally specify the Limit parameter in the body to limit\n the number of tapes in the response. If the number of tapes returned in the response is\n truncated, the response includes a Marker element that you can use in your\n subsequent request to retrieve the next set of tapes. This operation is only supported in\n the tape gateway type.

", "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -5859,7 +6901,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object that contains one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object that contains one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListTapesOutput": { @@ -5876,7 +6919,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing the following fields:

\n ", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListVolumeInitiators": { @@ -5911,7 +6955,8 @@ } }, "traits": { - "smithy.api#documentation": "

ListVolumeInitiatorsInput

" + "smithy.api#documentation": "

ListVolumeInitiatorsInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListVolumeInitiatorsOutput": { @@ -5925,7 +6970,8 @@ } }, "traits": { - "smithy.api#documentation": "

ListVolumeInitiatorsOutput

" + "smithy.api#documentation": "

ListVolumeInitiatorsOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListVolumeRecoveryPoints": { @@ -5945,7 +6991,26 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the recovery points for a specified gateway. This operation is only supported in\n the cached volume gateway type.

\n\n

Each cache volume has one recovery point. A volume recovery point is a point in time at\n which all data of the volume is consistent and from which you can create a snapshot or\n clone a new cached volume from a source volume. To create a snapshot from a volume recovery\n point use the CreateSnapshotFromVolumeRecoveryPoint operation.

" + "smithy.api#documentation": "

Lists the recovery points for a specified gateway. This operation is only supported in\n the cached volume gateway type.

\n

Each cache volume has one recovery point. A volume recovery point is a point in time at\n which all data of the volume is consistent and from which you can create a snapshot or\n clone a new cached volume from a source volume. To create a snapshot from a volume recovery\n point use the CreateSnapshotFromVolumeRecoveryPoint operation.

", + "smithy.api#examples": [ + { + "title": "To list recovery points for a gateway", + "documentation": "Lists the recovery points for a specified gateway in which all data of the volume is consistent and can be used to create a snapshot.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "VolumeRecoveryPointInfos": [ + { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "VolumeRecoveryPointTime": "2012-09-04T21:08:44.627Z", + "VolumeSizeInBytes": 536870912000 + } + ] + } + } + ] } }, "com.amazonaws.storagegateway#ListVolumeRecoveryPointsInput": { @@ -5957,6 +7022,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListVolumeRecoveryPointsOutput": { @@ -5971,6 +7039,9 @@ "smithy.api#documentation": "

An array of VolumeRecoveryPointInfo objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ListVolumes": { @@ -5990,7 +7061,40 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the iSCSI stored volumes of a gateway. Results are sorted by volume ARN. The\n response includes only the volume ARNs. If you want additional volume information, use the\n DescribeStorediSCSIVolumes or the DescribeCachediSCSIVolumes API.

\n\n

The operation supports pagination. By default, the operation returns a maximum of up to\n 100 volumes. You can optionally specify the Limit field in the body to limit\n the number of volumes in the response. If the number of volumes returned in the response is\n truncated, the response includes a Marker field. You can use this Marker value in your\n subsequent request to retrieve the next set of volumes. This operation is only supported in\n the cached volume and stored volume gateway types.

", + "smithy.api#documentation": "

Lists the iSCSI stored volumes of a gateway. Results are sorted by volume ARN. The\n response includes only the volume ARNs. If you want additional volume information, use the\n DescribeStorediSCSIVolumes or the DescribeCachediSCSIVolumes API.

\n

The operation supports pagination. By default, the operation returns a maximum of up to\n 100 volumes. You can optionally specify the Limit field in the body to limit\n the number of volumes in the response. If the number of volumes returned in the response is\n truncated, the response includes a Marker field. You can use this Marker value in your\n subsequent request to retrieve the next set of volumes. This operation is only supported in\n the cached volume and stored volume gateway types.

", + "smithy.api#examples": [ + { + "title": "To list the iSCSI stored volumes of a gateway", + "documentation": "Lists the iSCSI stored volumes of a gateway. Results are sorted by volume ARN up to a maximum of 100 volumes.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "Marker": "1", + "Limit": 2 + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "Marker": "1", + "VolumeInfos": [ + { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "GatewayId": "sgw-12A3456B", + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "VolumeId": "vol-1122AABB", + "VolumeSizeInBytes": 107374182400, + "VolumeType": "STORED" + }, + { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-13B4567C", + "GatewayId": "sgw-gw-13B4567C", + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-13B4567C/volume/vol-3344CCDD", + "VolumeId": "vol-1122AABB", + "VolumeSizeInBytes": 107374182400, + "VolumeType": "STORED" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "Marker", "outputToken": "Marker", @@ -6019,7 +7123,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object that contains one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object that contains one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ListVolumesOutput": { @@ -6042,7 +7147,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing the following fields:

\n ", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#LocalConsolePassword": { @@ -6059,7 +7165,7 @@ "com.amazonaws.storagegateway#LocationARN": { "type": "string", "traits": { - "smithy.api#documentation": "

A custom ARN for the backend storage used for storing data for file shares. It includes\n a resource ARN with an optional prefix concatenation. The prefix must end with a forward\n slash (/).

\n \n

You can specify LocationARN as a bucket ARN, access point ARN or access point alias,\n as shown in the following examples.

\n\n

Bucket ARN:

\n

\n arn:aws:s3:::my-bucket/prefix/\n

\n\n

Access point ARN:

\n

\n arn:aws:s3:region:account-id:accesspoint/access-point-name/prefix/\n

\n\n

If you specify an access point, the bucket policy must be configured to delegate\n access control to the access point. For information, see Delegating access control to access points in the Amazon S3 User Guide.

\n\n

Access point alias:

\n

\n test-ap-ab123cdef4gehijklmn5opqrstuvuse1a-s3alias\n

\n
", + "smithy.api#documentation": "

A custom ARN for the backend storage used for storing data for file shares. It includes\n a resource ARN with an optional prefix concatenation. The prefix must end with a forward\n slash (/).

\n \n

You can specify LocationARN as a bucket ARN, access point ARN or access point alias,\n as shown in the following examples.

\n

Bucket ARN:

\n

\n arn:aws:s3:::my-bucket/prefix/\n

\n

Access point ARN:

\n

\n arn:aws:s3:region:account-id:accesspoint/access-point-name/prefix/\n

\n

If you specify an access point, the bucket policy must be configured to delegate\n access control to the access point. For information, see Delegating access control to access points in the Amazon S3 User Guide.

\n

Access point alias:

\n

\n test-ap-ab123cdef4gehijklmn5opqrstuvuse1a-s3alias\n

\n
", "smithy.api#length": { "min": 16, "max": 1400 @@ -6156,7 +7262,7 @@ "target": "com.amazonaws.storagegateway#Boolean2", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -6174,7 +7280,7 @@ "DefaultStorageClass": { "target": "com.amazonaws.storagegateway#StorageClass", "traits": { - "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" + "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" } }, "ObjectACL": { @@ -6189,19 +7295,19 @@ "ReadOnly": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n

Valid Values: true | false\n

" } }, "GuessMIMETypeEnabled": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n

Valid Values: true | false\n

" } }, "RequesterPays": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n

Valid Values: true | false\n

" } }, "Tags": { @@ -6213,7 +7319,7 @@ "FileShareName": { "target": "com.amazonaws.storagegateway#FileShareName", "traits": { - "smithy.api#documentation": "

The name of the file share. Optional.

\n\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" + "smithy.api#documentation": "

The name of the file share. Optional.

\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" } }, "CacheAttributes": { @@ -6225,7 +7331,7 @@ "NotificationPolicy": { "target": "com.amazonaws.storagegateway#NotificationPolicy", "traits": { - "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n\n

The following example sets NotificationPolicy off.

\n\n

\n {}\n

" + "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n

The following example sets NotificationPolicy off.

\n

\n {}\n

" } }, "VPCEndpointDNSName": { @@ -6269,7 +7375,7 @@ "MacAddress": { "target": "com.amazonaws.storagegateway#string", "traits": { - "smithy.api#documentation": "

The Media Access Control (MAC) address of the interface.

\n\n \n

This is currently unsupported and will not be returned in output.

\n
" + "smithy.api#documentation": "

The Media Access Control (MAC) address of the interface.

\n \n

This is currently unsupported and will not be returned in output.

\n
" } }, "Ipv6Address": { @@ -6335,7 +7441,7 @@ } ], "traits": { - "smithy.api#documentation": "

Sends you notification through CloudWatch Events when all files written to your file\n share have been uploaded to S3. Amazon S3.

\n\n

Storage Gateway can send a notification through Amazon CloudWatch Events when all\n files written to your file share up to that point in time have been uploaded to Amazon S3. These files include files written to the file share up to the time that you\n make a request for notification. When the upload is done, Storage Gateway sends you\n notification through an Amazon CloudWatch Event. You can configure CloudWatch Events to\n send the notification through event targets such as Amazon SNS or Lambda function. This operation is only supported for S3 File Gateways.

\n\n \n\n

For more information, see Getting file upload notification in the Storage Gateway User\n Guide.

" + "smithy.api#documentation": "

Sends you notification through CloudWatch Events when all files written to your file\n share have been uploaded to S3. Amazon S3.

\n

Storage Gateway can send a notification through Amazon CloudWatch Events when all\n files written to your file share up to that point in time have been uploaded to Amazon S3. These files include files written to the file share up to the time that you\n make a request for notification. When the upload is done, Storage Gateway sends you\n notification through an Amazon CloudWatch Event. You can configure CloudWatch Events to\n send the notification through event targets such as Amazon SNS or Lambda function. This operation is only supported for S3 File Gateways.

\n

For more information, see Getting file upload notification in the Storage Gateway User\n Guide.

" } }, "com.amazonaws.storagegateway#NotifyWhenUploadedInput": { @@ -6347,6 +7453,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#NotifyWhenUploadedOutput": { @@ -6358,6 +7467,9 @@ "NotificationId": { "target": "com.amazonaws.storagegateway#NotificationId" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#NumTapesToCreate": { @@ -6367,42 +7479,56 @@ "min": 1, "max": 10 } - } - }, - "com.amazonaws.storagegateway#ObjectACL": { - "type": "string", + } + }, + "com.amazonaws.storagegateway#ObjectACL": { + "type": "enum", + "members": { + "private": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "private" + } + }, + "public_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read" + } + }, + "public_read_write": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "public-read-write" + } + }, + "authenticated_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "authenticated-read" + } + }, + "bucket_owner_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bucket-owner-read" + } + }, + "bucket_owner_full_control": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bucket-owner-full-control" + } + }, + "aws_exec_read": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "aws-exec-read" + } + } + }, "traits": { - "smithy.api#documentation": "

A value that sets the access control list (ACL) permission for objects in the S3 bucket\n that an S3 File Gateway puts objects into. The default value is\n private.

", - "smithy.api#enum": [ - { - "value": "private", - "name": "private" - }, - { - "value": "public-read", - "name": "public_read" - }, - { - "value": "public-read-write", - "name": "public_read_write" - }, - { - "value": "authenticated-read", - "name": "authenticated_read" - }, - { - "value": "bucket-owner-read", - "name": "bucket_owner_read" - }, - { - "value": "bucket-owner-full-control", - "name": "bucket_owner_full_control" - }, - { - "value": "aws-exec-read", - "name": "aws_exec_read" - } - ] + "smithy.api#documentation": "

A value that sets the access control list (ACL) permission for objects in the S3 bucket\n that an S3 File Gateway puts objects into. The default value is\n private.

" } }, "com.amazonaws.storagegateway#OrganizationalUnit": { @@ -6524,18 +7650,20 @@ } }, "com.amazonaws.storagegateway#PoolStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "DELETED", - "name": "DELETED" + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" } - ] + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED" + } + } } }, "com.amazonaws.storagegateway#PositiveIntObject": { @@ -6572,7 +7700,7 @@ } ], "traits": { - "smithy.api#documentation": "

Refreshes the cached inventory of objects for the specified file share. This operation\n finds objects in the Amazon S3 bucket that were added, removed, or replaced since\n the gateway last listed the bucket's contents and cached the results. This operation\n does not import files into the S3 File Gateway cache storage. It only updates the cached\n inventory to reflect changes in the inventory of the objects in the S3 bucket. This\n operation is only supported in the S3 File Gateway types.

\n\n

You can subscribe to be notified through an Amazon CloudWatch event when your\n RefreshCache operation completes. For more information, see Getting notified about file operations in the Storage Gateway\n User Guide. This operation is Only supported for S3 File Gateways.

\n\n

When this API is called, it only initiates the refresh operation. When the API call\n completes and returns a success code, it doesn't necessarily mean that the file\n refresh has completed. You should use the refresh-complete notification to determine that\n the operation has completed before you check for new files on the gateway file share. You\n can subscribe to be notified through a CloudWatch event when your RefreshCache\n operation completes.

\n\n

Throttle limit: This API is asynchronous, so the gateway will accept no more than two\n refreshes at any time. We recommend using the refresh-complete CloudWatch event\n notification before issuing additional requests. For more information, see Getting notified about file operations in the Storage Gateway\n User Guide.

\n\n \n
    \n
  • \n

    Wait at least 60 seconds between consecutive RefreshCache API requests.

    \n
  • \n
  • \n

    RefreshCache does not evict cache entries if invoked consecutively within 60\n seconds of a previous RefreshCache request.

    \n
  • \n
  • \n

    If you invoke the RefreshCache API when two requests are already being\n processed, any new request will cause an\n InvalidGatewayRequestException error because too many requests\n were sent to the server.

    \n
  • \n
\n
\n\n \n

The S3 bucket name does not need to be included when entering the list of folders in\n the FolderList parameter.

\n
\n\n \n\n

For more information, see Getting notified about file operations in the Storage Gateway\n User Guide.

" + "smithy.api#documentation": "

Refreshes the cached inventory of objects for the specified file share. This operation\n finds objects in the Amazon S3 bucket that were added, removed, or replaced since\n the gateway last listed the bucket's contents and cached the results. This operation\n does not import files into the S3 File Gateway cache storage. It only updates the cached\n inventory to reflect changes in the inventory of the objects in the S3 bucket. This\n operation is only supported in the S3 File Gateway types.

\n

You can subscribe to be notified through an Amazon CloudWatch event when your\n RefreshCache operation completes. For more information, see Getting notified about file operations in the Storage Gateway\n User Guide. This operation is Only supported for S3 File Gateways.

\n

When this API is called, it only initiates the refresh operation. When the API call\n completes and returns a success code, it doesn't necessarily mean that the file\n refresh has completed. You should use the refresh-complete notification to determine that\n the operation has completed before you check for new files on the gateway file share. You\n can subscribe to be notified through a CloudWatch event when your RefreshCache\n operation completes.

\n

Throttle limit: This API is asynchronous, so the gateway will accept no more than two\n refreshes at any time. We recommend using the refresh-complete CloudWatch event\n notification before issuing additional requests. For more information, see Getting notified about file operations in the Storage Gateway\n User Guide.

\n \n
    \n
  • \n

    Wait at least 60 seconds between consecutive RefreshCache API requests.

    \n
  • \n
  • \n

    RefreshCache does not evict cache entries if invoked consecutively within 60\n seconds of a previous RefreshCache request.

    \n
  • \n
  • \n

    If you invoke the RefreshCache API when two requests are already being\n processed, any new request will cause an\n InvalidGatewayRequestException error because too many requests\n were sent to the server.

    \n
  • \n
\n
\n \n

The S3 bucket name does not need to be included when entering the list of folders in\n the FolderList parameter.

\n
\n

For more information, see Getting notified about file operations in the Storage Gateway\n User Guide.

" } }, "com.amazonaws.storagegateway#RefreshCacheInput": { @@ -6594,12 +7722,13 @@ "Recursive": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that specifies whether to recursively refresh folders in the cache. The refresh\n includes folders that were in the cache the last time the gateway listed the folder's\n contents. If this value set to true, each folder that is listed in\n FolderList is recursively updated. Otherwise, subfolders listed in\n FolderList are not refreshed. Only objects that are in folders listed\n directly under FolderList are found and used for the update. The default is\n true.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that specifies whether to recursively refresh folders in the cache. The refresh\n includes folders that were in the cache the last time the gateway listed the folder's\n contents. If this value set to true, each folder that is listed in\n FolderList is recursively updated. Otherwise, subfolders listed in\n FolderList are not refreshed. Only objects that are in folders listed\n directly under FolderList are found and used for the update. The default is\n true.

\n

Valid Values: true | false\n

" } } }, "traits": { - "smithy.api#documentation": "

RefreshCacheInput

" + "smithy.api#documentation": "

RefreshCacheInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#RefreshCacheOutput": { @@ -6613,7 +7742,8 @@ } }, "traits": { - "smithy.api#documentation": "

RefreshCacheOutput

" + "smithy.api#documentation": "

RefreshCacheOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#RegionId": { @@ -6642,7 +7772,23 @@ } ], "traits": { - "smithy.api#documentation": "

Removes one or more tags from the specified resource. This operation is supported in\n storage gateways of all types.

" + "smithy.api#documentation": "

Removes one or more tags from the specified resource. This operation is supported in\n storage gateways of all types.

", + "smithy.api#examples": [ + { + "title": "To remove tags from a resource", + "documentation": "Lists the iSCSI stored volumes of a gateway. Removes one or more tags from the specified resource.", + "input": { + "ResourceARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B", + "TagKeys": [ + "Dev Gatgeway Region", + "East Coast" + ] + }, + "output": { + "ResourceARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B" + } + } + ] } }, "com.amazonaws.storagegateway#RemoveTagsFromResourceInput": { @@ -6664,7 +7810,8 @@ } }, "traits": { - "smithy.api#documentation": "

RemoveTagsFromResourceInput

" + "smithy.api#documentation": "

RemoveTagsFromResourceInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#RemoveTagsFromResourceOutput": { @@ -6678,7 +7825,8 @@ } }, "traits": { - "smithy.api#documentation": "

RemoveTagsFromResourceOutput

" + "smithy.api#documentation": "

RemoveTagsFromResourceOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ResetCache": { @@ -6698,7 +7846,19 @@ } ], "traits": { - "smithy.api#documentation": "

Resets all cache disks that have encountered an error and makes the disks available for\n reconfiguration as cache storage. If your cache disk encounters an error, the gateway\n prevents read and write operations on virtual tapes in the gateway. For example, an error\n can occur when a disk is corrupted or removed from the gateway. When a cache is reset, the\n gateway loses its cache storage. At this point, you can reconfigure the disks as cache\n disks. This operation is only supported in the cached volume and tape types.

\n\n \n

If the cache disk you are resetting contains data that has not been uploaded to\n Amazon S3 yet, that data can be lost. After you reset cache disks, there will\n be no configured cache disks left in the gateway, so you must configure at least one new\n cache disk for your gateway to function properly.

\n
" + "smithy.api#documentation": "

Resets all cache disks that have encountered an error and makes the disks available for\n reconfiguration as cache storage. If your cache disk encounters an error, the gateway\n prevents read and write operations on virtual tapes in the gateway. For example, an error\n can occur when a disk is corrupted or removed from the gateway. When a cache is reset, the\n gateway loses its cache storage. At this point, you can reconfigure the disks as cache\n disks. This operation is only supported in the cached volume and tape types.

\n \n

If the cache disk you are resetting contains data that has not been uploaded to\n Amazon S3 yet, that data can be lost. After you reset cache disks, there will\n be no configured cache disks left in the gateway, so you must configure at least one new\n cache disk for your gateway to function properly.

\n
", + "smithy.api#examples": [ + { + "title": "To reset cache disks in error status", + "documentation": "Resets all cache disks that have encountered a error and makes the disks available for reconfiguration as cache storage.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-13B4567C" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-13B4567C" + } + } + ] } }, "com.amazonaws.storagegateway#ResetCacheInput": { @@ -6710,6 +7870,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ResetCacheOutput": { @@ -6718,6 +7881,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ResourceARN": { @@ -6739,22 +7905,26 @@ } }, "com.amazonaws.storagegateway#RetentionLockType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "COMPLIANCE", - "name": "COMPLIANCE" - }, - { - "value": "GOVERNANCE", - "name": "GOVERNANCE" - }, - { - "value": "NONE", - "name": "NONE" + "type": "enum", + "members": { + "COMPLIANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLIANCE" } - ] + }, + "GOVERNANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GOVERNANCE" + } + }, + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" + } + } } }, "com.amazonaws.storagegateway#RetrieveTapeArchive": { @@ -6774,7 +7944,20 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves an archived virtual tape from the virtual tape shelf (VTS) to a tape gateway.\n Virtual tapes archived in the VTS are not associated with any gateway. However after a tape\n is retrieved, it is associated with a gateway, even though it is also listed in the VTS,\n that is, archive. This operation is only supported in the tape gateway type.

\n\n

Once a tape is successfully retrieved to a gateway, it cannot be retrieved again to\n another gateway. You must archive the tape again before you can retrieve it to another\n gateway. This operation is only supported in the tape gateway type.

" + "smithy.api#documentation": "

Retrieves an archived virtual tape from the virtual tape shelf (VTS) to a tape gateway.\n Virtual tapes archived in the VTS are not associated with any gateway. However after a tape\n is retrieved, it is associated with a gateway, even though it is also listed in the VTS,\n that is, archive. This operation is only supported in the tape gateway type.

\n

Once a tape is successfully retrieved to a gateway, it cannot be retrieved again to\n another gateway. You must archive the tape again before you can retrieve it to another\n gateway. This operation is only supported in the tape gateway type.

", + "smithy.api#examples": [ + { + "title": "To retrieve an archived tape from the VTS", + "documentation": "Retrieves an archived virtual tape from the virtual tape shelf (VTS) to a gateway-VTL. Virtual tapes archived in the VTS are not associated with any gateway.", + "input": { + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST0AA2AF", + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B" + }, + "output": { + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST0AA2AF" + } + } + ] } }, "com.amazonaws.storagegateway#RetrieveTapeArchiveInput": { @@ -6790,13 +7973,14 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the gateway you want to retrieve the virtual tape to.\n Use the ListGateways operation to return a list of gateways for your\n account and Amazon Web Services Region.

\n\n

You retrieve archived virtual tapes to only one gateway and the gateway must be a tape\n gateway.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the gateway you want to retrieve the virtual tape to.\n Use the ListGateways operation to return a list of gateways for your\n account and Amazon Web Services Region.

\n

You retrieve archived virtual tapes to only one gateway and the gateway must be a tape\n gateway.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

RetrieveTapeArchiveInput

" + "smithy.api#documentation": "

RetrieveTapeArchiveInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#RetrieveTapeArchiveOutput": { @@ -6810,7 +7994,8 @@ } }, "traits": { - "smithy.api#documentation": "

RetrieveTapeArchiveOutput

" + "smithy.api#documentation": "

RetrieveTapeArchiveOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#RetrieveTapeRecoveryPoint": { @@ -6830,7 +8015,20 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves the recovery point for the specified virtual tape. This operation is only\n supported in the tape gateway type.

\n\n

A recovery point is a point in time view of a virtual tape at which all the data on the\n tape is consistent. If your gateway crashes, virtual tapes that have recovery points can be\n recovered to a new gateway.

\n\n \n

The virtual tape can be retrieved to only one gateway. The retrieved tape is\n read-only. The virtual tape can be retrieved to only a tape gateway. There is no charge\n for retrieving recovery points.

\n
" + "smithy.api#documentation": "

Retrieves the recovery point for the specified virtual tape. This operation is only\n supported in the tape gateway type.

\n

A recovery point is a point in time view of a virtual tape at which all the data on the\n tape is consistent. If your gateway crashes, virtual tapes that have recovery points can be\n recovered to a new gateway.

\n \n

The virtual tape can be retrieved to only one gateway. The retrieved tape is\n read-only. The virtual tape can be retrieved to only a tape gateway. There is no charge\n for retrieving recovery points.

\n
", + "smithy.api#examples": [ + { + "title": "To retrieve the recovery point of a virtual tape", + "documentation": "Retrieves the recovery point for the specified virtual tape.", + "input": { + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST0AA2AF", + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B" + }, + "output": { + "TapeARN": "arn:aws:storagegateway:us-east-1:999999999999:tape/TEST0AA2AF" + } + } + ] } }, "com.amazonaws.storagegateway#RetrieveTapeRecoveryPointInput": { @@ -6851,7 +8049,8 @@ } }, "traits": { - "smithy.api#documentation": "

RetrieveTapeRecoveryPointInput

" + "smithy.api#documentation": "

RetrieveTapeRecoveryPointInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#RetrieveTapeRecoveryPointOutput": { @@ -6865,7 +8064,8 @@ } }, "traits": { - "smithy.api#documentation": "

RetrieveTapeRecoveryPointOutput

" + "smithy.api#documentation": "

RetrieveTapeRecoveryPointOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#Role": { @@ -6898,7 +8098,7 @@ "target": "com.amazonaws.storagegateway#Boolean2", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -6919,7 +8119,7 @@ "DefaultStorageClass": { "target": "com.amazonaws.storagegateway#StorageClass", "traits": { - "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" + "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" } }, "ObjectACL": { @@ -6928,25 +8128,25 @@ "ReadOnly": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n

Valid Values: true | false\n

" } }, "GuessMIMETypeEnabled": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n

Valid Values: true | false\n

" } }, "RequesterPays": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n

Valid Values: true | false\n

" } }, "SMBACLEnabled": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

If this value is set to true, it indicates that access control list (ACL)\n is enabled on the SMB file share. If it is set to false, it indicates that\n file and directory permissions are mapped to the POSIX permission.

\n\n \n\n

For more information, see Using Microsoft Windows ACLs to\n control access to an SMB file share in the Storage Gateway User\n Guide.

" + "smithy.api#documentation": "

If this value is set to true, it indicates that access control list (ACL)\n is enabled on the SMB file share. If it is set to false, it indicates that\n file and directory permissions are mapped to the POSIX permission.

\n

For more information, see Using Microsoft Windows ACLs to\n control access to an SMB file share in the Storage Gateway User\n Guide.

" } }, "AccessBasedEnumeration": { @@ -6997,7 +8197,7 @@ "FileShareName": { "target": "com.amazonaws.storagegateway#FileShareName", "traits": { - "smithy.api#documentation": "

The name of the file share. Optional.

\n\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" + "smithy.api#documentation": "

The name of the file share. Optional.

\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" } }, "CacheAttributes": { @@ -7009,7 +8209,7 @@ "NotificationPolicy": { "target": "com.amazonaws.storagegateway#NotificationPolicy", "traits": { - "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n\n

The following example sets NotificationPolicy off.

\n\n

\n {}\n

" + "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n

The following example sets NotificationPolicy off.

\n

\n {}\n

" } }, "VPCEndpointDNSName": { @@ -7067,22 +8267,26 @@ } }, "com.amazonaws.storagegateway#SMBSecurityStrategy": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ClientSpecified", - "name": "ClientSpecified" - }, - { - "value": "MandatorySigning", - "name": "MandatorySigning" - }, - { - "value": "MandatoryEncryption", - "name": "MandatoryEncryption" + "type": "enum", + "members": { + "ClientSpecified": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ClientSpecified" } - ] + }, + "MandatorySigning": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MandatorySigning" + } + }, + "MandatoryEncryption": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MandatoryEncryption" + } + } } }, "com.amazonaws.storagegateway#ServiceUnavailableError": { @@ -7124,7 +8328,20 @@ } ], "traits": { - "smithy.api#documentation": "

Sets the password for your VM local console. When you log in to the local console for\n the first time, you log in to the VM with the default credentials. We recommend that you\n set a new password. You don't need to know the default password to set a new\n password.

" + "smithy.api#documentation": "

Sets the password for your VM local console. When you log in to the local console for\n the first time, you log in to the VM with the default credentials. We recommend that you\n set a new password. You don't need to know the default password to set a new\n password.

", + "smithy.api#examples": [ + { + "title": "To set a password for your VM", + "documentation": "Sets the password for your VM local console.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B", + "LocalConsolePassword": "PassWordMustBeAtLeast6Chars." + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#SetLocalConsolePasswordInput": { @@ -7145,7 +8362,8 @@ } }, "traits": { - "smithy.api#documentation": "

SetLocalConsolePasswordInput

" + "smithy.api#documentation": "

SetLocalConsolePasswordInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#SetLocalConsolePasswordOutput": { @@ -7154,6 +8372,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#SetSMBGuestPassword": { @@ -7195,7 +8416,8 @@ } }, "traits": { - "smithy.api#documentation": "

SetSMBGuestPasswordInput

" + "smithy.api#documentation": "

SetSMBGuestPasswordInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#SetSMBGuestPasswordOutput": { @@ -7204,6 +8426,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#ShutdownGateway": { @@ -7223,7 +8448,19 @@ } ], "traits": { - "smithy.api#documentation": "

Shuts down a gateway. To specify which gateway to shut down, use the Amazon Resource\n Name (ARN) of the gateway in the body of your request.

\n\n

The operation shuts down the gateway service component running in the gateway's\n virtual machine (VM) and not the host VM.

\n\n \n

If you want to shut down the VM, it is recommended that you first shut down the\n gateway component in the VM to avoid unpredictable conditions.

\n
\n\n

After the gateway is shutdown, you cannot call any other API except StartGateway, DescribeGatewayInformation, and ListGateways. For more information, see ActivateGateway.\n Your applications cannot read from or write to the gateway's storage volumes, and\n there are no snapshots taken.

\n\n \n

When you make a shutdown request, you will get a 200 OK success response\n immediately. However, it might take some time for the gateway to shut down. You can call\n the DescribeGatewayInformation API to check the status. For more\n information, see ActivateGateway.

\n
\n\n

If do not intend to use the gateway again, you must delete the gateway (using DeleteGateway) to no longer pay software charges associated with the\n gateway.

" + "smithy.api#documentation": "

Shuts down a gateway. To specify which gateway to shut down, use the Amazon Resource\n Name (ARN) of the gateway in the body of your request.

\n

The operation shuts down the gateway service component running in the gateway's\n virtual machine (VM) and not the host VM.

\n \n

If you want to shut down the VM, it is recommended that you first shut down the\n gateway component in the VM to avoid unpredictable conditions.

\n
\n

After the gateway is shutdown, you cannot call any other API except StartGateway, DescribeGatewayInformation, and ListGateways. For more information, see ActivateGateway.\n Your applications cannot read from or write to the gateway's storage volumes, and\n there are no snapshots taken.

\n \n

When you make a shutdown request, you will get a 200 OK success response\n immediately. However, it might take some time for the gateway to shut down. You can call\n the DescribeGatewayInformation API to check the status. For more\n information, see ActivateGateway.

\n
\n

If do not intend to use the gateway again, you must delete the gateway (using DeleteGateway) to no longer pay software charges associated with the\n gateway.

", + "smithy.api#examples": [ + { + "title": "To shut down a gateway service", + "documentation": "This operation shuts down the gateway service component running in the storage gateway's virtual machine (VM) and not the VM.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#ShutdownGatewayInput": { @@ -7237,7 +8474,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway to shut\n down.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway to shut\n down.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#ShutdownGatewayOutput": { @@ -7248,7 +8486,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway that was shut\n down.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway that was shut\n down.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#SnapshotDescription": { @@ -7278,7 +8517,7 @@ "com.amazonaws.storagegateway#Squash": { "type": "string", "traits": { - "smithy.api#documentation": "

The user mapped to anonymous user. Valid options are the following:

\n\n
    \n
  • \n

    \n RootSquash: Only root is mapped to anonymous user.

    \n
  • \n
  • \n

    \n NoSquash: No one is mapped to anonymous user.

    \n
  • \n
  • \n

    \n AllSquash: Everyone is mapped to anonymous user.

    \n
  • \n
", + "smithy.api#documentation": "

The user mapped to anonymous user. Valid options are the following:

\n
    \n
  • \n

    \n RootSquash: Only root is mapped to anonymous user.

    \n
  • \n
  • \n

    \n NoSquash: No one is mapped to anonymous user.

    \n
  • \n
  • \n

    \n AllSquash: Everyone is mapped to anonymous user.

    \n
  • \n
", "smithy.api#length": { "min": 5, "max": 15 @@ -7314,6 +8553,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#StartAvailabilityMonitorTestOutput": { @@ -7322,6 +8564,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#StartGateway": { @@ -7341,7 +8586,19 @@ } ], "traits": { - "smithy.api#documentation": "

Starts a gateway that you previously shut down (see ShutdownGateway).\n After the gateway starts, you can then make other API calls, your applications can read\n from or write to the gateway's storage volumes and you will be able to take snapshot\n backups.

\n\n \n

When you make a request, you will get a 200 OK success response immediately. However,\n it might take some time for the gateway to be ready. You should call DescribeGatewayInformation and check the status before making any\n additional API calls. For more information, see ActivateGateway.

\n
\n\n

To specify which gateway to start, use the Amazon Resource Name (ARN) of the gateway in\n your request.

" + "smithy.api#documentation": "

Starts a gateway that you previously shut down (see ShutdownGateway).\n After the gateway starts, you can then make other API calls, your applications can read\n from or write to the gateway's storage volumes and you will be able to take snapshot\n backups.

\n \n

When you make a request, you will get a 200 OK success response immediately. However,\n it might take some time for the gateway to be ready. You should call DescribeGatewayInformation and check the status before making any\n additional API calls. For more information, see ActivateGateway.

\n
\n

To specify which gateway to start, use the Amazon Resource Name (ARN) of the gateway in\n your request.

", + "smithy.api#examples": [ + { + "title": "To start a gateway service", + "documentation": "Starts a gateway service that was previously shut down.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#StartGatewayInput": { @@ -7355,7 +8612,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway to start.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway to start.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#StartGatewayOutput": { @@ -7366,7 +8624,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway that was\n restarted.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway that was\n restarted.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#StorageClass": { @@ -7680,13 +8939,14 @@ "arnNamespace": "storagegateway", "cloudFormationName": "StorageGateway", "cloudTrailEventSource": "storagegateway.amazonaws.com", + "docId": "storagegateway-2013-06-30", "endpointPrefix": "storagegateway" }, "aws.auth#sigv4": { "name": "storagegateway" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "Storage Gateway Service\n\n

Storage Gateway is the service that connects an on-premises software appliance\n with cloud-based storage to provide seamless and secure integration between an\n organization's on-premises IT environment and the Amazon Web Services storage\n infrastructure. The service enables you to securely upload data to the Amazon Web Services Cloud for cost effective backup and rapid disaster recovery.

\n\n

Use the following links to get started using the Storage Gateway\n Service API Reference:

\n\n
    \n
  • \n

    \n Storage Gateway required request headers: Describes the required\n headers that you must send with every POST request to Storage Gateway.

    \n
  • \n
  • \n

    \n Signing requests: Storage Gateway requires that you authenticate\n every request you send; this topic describes how sign such a request.

    \n
  • \n
  • \n

    \n Error responses: Provides reference information about Storage Gateway errors.

    \n
  • \n
  • \n

    \n Operations in Storage Gateway: Contains detailed descriptions of all Storage Gateway operations, their request parameters, response elements, possible errors, and\n examples of requests and responses.

    \n
  • \n
  • \n

    \n Storage Gateway\n endpoints and quotas: Provides a list of each Amazon Web Services Region\n and the endpoints available for use with Storage Gateway.

    \n
  • \n
\n\n \n

Storage Gateway resource IDs are in uppercase. When you use these resource IDs\n with the Amazon EC2 API, EC2 expects resource IDs in lowercase. You must change\n your resource ID to lowercase to use it with the EC2 API. For example, in Storage\n Gateway the ID for a volume might be vol-AA22BB012345DAF670. When you use\n this ID with the EC2 API, you must change it to vol-aa22bb012345daf670.\n Otherwise, the EC2 API might not behave as expected.

\n
\n\n \n

IDs for Storage Gateway volumes and Amazon EBS snapshots created from gateway\n volumes are changing to a longer format. Starting in December 2016, all new volumes and\n snapshots will be created with a 17-character string. Starting in April 2016, you will\n be able to use these longer IDs so you can test your systems with the new format. For\n more information, see Longer EC2 and\n EBS resource IDs.

\n\n

For example, a volume Amazon Resource Name (ARN) with the longer volume ID format\n looks like the following:

\n\n

\n arn:aws:storagegateway:us-west-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABBCCDDEEFFG.

\n\n

A snapshot ID with the longer ID format looks like the following:\n snap-78e226633445566ee.

\n\n

For more information, see Announcement:\n Heads-up – Longer Storage Gateway volume and snapshot IDs coming in\n 2016.

\n
", + "smithy.api#documentation": "Storage Gateway Service\n

Storage Gateway is the service that connects an on-premises software appliance\n with cloud-based storage to provide seamless and secure integration between an\n organization's on-premises IT environment and the Amazon Web Services storage\n infrastructure. The service enables you to securely upload data to the Amazon Web Services Cloud for cost effective backup and rapid disaster recovery.

\n

Use the following links to get started using the Storage Gateway\n Service API Reference:

\n
    \n
  • \n

    \n Storage Gateway required request headers: Describes the required\n headers that you must send with every POST request to Storage Gateway.

    \n
  • \n
  • \n

    \n Signing requests: Storage Gateway requires that you authenticate\n every request you send; this topic describes how sign such a request.

    \n
  • \n
  • \n

    \n Error responses: Provides reference information about Storage Gateway errors.

    \n
  • \n
  • \n

    \n Operations in Storage Gateway: Contains detailed descriptions of all Storage Gateway operations, their request parameters, response elements, possible errors, and\n examples of requests and responses.

    \n
  • \n
  • \n

    \n Storage Gateway\n endpoints and quotas: Provides a list of each Amazon Web Services Region\n and the endpoints available for use with Storage Gateway.

    \n
  • \n
\n \n

Storage Gateway resource IDs are in uppercase. When you use these resource IDs\n with the Amazon EC2 API, EC2 expects resource IDs in lowercase. You must change\n your resource ID to lowercase to use it with the EC2 API. For example, in Storage\n Gateway the ID for a volume might be vol-AA22BB012345DAF670. When you use\n this ID with the EC2 API, you must change it to vol-aa22bb012345daf670.\n Otherwise, the EC2 API might not behave as expected.

\n
\n \n

IDs for Storage Gateway volumes and Amazon EBS snapshots created from gateway\n volumes are changing to a longer format. Starting in December 2016, all new volumes and\n snapshots will be created with a 17-character string. Starting in April 2016, you will\n be able to use these longer IDs so you can test your systems with the new format. For\n more information, see Longer EC2 and\n EBS resource IDs.

\n

For example, a volume Amazon Resource Name (ARN) with the longer volume ID format\n looks like the following:

\n

\n arn:aws:storagegateway:us-west-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABBCCDDEEFFG.

\n

A snapshot ID with the longer ID format looks like the following:\n snap-78e226633445566ee.

\n

For more information, see Announcement:\n Heads-up – Longer Storage Gateway volume and snapshot IDs coming in\n 2016.

\n
", "smithy.api#title": "AWS Storage Gateway", "smithy.api#xmlNamespace": { "uri": "http://storagegateway.amazonaws.com/doc/2013-06-30" @@ -7751,52 +9011,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -7804,13 +9068,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -7820,224 +9093,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://storagegateway-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://storagegateway-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], "type": "tree", "rules": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://storagegateway-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, + "conditions": [], + "endpoint": { + "url": "https://storagegateway-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } + "ref": "UseDualStack" + }, + true ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://storagegateway.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://storagegateway.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://storagegateway.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://storagegateway.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -8052,8 +9276,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8065,8 +9289,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8078,8 +9302,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8091,8 +9315,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8104,8 +9328,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8117,8 +9341,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8130,8 +9354,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8143,8 +9367,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8156,8 +9380,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8169,8 +9393,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8182,8 +9406,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8195,8 +9419,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8208,8 +9432,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8221,8 +9445,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8234,8 +9458,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8247,8 +9471,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8260,8 +9484,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8273,8 +9497,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8286,8 +9510,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8299,8 +9523,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8312,8 +9536,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8325,8 +9549,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8338,8 +9562,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8351,8 +9575,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8364,8 +9588,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8377,8 +9601,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8390,8 +9614,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8403,8 +9627,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -8416,8 +9640,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -8429,8 +9653,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8442,8 +9666,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8455,8 +9679,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -8468,8 +9692,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8481,8 +9705,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -8494,8 +9718,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8507,8 +9731,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8520,8 +9744,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8533,8 +9757,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8546,8 +9770,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -8559,8 +9783,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -8572,8 +9807,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -8585,8 +9831,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -8598,8 +9855,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -8611,8 +9879,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8624,8 +9892,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -8637,8 +9905,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -8649,8 +9917,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -8661,10 +9929,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -8733,7 +10007,7 @@ "target": "com.amazonaws.storagegateway#Boolean2", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Indicates if when the stored volume was created, existing data on the underlying local\n disk was preserved.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Indicates if when the stored volume was created, existing data on the underlying local\n disk was preserved.

\n

Valid Values: true | false\n

" } }, "VolumeiSCSIAttributes": { @@ -8751,7 +10025,7 @@ "VolumeUsedInBytes": { "target": "com.amazonaws.storagegateway#VolumeUsedInBytes", "traits": { - "smithy.api#documentation": "

The size of the data stored on the volume in bytes. This value is calculated based on\n the number of blocks that are touched, instead of the actual amount of data written. This\n value can be useful for sequential write patterns but less accurate for random write\n patterns. VolumeUsedInBytes is different from the compressed size of the\n volume, which is the value that is used to calculate your bill.

\n\n \n

This value is not available for volumes created prior to May 13, 2015, until you\n store data on the volume.

\n
" + "smithy.api#documentation": "

The size of the data stored on the volume in bytes. This value is calculated based on\n the number of blocks that are touched, instead of the actual amount of data written. This\n value can be useful for sequential write patterns but less accurate for random write\n patterns. VolumeUsedInBytes is different from the compressed size of the\n volume, which is the value that is used to calculate your bill.

\n \n

This value is not available for volumes created prior to May 13, 2015, until you\n store data on the volume.

\n
" } }, "KMSKey": { @@ -8760,7 +10034,7 @@ "TargetName": { "target": "com.amazonaws.storagegateway#TargetName", "traits": { - "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

" + "smithy.api#documentation": "

The name of the iSCSI target used by an initiator to connect to a volume and used as a\n suffix for the target ARN. For example, specifying TargetName as\n myvolume results in the target ARN of\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume.\n The target name must be unique across all volumes on a gateway.

\n

If you don't specify a value, Storage Gateway uses the value that was previously\n used for this volume as the new target name.

" } } }, @@ -8875,13 +10149,13 @@ "Progress": { "target": "com.amazonaws.storagegateway#DoubleObject", "traits": { - "smithy.api#documentation": "

For archiving virtual tapes, indicates how much data remains to be uploaded before\n archiving is complete.

\n\n

Range: 0 (not started) to 100 (complete).

" + "smithy.api#documentation": "

For archiving virtual tapes, indicates how much data remains to be uploaded before\n archiving is complete.

\n

Range: 0 (not started) to 100 (complete).

" } }, "TapeUsedInBytes": { "target": "com.amazonaws.storagegateway#TapeUsage", "traits": { - "smithy.api#documentation": "

The size, in bytes, of data stored on the virtual tape.

\n\n \n

This value is not available for tapes created prior to May 13, 2015.

\n
" + "smithy.api#documentation": "

The size, in bytes, of data stored on the virtual tape.

\n \n

This value is not available for tapes created prior to May 13, 2015.

\n
" } }, "KMSKey": { @@ -8966,13 +10240,13 @@ "CompletionTime": { "target": "com.amazonaws.storagegateway#Time", "traits": { - "smithy.api#documentation": "

The time that the archiving of the virtual tape was completed.

\n\n

The default timestamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z'\n format.

" + "smithy.api#documentation": "

The time that the archiving of the virtual tape was completed.

\n

The default timestamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z'\n format.

" } }, "RetrievedTo": { "target": "com.amazonaws.storagegateway#GatewayARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the tape gateway that the virtual tape is being\n retrieved to.

\n\n

The virtual tape is retrieved from the virtual tape shelf (VTS).

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the tape gateway that the virtual tape is being\n retrieved to.

\n

The virtual tape is retrieved from the virtual tape shelf (VTS).

" } }, "TapeStatus": { @@ -8984,7 +10258,7 @@ "TapeUsedInBytes": { "target": "com.amazonaws.storagegateway#TapeUsage", "traits": { - "smithy.api#documentation": "

The size, in bytes, of data stored on the virtual tape.

\n\n \n

This value is not available for tapes created prior to May 13, 2015.

\n
" + "smithy.api#documentation": "

The size, in bytes, of data stored on the virtual tape.

\n \n

This value is not available for tapes created prior to May 13, 2015.

\n
" } }, "KMSKey": { @@ -9012,7 +10286,7 @@ "PoolEntryDate": { "target": "com.amazonaws.storagegateway#Time", "traits": { - "smithy.api#documentation": "

The time that the tape entered the custom tape pool.

\n\n

The default timestamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z'\n format.

" + "smithy.api#documentation": "

The time that the tape entered the custom tape pool.

\n

The default timestamp format is in the ISO8601 extended YYYY-MM-DD'T'HH:MM:SS'Z'\n format.

" } } }, @@ -9135,7 +10409,7 @@ "TapeRecoveryPointTime": { "target": "com.amazonaws.storagegateway#Time", "traits": { - "smithy.api#documentation": "

The time when the point-in-time view of the virtual tape was replicated for later\n recovery.

\n\n

The default timestamp format of the tape recovery point time is in the ISO8601 extended\n YYYY-MM-DD'T'HH:MM:SS'Z' format.

" + "smithy.api#documentation": "

The time when the point-in-time view of the virtual tape was replicated for later\n recovery.

\n

The default timestamp format of the tape recovery point time is in the ISO8601 extended\n YYYY-MM-DD'T'HH:MM:SS'Z' format.

" } }, "TapeSizeInBytes": { @@ -9171,18 +10445,20 @@ "type": "string" }, "com.amazonaws.storagegateway#TapeStorageClass": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DEEP_ARCHIVE", - "name": "DEEP_ARCHIVE" - }, - { - "value": "GLACIER", - "name": "GLACIER" + "type": "enum", + "members": { + "DEEP_ARCHIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DEEP_ARCHIVE" } - ] + }, + "GLACIER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GLACIER" + } + } } }, "com.amazonaws.storagegateway#TapeUsage": { @@ -9242,7 +10518,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the automatic tape creation policy of a gateway. Use this to update the policy\n with a new set of automatic tape creation rules. This is only supported for tape\n gateways.

\n\n

By default, there is no automatic tape creation policy.

\n\n \n

A gateway can have only one automatic tape creation policy.

\n
" + "smithy.api#documentation": "

Updates the automatic tape creation policy of a gateway. Use this to update the policy\n with a new set of automatic tape creation rules. This is only supported for tape\n gateways.

\n

By default, there is no automatic tape creation policy.

\n \n

A gateway can have only one automatic tape creation policy.

\n
" } }, "com.amazonaws.storagegateway#UpdateAutomaticTapeCreationPolicyInput": { @@ -9261,6 +10537,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateAutomaticTapeCreationPolicyOutput": { @@ -9269,6 +10548,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateBandwidthRateLimit": { @@ -9288,7 +10570,21 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the bandwidth rate limits of a gateway. You can update both the upload and\n download bandwidth rate limit or specify only one of the two. If you don't set a\n bandwidth rate limit, the existing rate limit remains. This operation is supported only for\n the stored volume, cached volume, and tape gateway types. To update bandwidth rate limits\n for S3 file gateways, use UpdateBandwidthRateLimitSchedule.

\n\n

By default, a gateway's bandwidth rate limits are not set. If you don't set\n any limit, the gateway does not have any limitations on its bandwidth usage and could\n potentially use the maximum available bandwidth.

\n\n

To specify which gateway to update, use the Amazon Resource Name (ARN) of the gateway in\n your request.

" + "smithy.api#documentation": "

Updates the bandwidth rate limits of a gateway. You can update both the upload and\n download bandwidth rate limit or specify only one of the two. If you don't set a\n bandwidth rate limit, the existing rate limit remains. This operation is supported only for\n the stored volume, cached volume, and tape gateway types. To update bandwidth rate limits\n for S3 file gateways, use UpdateBandwidthRateLimitSchedule.

\n

By default, a gateway's bandwidth rate limits are not set. If you don't set\n any limit, the gateway does not have any limitations on its bandwidth usage and could\n potentially use the maximum available bandwidth.

\n

To specify which gateway to update, use the Amazon Resource Name (ARN) of the gateway in\n your request.

", + "smithy.api#examples": [ + { + "title": "To update the bandwidth rate limits of a gateway", + "documentation": "Updates the bandwidth rate limits of a gateway. Both the upload and download bandwidth rate limit can be set, or either one of the two. If a new limit is not set, the existing rate limit remains.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "AverageUploadRateLimitInBitsPerSec": 51200, + "AverageDownloadRateLimitInBitsPerSec": 102400 + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#UpdateBandwidthRateLimitInput": { @@ -9314,7 +10610,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateBandwidthRateLimitOutput": { @@ -9325,7 +10622,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway whose throttle\n information was updated.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway whose throttle\n information was updated.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateBandwidthRateLimitSchedule": { @@ -9364,6 +10662,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateBandwidthRateLimitScheduleOutput": { @@ -9372,6 +10673,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateChapCredentials": { @@ -9391,7 +10695,23 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials for a\n specified iSCSI target. By default, a gateway does not have CHAP enabled; however, for\n added security, you might use it. This operation is supported in the volume and tape\n gateway types.

\n\n \n

When you update CHAP credentials, all existing connections on the target are closed\n and initiators must reconnect with the new credentials.

\n
" + "smithy.api#documentation": "

Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials for a\n specified iSCSI target. By default, a gateway does not have CHAP enabled; however, for\n added security, you might use it. This operation is supported in the volume and tape\n gateway types.

\n \n

When you update CHAP credentials, all existing connections on the target are closed\n and initiators must reconnect with the new credentials.

\n
", + "smithy.api#examples": [ + { + "title": "To update CHAP credentials for an iSCSI target", + "documentation": "Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target.", + "input": { + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume", + "SecretToAuthenticateInitiator": "111111111111", + "InitiatorName": "iqn.1991-05.com.microsoft:computername.domain.example.com", + "SecretToAuthenticateTarget": "222222222222" + }, + "output": { + "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume", + "InitiatorName": "iqn.1991-05.com.microsoft:computername.domain.example.com" + } + } + ] } }, "com.amazonaws.storagegateway#UpdateChapCredentialsInput": { @@ -9407,7 +10727,7 @@ "SecretToAuthenticateInitiator": { "target": "com.amazonaws.storagegateway#ChapSecret", "traits": { - "smithy.api#documentation": "

The secret key that the initiator (for example, the Windows client) must provide to\n participate in mutual CHAP with the target.

\n\n \n

The secret key must be between 12 and 16 bytes when encoded in UTF-8.

\n
", + "smithy.api#documentation": "

The secret key that the initiator (for example, the Windows client) must provide to\n participate in mutual CHAP with the target.

\n \n

The secret key must be between 12 and 16 bytes when encoded in UTF-8.

\n
", "smithy.api#required": {} } }, @@ -9421,12 +10741,13 @@ "SecretToAuthenticateTarget": { "target": "com.amazonaws.storagegateway#ChapSecret", "traits": { - "smithy.api#documentation": "

The secret key that the target must provide to participate in mutual CHAP with the\n initiator (e.g. Windows client).

\n\n

Byte constraints: Minimum bytes of 12. Maximum bytes of 16.

\n\n \n

The secret key must be between 12 and 16 bytes when encoded in UTF-8.

\n
" + "smithy.api#documentation": "

The secret key that the target must provide to participate in mutual CHAP with the\n initiator (e.g. Windows client).

\n

Byte constraints: Minimum bytes of 12. Maximum bytes of 16.

\n \n

The secret key must be between 12 and 16 bytes when encoded in UTF-8.

\n
" } } }, "traits": { - "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateChapCredentialsOutput": { @@ -9446,7 +10767,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

" + "smithy.api#documentation": "

A JSON object containing the following fields:

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateFileSystemAssociation": { @@ -9500,6 +10822,9 @@ "CacheAttributes": { "target": "com.amazonaws.storagegateway#CacheAttributes" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateFileSystemAssociationOutput": { @@ -9511,6 +10836,9 @@ "smithy.api#documentation": "

The ARN of the updated file system association.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateGatewayInformation": { @@ -9530,7 +10858,22 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a gateway's metadata, which includes the gateway's name and time zone.\n To specify which gateway to update, use the Amazon Resource Name (ARN) of the gateway in\n your request.

\n\n \n

For gateways activated after September 2, 2015, the gateway's ARN contains the\n gateway ID rather than the gateway name. However, changing the name of the gateway has\n no effect on the gateway's ARN.

\n
" + "smithy.api#documentation": "

Updates a gateway's metadata, which includes the gateway's name and time zone.\n To specify which gateway to update, use the Amazon Resource Name (ARN) of the gateway in\n your request.

\n \n

For gateways activated after September 2, 2015, the gateway's ARN contains the\n gateway ID rather than the gateway name. However, changing the name of the gateway has\n no effect on the gateway's ARN.

\n
", + "smithy.api#examples": [ + { + "title": "To update a gateway's metadata", + "documentation": "Updates a gateway's metadata, which includes the gateway's name and time zone.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "GatewayName": "MyGateway2", + "GatewayTimezone": "GMT-12:00" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "GatewayName": "" + } + } + ] } }, "com.amazonaws.storagegateway#UpdateGatewayInformationInput": { @@ -9554,7 +10897,7 @@ "CloudWatchLogGroupARN": { "target": "com.amazonaws.storagegateway#CloudWatchLogGroupARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that you want to use\n to monitor and log events in the gateway.

\n\n

For more information, see What is Amazon CloudWatch\n Logs?\n

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that you want to use\n to monitor and log events in the gateway.

\n

For more information, see What is Amazon CloudWatch\n Logs?\n

" } }, "GatewayCapacity": { @@ -9563,6 +10906,9 @@ "smithy.api#documentation": "

Specifies the size of the gateway's metadata cache.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateGatewayInformationOutput": { @@ -9579,7 +10925,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway that was\n updated.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway that was\n updated.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateGatewaySoftwareNow": { @@ -9599,7 +10946,19 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the gateway virtual machine (VM) software. The request immediately triggers the\n software update.

\n\n \n

When you make this request, you get a 200 OK success response\n immediately. However, it might take some time for the update to complete. You can call\n DescribeGatewayInformation to verify the gateway is in the\n STATE_RUNNING state.

\n
\n\n \n

A software update forces a system restart of your gateway. You can minimize the\n chance of any disruption to your applications by increasing your iSCSI Initiators'\n timeouts. For more information about increasing iSCSI Initiator timeouts for Windows and\n Linux, see Customizing your Windows iSCSI settings and Customizing your Linux iSCSI settings, respectively.

\n
" + "smithy.api#documentation": "

Updates the gateway virtual machine (VM) software. The request immediately triggers the\n software update.

\n \n

When you make this request, you get a 200 OK success response\n immediately. However, it might take some time for the update to complete. You can call\n DescribeGatewayInformation to verify the gateway is in the\n STATE_RUNNING state.

\n
\n \n

A software update forces a system restart of your gateway. You can minimize the\n chance of any disruption to your applications by increasing your iSCSI Initiators'\n timeouts. For more information about increasing iSCSI Initiator timeouts for Windows and\n Linux, see Customizing your Windows iSCSI settings and Customizing your Linux iSCSI settings, respectively.

\n
", + "smithy.api#examples": [ + { + "title": "To update a gateway's VM software", + "documentation": "Updates the gateway virtual machine (VM) software. The request immediately triggers the software update.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#UpdateGatewaySoftwareNowInput": { @@ -9613,7 +10972,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway to update.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway to update.

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateGatewaySoftwareNowOutput": { @@ -9624,7 +10984,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway that was\n updated.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway that was\n updated.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateMaintenanceStartTime": { @@ -9644,7 +11005,22 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a gateway's weekly maintenance start time information, including day and\n time of the week. The maintenance time is the time in your gateway's time zone.

" + "smithy.api#documentation": "

Updates a gateway's weekly maintenance start time information, including day and\n time of the week. The maintenance time is the time in your gateway's time zone.

", + "smithy.api#examples": [ + { + "title": "To update a gateway's maintenance start time", + "documentation": "Updates a gateway's weekly maintenance start time information, including day and time of the week. The maintenance time is in your gateway's time zone.", + "input": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B", + "HourOfDay": 0, + "MinuteOfHour": 30, + "DayOfWeek": 2 + }, + "output": { + "GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B" + } + } + ] } }, "com.amazonaws.storagegateway#UpdateMaintenanceStartTimeInput": { @@ -9684,7 +11060,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateMaintenanceStartTimeOutput": { @@ -9695,7 +11072,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway whose maintenance\n start time is updated.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the gateway whose maintenance\n start time is updated.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateNFSFileShare": { @@ -9715,7 +11093,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a Network File System (NFS) file share. This operation is only supported in S3\n File Gateways.

\n\n \n

To leave a file share field unchanged, set the corresponding input field to\n null.

\n
\n\n

Updates the following file share settings:

\n\n
    \n
  • \n

    Default storage class for your S3 bucket

    \n
  • \n
  • \n

    Metadata defaults for your S3 bucket

    \n
  • \n
  • \n

    Allowed NFS clients for your file share

    \n
  • \n
  • \n

    Squash settings

    \n
  • \n
  • \n

    Write status of your file share

    \n
  • \n
" + "smithy.api#documentation": "

Updates a Network File System (NFS) file share. This operation is only supported in S3\n File Gateways.

\n \n

To leave a file share field unchanged, set the corresponding input field to\n null.

\n
\n

Updates the following file share settings:

\n
    \n
  • \n

    Default storage class for your S3 bucket

    \n
  • \n
  • \n

    Metadata defaults for your S3 bucket

    \n
  • \n
  • \n

    Allowed NFS clients for your file share

    \n
  • \n
  • \n

    Squash settings

    \n
  • \n
  • \n

    Write status of your file share

    \n
  • \n
" } }, "com.amazonaws.storagegateway#UpdateNFSFileShareInput": { @@ -9731,7 +11109,7 @@ "KMSEncrypted": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -9749,7 +11127,7 @@ "DefaultStorageClass": { "target": "com.amazonaws.storagegateway#StorageClass", "traits": { - "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" + "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" } }, "ObjectACL": { @@ -9767,31 +11145,31 @@ "Squash": { "target": "com.amazonaws.storagegateway#Squash", "traits": { - "smithy.api#documentation": "

The user mapped to anonymous user.

\n\n

Valid values are the following:

\n\n
    \n
  • \n

    \n RootSquash: Only root is mapped to anonymous user.

    \n
  • \n
  • \n

    \n NoSquash: No one is mapped to anonymous user.

    \n
  • \n
  • \n

    \n AllSquash: Everyone is mapped to anonymous user.

    \n
  • \n
" + "smithy.api#documentation": "

The user mapped to anonymous user.

\n

Valid values are the following:

\n
    \n
  • \n

    \n RootSquash: Only root is mapped to anonymous user.

    \n
  • \n
  • \n

    \n NoSquash: No one is mapped to anonymous user.

    \n
  • \n
  • \n

    \n AllSquash: Everyone is mapped to anonymous user.

    \n
  • \n
" } }, "ReadOnly": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set the write status to read-only, otherwise set to false.

\n

Valid Values: true | false\n

" } }, "GuessMIMETypeEnabled": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n

Valid Values: true | false\n

" } }, "RequesterPays": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n

Valid Values: true | false\n

" } }, "FileShareName": { "target": "com.amazonaws.storagegateway#FileShareName", "traits": { - "smithy.api#documentation": "

The name of the file share. Optional.

\n\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" + "smithy.api#documentation": "

The name of the file share. Optional.

\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" } }, "CacheAttributes": { @@ -9803,7 +11181,7 @@ "NotificationPolicy": { "target": "com.amazonaws.storagegateway#NotificationPolicy", "traits": { - "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n\n

The following example sets NotificationPolicy off.

\n\n

\n {}\n

" + "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n

The following example sets NotificationPolicy off.

\n

\n {}\n

" } }, "AuditDestinationARN": { @@ -9814,7 +11192,8 @@ } }, "traits": { - "smithy.api#documentation": "

UpdateNFSFileShareInput

" + "smithy.api#documentation": "

UpdateNFSFileShareInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateNFSFileShareOutput": { @@ -9828,7 +11207,8 @@ } }, "traits": { - "smithy.api#documentation": "

UpdateNFSFileShareOutput

" + "smithy.api#documentation": "

UpdateNFSFileShareOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateSMBFileShare": { @@ -9848,7 +11228,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a Server Message Block (SMB) file share. This operation is only supported for S3\n File Gateways.

\n\n \n

To leave a file share field unchanged, set the corresponding input field to\n null.

\n
\n\n \n

File gateways require Security Token Service (Amazon Web Services STS) to be\n activated to enable you to create a file share. Make sure that Amazon Web Services STS\n is activated in the Amazon Web Services Region you are creating your file gateway in. If\n Amazon Web Services STS is not activated in this Amazon Web Services Region, activate\n it. For information about how to activate Amazon Web Services STS, see Activating and\n deactivating Amazon Web Services STS in an Amazon Web Services Region in the\n Identity and Access Management User Guide.

\n\n

File gateways don't support creating hard or symbolic links on a file\n share.

\n
" + "smithy.api#documentation": "

Updates a Server Message Block (SMB) file share. This operation is only supported for S3\n File Gateways.

\n \n

To leave a file share field unchanged, set the corresponding input field to\n null.

\n
\n \n

File gateways require Security Token Service (Amazon Web Services STS) to be\n activated to enable you to create a file share. Make sure that Amazon Web Services STS\n is activated in the Amazon Web Services Region you are creating your file gateway in. If\n Amazon Web Services STS is not activated in this Amazon Web Services Region, activate\n it. For information about how to activate Amazon Web Services STS, see Activating and\n deactivating Amazon Web Services STS in an Amazon Web Services Region in the\n Identity and Access Management User Guide.

\n

File gateways don't support creating hard or symbolic links on a file\n share.

\n
" } }, "com.amazonaws.storagegateway#UpdateSMBFileShareInput": { @@ -9864,7 +11244,7 @@ "KMSEncrypted": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set to true to use Amazon S3 server-side encryption with your own\n KMS key, or false to use a key managed by Amazon S3.\n Optional.

\n

Valid Values: true | false\n

" } }, "KMSKey": { @@ -9876,7 +11256,7 @@ "DefaultStorageClass": { "target": "com.amazonaws.storagegateway#StorageClass", "traits": { - "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" + "smithy.api#documentation": "

The default storage class for objects put into an Amazon S3 bucket by the S3\n File Gateway. The default value is S3_STANDARD. Optional.

\n

Valid Values: S3_STANDARD | S3_INTELLIGENT_TIERING |\n S3_STANDARD_IA | S3_ONEZONE_IA\n

" } }, "ObjectACL": { @@ -9888,25 +11268,25 @@ "ReadOnly": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set write status to read-only, otherwise set to false.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets the write status of a file share. Set this value to true\n to set write status to read-only, otherwise set to false.

\n

Valid Values: true | false\n

" } }, "GuessMIMETypeEnabled": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that enables guessing of the MIME type for uploaded objects based on file\n extensions. Set this value to true to enable MIME type guessing, otherwise set\n to false. The default value is true.

\n

Valid Values: true | false\n

" } }, "RequesterPays": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

A value that sets who pays the cost of the request and the cost associated with data\n download from the S3 bucket. If this value is set to true, the requester pays\n the costs; otherwise, the S3 bucket owner pays. However, the S3 bucket owner always pays\n the cost of storing data.

\n \n

\n RequesterPays is a configuration for the S3 bucket that backs the file\n share, so make sure that the configuration on the file share is the same as the S3\n bucket configuration.

\n
\n

Valid Values: true | false\n

" } }, "SMBACLEnabled": { "target": "com.amazonaws.storagegateway#Boolean", "traits": { - "smithy.api#documentation": "

Set this value to true to enable access control list (ACL) on the SMB file\n share. Set it to false to map file and directory permissions to the POSIX\n permissions.

\n\n \n\n

For more information, see Using Microsoft Windows ACLs to\n control access to an SMB file share in the Storage Gateway User\n Guide.

\n\n

Valid Values: true | false\n

" + "smithy.api#documentation": "

Set this value to true to enable access control list (ACL) on the SMB file\n share. Set it to false to map file and directory permissions to the POSIX\n permissions.

\n

For more information, see Using Microsoft Windows ACLs to\n control access to an SMB file share in the Storage Gateway User\n Guide.

\n

Valid Values: true | false\n

" } }, "AccessBasedEnumeration": { @@ -9948,7 +11328,7 @@ "FileShareName": { "target": "com.amazonaws.storagegateway#FileShareName", "traits": { - "smithy.api#documentation": "

The name of the file share. Optional.

\n\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" + "smithy.api#documentation": "

The name of the file share. Optional.

\n \n

\n FileShareName must be set if an S3 prefix name is set in\n LocationARN, or if an access point or access point alias is used.

\n
" } }, "CacheAttributes": { @@ -9960,7 +11340,7 @@ "NotificationPolicy": { "target": "com.amazonaws.storagegateway#NotificationPolicy", "traits": { - "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n\n

The following example sets NotificationPolicy off.

\n\n

\n {}\n

" + "smithy.api#documentation": "

The notification policy of the file share. SettlingTimeInSeconds controls\n the number of seconds to wait after the last point in time a client wrote to a file before\n generating an ObjectUploaded notification. Because clients can make many small\n writes to files, it's best to set this parameter for as long as possible to avoid\n generating multiple notifications for the same file in a small time period.

\n \n

\n SettlingTimeInSeconds has no effect on the timing of the object\n uploading to Amazon S3, only the timing of the notification.

\n
\n

The following example sets NotificationPolicy on with\n SettlingTimeInSeconds set to 60.

\n

\n {\\\"Upload\\\": {\\\"SettlingTimeInSeconds\\\": 60}}\n

\n

The following example sets NotificationPolicy off.

\n

\n {}\n

" } }, "OplocksEnabled": { @@ -9971,7 +11351,8 @@ } }, "traits": { - "smithy.api#documentation": "

UpdateSMBFileShareInput

" + "smithy.api#documentation": "

UpdateSMBFileShareInput

", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateSMBFileShareOutput": { @@ -9985,7 +11366,8 @@ } }, "traits": { - "smithy.api#documentation": "

UpdateSMBFileShareOutput

" + "smithy.api#documentation": "

UpdateSMBFileShareOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateSMBFileShareVisibility": { @@ -10024,6 +11406,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateSMBFileShareVisibilityOutput": { @@ -10032,6 +11417,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateSMBLocalGroups": { @@ -10070,6 +11458,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateSMBLocalGroupsOutput": { @@ -10078,6 +11469,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateSMBSecurityStrategy": { @@ -10097,7 +11491,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the SMB security strategy on a file gateway. This action is only supported in\n file gateways.

\n\n \n

This API is called Security level in the User Guide.

\n\n

A higher security level can affect performance of the gateway.

\n
" + "smithy.api#documentation": "

Updates the SMB security strategy on a file gateway. This action is only supported in\n file gateways.

\n \n

This API is called Security level in the User Guide.

\n

A higher security level can affect performance of the gateway.

\n
" } }, "com.amazonaws.storagegateway#UpdateSMBSecurityStrategyInput": { @@ -10112,10 +11506,13 @@ "SMBSecurityStrategy": { "target": "com.amazonaws.storagegateway#SMBSecurityStrategy", "traits": { - "smithy.api#documentation": "

Specifies the type of security strategy.

\n\n

ClientSpecified: if you use this option, requests are established based on what is\n negotiated by the client. This option is recommended when you want to maximize\n compatibility across different clients in your environment. Supported only in S3 File\n Gateway.

\n\n

MandatorySigning: if you use this option, file gateway only allows connections from\n SMBv2 or SMBv3 clients that have signing enabled. This option works with SMB clients on\n Microsoft Windows Vista, Windows Server 2008 or newer.

\n\n

MandatoryEncryption: if you use this option, file gateway only allows connections from\n SMBv3 clients that have encryption enabled. This option is highly recommended for\n environments that handle sensitive data. This option works with SMB clients on Microsoft\n Windows 8, Windows Server 2012 or newer.

", + "smithy.api#documentation": "

Specifies the type of security strategy.

\n

ClientSpecified: if you use this option, requests are established based on what is\n negotiated by the client. This option is recommended when you want to maximize\n compatibility across different clients in your environment. Supported only in S3 File\n Gateway.

\n

MandatorySigning: if you use this option, file gateway only allows connections from\n SMBv2 or SMBv3 clients that have signing enabled. This option works with SMB clients on\n Microsoft Windows Vista, Windows Server 2008 or newer.

\n

MandatoryEncryption: if you use this option, file gateway only allows connections from\n SMBv3 clients that have encryption enabled. This option is highly recommended for\n environments that handle sensitive data. This option works with SMB clients on Microsoft\n Windows 8, Windows Server 2012 or newer.

", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateSMBSecurityStrategyOutput": { @@ -10124,6 +11521,9 @@ "GatewayARN": { "target": "com.amazonaws.storagegateway#GatewayARN" } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateSnapshotSchedule": { @@ -10143,7 +11543,22 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a snapshot schedule configured for a gateway volume. This operation is only\n supported in the cached volume and stored volume gateway types.

\n\n

The default snapshot schedule for volume is once every 24 hours, starting at the\n creation time of the volume. You can use this API to change the snapshot schedule\n configured for the volume.

\n\n

In the request you must identify the gateway volume whose snapshot schedule you want to\n update, and the schedule information, including when you want the snapshot to begin on a\n day and the frequency (in hours) of snapshots.

" + "smithy.api#documentation": "

Updates a snapshot schedule configured for a gateway volume. This operation is only\n supported in the cached volume and stored volume gateway types.

\n

The default snapshot schedule for volume is once every 24 hours, starting at the\n creation time of the volume. You can use this API to change the snapshot schedule\n configured for the volume.

\n

In the request you must identify the gateway volume whose snapshot schedule you want to\n update, and the schedule information, including when you want the snapshot to begin on a\n day and the frequency (in hours) of snapshots.

", + "smithy.api#examples": [ + { + "title": "To update a volume snapshot schedule", + "documentation": "Updates a snapshot schedule configured for a gateway volume.", + "input": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB", + "StartAt": 0, + "RecurrenceInHours": 1, + "Description": "Hourly snapshot" + }, + "output": { + "VolumeARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB" + } + } + ] } }, "com.amazonaws.storagegateway#UpdateSnapshotScheduleInput": { @@ -10179,12 +11594,13 @@ "Tags": { "target": "com.amazonaws.storagegateway#Tags", "traits": { - "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value\n pair.

\n\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" + "smithy.api#documentation": "

A list of up to 50 tags that can be assigned to a snapshot. Each tag is a key-value\n pair.

\n \n

Valid characters for key and value are letters, spaces, and numbers representable in\n UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length\n of a tag's key is 128 characters, and the maximum length for a tag's value is\n 256.

\n
" } } }, "traits": { - "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n\n " + "smithy.api#documentation": "

A JSON object containing one or more of the following fields:

\n ", + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateSnapshotScheduleOutput": { @@ -10198,7 +11614,8 @@ } }, "traits": { - "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the updated storage\n volume.

" + "smithy.api#documentation": "

A JSON object containing the Amazon Resource Name (ARN) of the updated storage\n volume.

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UpdateVTLDeviceType": { @@ -10218,7 +11635,20 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the type of medium changer in a tape gateway. When you activate a tape gateway,\n you select a medium changer type for the tape gateway. This operation enables you to select\n a different type of medium changer after a tape gateway is activated. This operation is\n only supported in the tape gateway type.

" + "smithy.api#documentation": "

Updates the type of medium changer in a tape gateway. When you activate a tape gateway,\n you select a medium changer type for the tape gateway. This operation enables you to select\n a different type of medium changer after a tape gateway is activated. This operation is\n only supported in the tape gateway type.

", + "smithy.api#examples": [ + { + "title": "To update a VTL device type", + "documentation": "Updates the type of medium changer in a gateway-VTL after a gateway-VTL is activated.", + "input": { + "VTLDeviceARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/device/AMZN_SGW-1FAD4876_MEDIACHANGER_00001", + "DeviceType": "Medium Changer" + }, + "output": { + "VTLDeviceARN": "arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/device/AMZN_SGW-1FAD4876_MEDIACHANGER_00001" + } + } + ] } }, "com.amazonaws.storagegateway#UpdateVTLDeviceTypeInput": { @@ -10234,10 +11664,13 @@ "DeviceType": { "target": "com.amazonaws.storagegateway#DeviceType", "traits": { - "smithy.api#documentation": "

The type of medium changer you want to select.

\n\n

Valid Values: STK-L700 | AWS-Gateway-VTL |\n IBM-03584L32-0402\n

", + "smithy.api#documentation": "

The type of medium changer you want to select.

\n

Valid Values: STK-L700 | AWS-Gateway-VTL |\n IBM-03584L32-0402\n

", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.storagegateway#UpdateVTLDeviceTypeOutput": { @@ -10251,7 +11684,8 @@ } }, "traits": { - "smithy.api#documentation": "

UpdateVTLDeviceTypeOutput

" + "smithy.api#documentation": "

UpdateVTLDeviceTypeOutput

", + "smithy.api#output": {} } }, "com.amazonaws.storagegateway#UserList": { @@ -10382,13 +11816,13 @@ "VolumeARN": { "target": "com.amazonaws.storagegateway#VolumeARN", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the storage volume. For example, the following is a\n valid ARN:

\n\n

\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB\n

\n\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the storage volume. For example, the following is a\n valid ARN:

\n

\n arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB\n

\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" } }, "VolumeId": { "target": "com.amazonaws.storagegateway#VolumeId", "traits": { - "smithy.api#documentation": "

The unique identifier assigned to the volume. This ID becomes part of the volume Amazon\n Resource Name (ARN), which you use as input for other operations.

\n\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" + "smithy.api#documentation": "

The unique identifier assigned to the volume. This ID becomes part of the volume Amazon\n Resource Name (ARN), which you use as input for other operations.

\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" } }, "GatewayARN": { @@ -10397,7 +11831,7 @@ "GatewayId": { "target": "com.amazonaws.storagegateway#GatewayId", "traits": { - "smithy.api#documentation": "

The unique identifier assigned to your gateway during activation. This ID becomes part\n of the gateway Amazon Resource Name (ARN), which you use as input for other\n operations.

\n\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" + "smithy.api#documentation": "

The unique identifier assigned to your gateway during activation. This ID becomes part\n of the gateway Amazon Resource Name (ARN), which you use as input for other\n operations.

\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" } }, "VolumeType": { @@ -10410,7 +11844,7 @@ "target": "com.amazonaws.storagegateway#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The size of the volume in bytes.

\n\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" + "smithy.api#documentation": "

The size of the volume in bytes.

\n

Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).

" } }, "VolumeAttachmentStatus": { @@ -10450,7 +11884,7 @@ "target": "com.amazonaws.storagegateway#long", "traits": { "smithy.api#default": 0, - "smithy.api#documentation": "

The size of the data stored on the volume in bytes.

\n\n \n

This value is not available for volumes created prior to May 13, 2015, until you\n store data on the volume.

\n
" + "smithy.api#documentation": "

The size of the data stored on the volume in bytes.

\n \n

This value is not available for volumes created prior to May 13, 2015, until you\n store data on the volume.

\n
" } }, "VolumeRecoveryPointTime": { diff --git a/codegen/sdk-codegen/aws-models/sts.json b/codegen/sdk-codegen/aws-models/sts.json index 2942ae47f13..d49956a1f71 100644 --- a/codegen/sdk-codegen/aws-models/sts.json +++ b/codegen/sdk-codegen/aws-models/sts.json @@ -655,52 +655,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -708,13 +712,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -724,175 +737,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://sts.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "PartitionResult" }, - { - "conditions": [], - "endpoint": { - "url": "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -901,99 +822,142 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://sts.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "aws-global" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://sts.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "sts", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://sts.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "aws-global" + ] + } + ], + "endpoint": { + "url": "https://sts.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "sts", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://sts.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1701,9 +1665,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -1720,10 +1684,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "ap-northeast-1" + "Region": "ap-northeast-1", + "UseGlobalEndpoint": true } }, { @@ -1733,9 +1697,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -1752,10 +1716,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "ap-south-1" + "Region": "ap-south-1", + "UseGlobalEndpoint": true } }, { @@ -1765,9 +1729,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -1784,10 +1748,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "ap-southeast-1" + "Region": "ap-southeast-1", + "UseGlobalEndpoint": true } }, { @@ -1797,9 +1761,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -1816,10 +1780,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "ap-southeast-2" + "Region": "ap-southeast-2", + "UseGlobalEndpoint": true } }, { @@ -1829,9 +1793,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -1848,10 +1812,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "aws-global" + "Region": "aws-global", + "UseGlobalEndpoint": true } }, { @@ -1861,9 +1825,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -1880,10 +1844,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "ca-central-1" + "Region": "ca-central-1", + "UseGlobalEndpoint": true } }, { @@ -1893,9 +1857,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -1912,10 +1876,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "eu-central-1" + "Region": "eu-central-1", + "UseGlobalEndpoint": true } }, { @@ -1925,9 +1889,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -1944,10 +1908,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "eu-north-1" + "Region": "eu-north-1", + "UseGlobalEndpoint": true } }, { @@ -1957,9 +1921,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -1976,10 +1940,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "eu-west-1" + "Region": "eu-west-1", + "UseGlobalEndpoint": true } }, { @@ -1989,9 +1953,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -2008,10 +1972,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "eu-west-2" + "Region": "eu-west-2", + "UseGlobalEndpoint": true } }, { @@ -2021,9 +1985,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -2040,10 +2004,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "eu-west-3" + "Region": "eu-west-3", + "UseGlobalEndpoint": true } }, { @@ -2053,9 +2017,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -2072,10 +2036,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "sa-east-1" + "Region": "sa-east-1", + "UseGlobalEndpoint": true } }, { @@ -2085,9 +2049,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -2104,10 +2068,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "us-east-1" + "Region": "us-east-1", + "UseGlobalEndpoint": true } }, { @@ -2117,9 +2081,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -2136,10 +2100,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "us-east-2" + "Region": "us-east-2", + "UseGlobalEndpoint": true } }, { @@ -2149,9 +2113,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -2168,10 +2132,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "us-west-1" + "Region": "us-west-1", + "UseGlobalEndpoint": true } }, { @@ -2181,9 +2145,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-1" + "signingRegion": "us-east-1", + "signingName": "sts" } ] }, @@ -2200,10 +2164,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "us-west-2" + "Region": "us-west-2", + "UseGlobalEndpoint": true } }, { @@ -2213,9 +2177,9 @@ "properties": { "authSchemes": [ { - "signingName": "sts", "name": "sigv4", - "signingRegion": "us-east-3" + "signingRegion": "us-east-3", + "signingName": "sts" } ] }, @@ -2232,10 +2196,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, - "Region": "us-east-3" + "Region": "us-east-3", + "UseGlobalEndpoint": true } }, { @@ -2256,10 +2220,10 @@ } ], "params": { - "UseGlobalEndpoint": true, "UseDualStack": false, "UseFIPS": false, "Region": "us-west-1", + "UseGlobalEndpoint": true, "Endpoint": "https://example.com" } }, @@ -2271,10 +2235,10 @@ } }, "params": { - "Endpoint": "https://example.com", - "UseGlobalEndpoint": false, "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "Endpoint": "https://example.com", + "UseGlobalEndpoint": false } } ], @@ -2305,7 +2269,50 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a set of temporary security credentials that you can use to access Amazon Web Services\n resources. These temporary credentials consist of an access key ID, a secret access key,\n and a security token. Typically, you use AssumeRole within your account or for\n cross-account access. For a comparison of AssumeRole with other API operations\n that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n

\n Permissions\n

\n

The temporary security credentials created by AssumeRole can be used to\n make API calls to any Amazon Web Services service with the following exception: You cannot call the\n Amazon Web Services STS GetFederationToken or GetSessionToken API\n operations.

\n

(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.

\n

When you create a role, you create two policies: a role trust policy that specifies\n who can assume the role, and a permissions policy that specifies\n what can be done with the role. You specify the trusted principal\n that is allowed to assume the role in the role trust policy.

\n

To assume a role from a different account, your Amazon Web Services account must be trusted by the\n role. The trust relationship is defined in the role's trust policy when the role is\n created. That trust policy states which accounts are allowed to delegate that access to\n users in the account.

\n

A user who wants to access a role in a different account must also have permissions that\n are delegated from the account administrator. The administrator must attach a policy that\n allows the user to call AssumeRole for the ARN of the role in the other\n account.

\n

To allow a user to assume a role in the same account, you can do either of the\n following:

\n
    \n
  • \n

    Attach a policy to the user that allows the user to call AssumeRole\n (as long as the role's trust policy trusts the account).

    \n
  • \n
  • \n

    Add the user as a principal directly in the role's trust policy.

    \n
  • \n
\n

You can do either because the role’s trust policy acts as an IAM resource-based\n policy. When a resource-based policy grants access to a principal in the same account, no\n additional identity-based policy is required. For more information about trust policies and\n resource-based policies, see IAM Policies in the\n IAM User Guide.

\n

\n Tags\n

\n

(Optional) You can pass tag key-value pairs to your session. These tags are called\n session tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.

\n

An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.

\n

You can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.

\n

\n Using MFA with AssumeRole\n

\n

(Optional) You can include multi-factor authentication (MFA) information when you call\n AssumeRole. This is useful for cross-account scenarios to ensure that the\n user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that\n scenario, the trust policy of the role being assumed includes a condition that tests for\n MFA authentication. If the caller does not include valid MFA information, the request to\n assume the role is denied. The condition in a trust policy that tests for MFA\n authentication might look like the following example.

\n

\n \"Condition\": {\"Bool\": {\"aws:MultiFactorAuthPresent\": true}}\n

\n

For more information, see Configuring MFA-Protected API Access\n in the IAM User Guide guide.

\n

To use MFA with AssumeRole, you pass values for the\n SerialNumber and TokenCode parameters. The\n SerialNumber value identifies the user's hardware or virtual MFA device.\n The TokenCode is the time-based one-time password (TOTP) that the MFA device\n produces.

" + "smithy.api#documentation": "

Returns a set of temporary security credentials that you can use to access Amazon Web Services\n resources. These temporary credentials consist of an access key ID, a secret access key,\n and a security token. Typically, you use AssumeRole within your account or for\n cross-account access. For a comparison of AssumeRole with other API operations\n that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n

\n Permissions\n

\n

The temporary security credentials created by AssumeRole can be used to\n make API calls to any Amazon Web Services service with the following exception: You cannot call the\n Amazon Web Services STS GetFederationToken or GetSessionToken API\n operations.

\n

(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.

\n

When you create a role, you create two policies: a role trust policy that specifies\n who can assume the role, and a permissions policy that specifies\n what can be done with the role. You specify the trusted principal\n that is allowed to assume the role in the role trust policy.

\n

To assume a role from a different account, your Amazon Web Services account must be trusted by the\n role. The trust relationship is defined in the role's trust policy when the role is\n created. That trust policy states which accounts are allowed to delegate that access to\n users in the account.

\n

A user who wants to access a role in a different account must also have permissions that\n are delegated from the account administrator. The administrator must attach a policy that\n allows the user to call AssumeRole for the ARN of the role in the other\n account.

\n

To allow a user to assume a role in the same account, you can do either of the\n following:

\n
    \n
  • \n

    Attach a policy to the user that allows the user to call AssumeRole\n (as long as the role's trust policy trusts the account).

    \n
  • \n
  • \n

    Add the user as a principal directly in the role's trust policy.

    \n
  • \n
\n

You can do either because the role’s trust policy acts as an IAM resource-based\n policy. When a resource-based policy grants access to a principal in the same account, no\n additional identity-based policy is required. For more information about trust policies and\n resource-based policies, see IAM Policies in the\n IAM User Guide.

\n

\n Tags\n

\n

(Optional) You can pass tag key-value pairs to your session. These tags are called\n session tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.

\n

An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.

\n

You can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.

\n

\n Using MFA with AssumeRole\n

\n

(Optional) You can include multi-factor authentication (MFA) information when you call\n AssumeRole. This is useful for cross-account scenarios to ensure that the\n user that assumes the role has been authenticated with an Amazon Web Services MFA device. In that\n scenario, the trust policy of the role being assumed includes a condition that tests for\n MFA authentication. If the caller does not include valid MFA information, the request to\n assume the role is denied. The condition in a trust policy that tests for MFA\n authentication might look like the following example.

\n

\n \"Condition\": {\"Bool\": {\"aws:MultiFactorAuthPresent\": true}}\n

\n

For more information, see Configuring MFA-Protected API Access\n in the IAM User Guide guide.

\n

To use MFA with AssumeRole, you pass values for the\n SerialNumber and TokenCode parameters. The\n SerialNumber value identifies the user's hardware or virtual MFA device.\n The TokenCode is the time-based one-time password (TOTP) that the MFA device\n produces.

", + "smithy.api#examples": [ + { + "title": "To assume a role", + "documentation": "", + "input": { + "RoleArn": "arn:aws:iam::123456789012:role/demo", + "RoleSessionName": "testAssumeRoleSession", + "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}", + "Tags": [ + { + "Key": "Project", + "Value": "Unicorn" + }, + { + "Key": "Team", + "Value": "Automation" + }, + { + "Key": "Cost-Center", + "Value": "12345" + } + ], + "TransitiveTagKeys": [ + "Project", + "Cost-Center" + ], + "ExternalId": "123ABC" + }, + "output": { + "Credentials": { + "SessionToken": "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==", + "AccessKeyId": "AKIAIOSFODNN7EXAMPLE", + "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + "Expiration": "2011-07-15T23:28:33.359Z" + }, + "AssumedRoleUser": { + "Arn": "arn:aws:sts::123456789012:assumed-role/demo/Bob", + "AssumedRoleId": "ARO123EXAMPLE123:Bob" + }, + "PackedPolicySize": 8 + } + } + ] } }, "com.amazonaws.sts#AssumeRoleRequest": { @@ -2452,7 +2459,37 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a set of temporary security credentials for users who have been authenticated\n via a SAML authentication response. This operation provides a mechanism for tying an\n enterprise identity store or directory to role-based Amazon Web Services access without user-specific\n credentials or configuration. For a comparison of AssumeRoleWithSAML with the\n other API operations that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n

The temporary security credentials returned by this operation consist of an access key\n ID, a secret access key, and a security token. Applications can use these temporary\n security credentials to sign calls to Amazon Web Services services.

\n

\n Session Duration\n

\n

By default, the temporary security credentials created by\n AssumeRoleWithSAML last for one hour. However, you can use the optional\n DurationSeconds parameter to specify the duration of your session. Your\n role session lasts for the duration that you specify, or until the time specified in the\n SAML authentication response's SessionNotOnOrAfter value, whichever is\n shorter. You can provide a DurationSeconds value from 900 seconds (15 minutes)\n up to the maximum session duration setting for the role. This setting can have a value from\n 1 hour to 12 hours. To learn how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole* API operations or the assume-role* CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.

\n \n

\n Role chaining limits your CLI or Amazon Web Services API role\n session to a maximum of one hour. When you use the AssumeRole API operation\n to assume a role, you can specify the duration of your role session with the\n DurationSeconds parameter. You can specify a parameter value of up to\n 43200 seconds (12 hours), depending on the maximum session duration setting for your\n role. However, if you assume a role using role chaining and provide a\n DurationSeconds parameter value greater than one hour, the operation\n fails.

\n
\n

\n Permissions\n

\n

The temporary security credentials created by AssumeRoleWithSAML can be\n used to make API calls to any Amazon Web Services service with the following exception: you cannot call\n the STS GetFederationToken or GetSessionToken API\n operations.

\n

(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.

\n

Calling AssumeRoleWithSAML does not require the use of Amazon Web Services security\n credentials. The identity of the caller is validated by using keys in the metadata document\n that is uploaded for the SAML provider entity for your identity provider.

\n \n

Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs.\n The entry includes the value in the NameID element of the SAML assertion.\n We recommend that you use a NameIDType that is not associated with any\n personally identifiable information (PII). For example, you could instead use the\n persistent identifier\n (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).

\n
\n

\n Tags\n

\n

(Optional) You can configure your IdP to pass attributes into your SAML assertion as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.

\n

You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.

\n \n

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.

\n
\n

You can pass a session tag with the same key as a tag that is attached to the role. When\n you do, session tags override the role's tags with the same key.

\n

An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.

\n

You can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.

\n

\n SAML Configuration\n

\n

Before your application can call AssumeRoleWithSAML, you must configure\n your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you\n must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that\n represents your identity provider. You must also create an IAM role that specifies this\n SAML provider in its trust policy.

\n

For more information, see the following resources:

\n " + "smithy.api#documentation": "

Returns a set of temporary security credentials for users who have been authenticated\n via a SAML authentication response. This operation provides a mechanism for tying an\n enterprise identity store or directory to role-based Amazon Web Services access without user-specific\n credentials or configuration. For a comparison of AssumeRoleWithSAML with the\n other API operations that produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n

The temporary security credentials returned by this operation consist of an access key\n ID, a secret access key, and a security token. Applications can use these temporary\n security credentials to sign calls to Amazon Web Services services.

\n

\n Session Duration\n

\n

By default, the temporary security credentials created by\n AssumeRoleWithSAML last for one hour. However, you can use the optional\n DurationSeconds parameter to specify the duration of your session. Your\n role session lasts for the duration that you specify, or until the time specified in the\n SAML authentication response's SessionNotOnOrAfter value, whichever is\n shorter. You can provide a DurationSeconds value from 900 seconds (15 minutes)\n up to the maximum session duration setting for the role. This setting can have a value from\n 1 hour to 12 hours. To learn how to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole* API operations or the assume-role* CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.

\n \n

\n Role chaining limits your CLI or Amazon Web Services API role\n session to a maximum of one hour. When you use the AssumeRole API operation\n to assume a role, you can specify the duration of your role session with the\n DurationSeconds parameter. You can specify a parameter value of up to\n 43200 seconds (12 hours), depending on the maximum session duration setting for your\n role. However, if you assume a role using role chaining and provide a\n DurationSeconds parameter value greater than one hour, the operation\n fails.

\n
\n

\n Permissions\n

\n

The temporary security credentials created by AssumeRoleWithSAML can be\n used to make API calls to any Amazon Web Services service with the following exception: you cannot call\n the STS GetFederationToken or GetSessionToken API\n operations.

\n

(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.

\n

Calling AssumeRoleWithSAML does not require the use of Amazon Web Services security\n credentials. The identity of the caller is validated by using keys in the metadata document\n that is uploaded for the SAML provider entity for your identity provider.

\n \n

Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs.\n The entry includes the value in the NameID element of the SAML assertion.\n We recommend that you use a NameIDType that is not associated with any\n personally identifiable information (PII). For example, you could instead use the\n persistent identifier\n (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).

\n
\n

\n Tags\n

\n

(Optional) You can configure your IdP to pass attributes into your SAML assertion as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.

\n

You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.

\n \n

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.

\n
\n

You can pass a session tag with the same key as a tag that is attached to the role. When\n you do, session tags override the role's tags with the same key.

\n

An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.

\n

You can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.

\n

\n SAML Configuration\n

\n

Before your application can call AssumeRoleWithSAML, you must configure\n your SAML identity provider (IdP) to issue the claims required by Amazon Web Services. Additionally, you\n must use Identity and Access Management (IAM) to create a SAML provider entity in your Amazon Web Services account that\n represents your identity provider. You must also create an IAM role that specifies this\n SAML provider in its trust policy.

\n

For more information, see the following resources:

\n ", + "smithy.api#examples": [ + { + "title": "To assume a role using a SAML assertion", + "documentation": "", + "input": { + "RoleArn": "arn:aws:iam::123456789012:role/TestSaml", + "PrincipalArn": "arn:aws:iam::123456789012:saml-provider/SAML-test", + "SAMLAssertion": "VERYLONGENCODEDASSERTIONEXAMPLExzYW1sOkF1ZGllbmNlPmJsYW5rPC9zYW1sOkF1ZGllbmNlPjwvc2FtbDpBdWRpZW5jZVJlc3RyaWN0aW9uPjwvc2FtbDpDb25kaXRpb25zPjxzYW1sOlN1YmplY3Q+PHNhbWw6TmFtZUlEIEZvcm1hdD0idXJuOm9hc2lzOm5hbWVzOnRjOlNBTUw6Mi4wOm5hbWVpZC1mb3JtYXQ6dHJhbnNpZW50Ij5TYW1sRXhhbXBsZTwvc2FtbDpOYW1lSUQ+PHNhbWw6U3ViamVjdENvbmZpcm1hdGlvbiBNZXRob2Q9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjIuMDpjbTpiZWFyZXIiPjxzYW1sOlN1YmplY3RDb25maXJtYXRpb25EYXRhIE5vdE9uT3JBZnRlcj0iMjAxOS0xMS0wMVQyMDoyNTowNS4xNDVaIiBSZWNpcGllbnQ9Imh0dHBzOi8vc2lnbmluLmF3cy5hbWF6b24uY29tL3NhbWwiLz48L3NhbWw6U3ViamVjdENvbmZpcm1hdGlvbj48L3NhbWw6U3ViamVjdD48c2FtbDpBdXRoblN0YXRlbWVudCBBdXRoPD94bWwgdmpSZXNwb25zZT4=", + "DurationSeconds": 3600 + }, + "output": { + "Issuer": "https://integ.example.com/idp/shibboleth", + "AssumedRoleUser": { + "AssumedRoleId": "ARO456EXAMPLE789:TestSaml", + "Arn": "arn:aws:sts::123456789012:assumed-role/TestSaml" + }, + "Credentials": { + "SecretAccessKey": "8P+SQvWIuLnKhh8d++jpw0nNmQRBZvNEXAMPLEKEY", + "AccessKeyId": "ASIAV3ZUEFP6EXAMPLE", + "SessionToken": "IQoJb3JpZ2luX2VjEOz////////////////////wEXAMPLEtMSJHMEUCIDoKK3JH9uGQE1z0sINr5M4jk+Na8KHDcCYRVjJCZEvOAiEA3OvJGtw1EcViOleS2vhs8VdCKFJQWPQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==", + "Expiration": "2019-11-01T20:26:47Z" + }, + "Audience": "https://signin.aws.amazon.com/saml", + "SubjectType": "transient", + "PackedPolicySize": 6, + "NameQualifier": "SbdGOnUkh1i4+EXAMPLExL/jEvs=", + "Subject": "SamlExample" + } + } + ] } }, "com.amazonaws.sts#AssumeRoleWithSAMLRequest": { @@ -2597,7 +2634,37 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a set of temporary security credentials for users who have been authenticated in\n a mobile or web application with a web identity provider. Example providers include the\n OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID Connect-compatible\n identity provider such as Google or Amazon Cognito federated identities.

\n \n

For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the\n Amazon Web Services SDK for iOS Developer Guide and the Amazon Web Services SDK for Android Developer Guide to uniquely\n identify a user. You can also supply the user with a consistent identity throughout the\n lifetime of an application.

\n

To learn more about Amazon Cognito, see Amazon Cognito identity\n pools in Amazon Cognito Developer Guide.

\n
\n

Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web Services\n security credentials. Therefore, you can distribute an application (for example, on mobile\n devices) that requests temporary security credentials without including long-term Amazon Web Services\n credentials in the application. You also don't need to deploy server-based proxy services\n that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by\n using a token from the web identity provider. For a comparison of\n AssumeRoleWithWebIdentity with the other API operations that produce\n temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n

The temporary security credentials returned by this API consist of an access key ID, a\n secret access key, and a security token. Applications can use these temporary security\n credentials to sign calls to Amazon Web Services service API operations.

\n

\n Session Duration\n

\n

By default, the temporary security credentials created by\n AssumeRoleWithWebIdentity last for one hour. However, you can use the\n optional DurationSeconds parameter to specify the duration of your session.\n You can provide a value from 900 seconds (15 minutes) up to the maximum session duration\n setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how\n to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole* API operations or the assume-role* CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.

\n

\n Permissions\n

\n

The temporary security credentials created by AssumeRoleWithWebIdentity can\n be used to make API calls to any Amazon Web Services service with the following exception: you cannot\n call the STS GetFederationToken or GetSessionToken API\n operations.

\n

(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.

\n

\n Tags\n

\n

(Optional) You can configure your IdP to pass attributes into your web identity token as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.

\n

You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.

\n \n

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.

\n
\n

You can pass a session tag with the same key as a tag that is attached to the role. When\n you do, the session tag overrides the role tag with the same key.

\n

An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.

\n

You can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.

\n

\n Identities\n

\n

Before your application can call AssumeRoleWithWebIdentity, you must have\n an identity token from a supported identity provider and create a role that the application\n can assume. The role that your application assumes must trust the identity provider that is\n associated with the identity token. In other words, the identity provider must be specified\n in the role's trust policy.

\n \n

Calling AssumeRoleWithWebIdentity can result in an entry in your\n CloudTrail logs. The entry includes the Subject of\n the provided web identity token. We recommend that you avoid using any personally\n identifiable information (PII) in this field. For example, you could instead use a GUID\n or a pairwise identifier, as suggested\n in the OIDC specification.

\n
\n

For more information about how to use web identity federation and the\n AssumeRoleWithWebIdentity API, see the following resources:

\n " + "smithy.api#documentation": "

Returns a set of temporary security credentials for users who have been authenticated in\n a mobile or web application with a web identity provider. Example providers include the\n OAuth 2.0 providers Login with Amazon and Facebook, or any OpenID Connect-compatible\n identity provider such as Google or Amazon Cognito federated identities.

\n \n

For mobile applications, we recommend that you use Amazon Cognito. You can use Amazon Cognito with the\n Amazon Web Services SDK for iOS Developer Guide and the Amazon Web Services SDK for Android Developer Guide to uniquely\n identify a user. You can also supply the user with a consistent identity throughout the\n lifetime of an application.

\n

To learn more about Amazon Cognito, see Amazon Cognito identity\n pools in Amazon Cognito Developer Guide.

\n
\n

Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web Services\n security credentials. Therefore, you can distribute an application (for example, on mobile\n devices) that requests temporary security credentials without including long-term Amazon Web Services\n credentials in the application. You also don't need to deploy server-based proxy services\n that use long-term Amazon Web Services credentials. Instead, the identity of the caller is validated by\n using a token from the web identity provider. For a comparison of\n AssumeRoleWithWebIdentity with the other API operations that produce\n temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n

The temporary security credentials returned by this API consist of an access key ID, a\n secret access key, and a security token. Applications can use these temporary security\n credentials to sign calls to Amazon Web Services service API operations.

\n

\n Session Duration\n

\n

By default, the temporary security credentials created by\n AssumeRoleWithWebIdentity last for one hour. However, you can use the\n optional DurationSeconds parameter to specify the duration of your session.\n You can provide a value from 900 seconds (15 minutes) up to the maximum session duration\n setting for the role. This setting can have a value from 1 hour to 12 hours. To learn how\n to view the maximum value for your role, see View the\n Maximum Session Duration Setting for a Role in the\n IAM User Guide. The maximum session duration limit applies when\n you use the AssumeRole* API operations or the assume-role* CLI\n commands. However the limit does not apply when you use those operations to create a\n console URL. For more information, see Using IAM Roles in the\n IAM User Guide.

\n

\n Permissions\n

\n

The temporary security credentials created by AssumeRoleWithWebIdentity can\n be used to make API calls to any Amazon Web Services service with the following exception: you cannot\n call the STS GetFederationToken or GetSessionToken API\n operations.

\n

(Optional) You can pass inline or managed session policies to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters. Passing policies to this operation returns new \n temporary credentials. The resulting session's permissions are the intersection of the \n role's identity-based policy and the session policies. You can use the role's temporary \n credentials in subsequent Amazon Web Services API calls to access resources in the account that owns \n the role. You cannot use session policies to grant more permissions than those allowed \n by the identity-based policy of the role that is being assumed. For more information, see\n Session\n Policies in the IAM User Guide.

\n

\n Tags\n

\n

(Optional) You can configure your IdP to pass attributes into your web identity token as\n session tags. Each session tag consists of a key name and an associated value. For more\n information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.

\n

You can pass up to 50 session tags. The plaintext session tag keys can’t exceed 128\n characters and the values can’t exceed 256 characters. For these and additional limits, see\n IAM\n and STS Character Limits in the IAM User Guide.

\n \n

An Amazon Web Services conversion compresses the passed inline session policy, managed policy ARNs,\n and session tags into a packed binary format that has a separate limit. Your request can\n fail for this limit even if your plaintext meets the other requirements. The\n PackedPolicySize response element indicates by percentage how close the\n policies and tags for your request are to the upper size limit.

\n
\n

You can pass a session tag with the same key as a tag that is attached to the role. When\n you do, the session tag overrides the role tag with the same key.

\n

An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.

\n

You can set the session tags as transitive. Transitive tags persist during role\n chaining. For more information, see Chaining Roles\n with Session Tags in the IAM User Guide.

\n

\n Identities\n

\n

Before your application can call AssumeRoleWithWebIdentity, you must have\n an identity token from a supported identity provider and create a role that the application\n can assume. The role that your application assumes must trust the identity provider that is\n associated with the identity token. In other words, the identity provider must be specified\n in the role's trust policy.

\n \n

Calling AssumeRoleWithWebIdentity can result in an entry in your\n CloudTrail logs. The entry includes the Subject of\n the provided web identity token. We recommend that you avoid using any personally\n identifiable information (PII) in this field. For example, you could instead use a GUID\n or a pairwise identifier, as suggested\n in the OIDC specification.

\n
\n

For more information about how to use web identity federation and the\n AssumeRoleWithWebIdentity API, see the following resources:

\n ", + "smithy.api#examples": [ + { + "title": "To assume a role as an OpenID Connect-federated user", + "documentation": "", + "input": { + "RoleArn": "arn:aws:iam::123456789012:role/FederatedWebIdentityRole", + "RoleSessionName": "app1", + "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}", + "WebIdentityToken": "Atza%7CIQEBLjAsAhRFiXuWpUXuRvQ9PZL3GMFcYevydwIUFAHZwXZXXXXXXXXJnrulxKDHwy87oGKPznh0D6bEQZTSCzyoCtL_8S07pLpr0zMbn6w1lfVZKNTBdDansFBmtGnIsIapjI6xKR02Yc_2bQ8LZbUXSGm6Ry6_BG7PrtLZtj_dfCTj92xNGed-CrKqjG7nPBjNIL016GGvuS5gSvPRUxWES3VYfm1wl7WTI7jn-Pcb6M-buCgHhFOzTQxod27L9CqnOLio7N3gZAGpsp6n1-AJBOCJckcyXe2c6uD0srOJeZlKUm2eTDVMf8IehDVI0r1QOnTV6KzzAI3OY87Vd_cVMQ", + "ProviderId": "www.amazon.com", + "DurationSeconds": 3600 + }, + "output": { + "Credentials": { + "SessionToken": "AQoDYXdzEE0a8ANXXXXXXXXNO1ewxE5TijQyp+IEXAMPLE", + "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + "Expiration": "2014-10-24T23:00:23Z", + "AccessKeyId": "AKIAIOSFODNN7EXAMPLE" + }, + "SubjectFromWebIdentityToken": "amzn1.account.AF6RHO7KZU5XRVQJGXK6HEXAMPLE", + "AssumedRoleUser": { + "Arn": "arn:aws:sts::123456789012:assumed-role/FederatedWebIdentityRole/app1", + "AssumedRoleId": "AROACLKWSDQRAOEXAMPLE:app1" + }, + "PackedPolicySize": 123, + "Provider": "www.amazon.com", + "Audience": "client.5498841531868486423.1548@apps.example.com" + } + } + ] } }, "com.amazonaws.sts#AssumeRoleWithWebIdentityRequest": { @@ -2779,7 +2846,19 @@ } ], "traits": { - "smithy.api#documentation": "

Decodes additional information about the authorization status of a request from an\n encoded message returned in response to an Amazon Web Services request.

\n

For example, if a user is not authorized to perform an operation that he or she has\n requested, the request returns a Client.UnauthorizedOperation response (an\n HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can\n provide details about this authorization failure.

\n \n

Only certain Amazon Web Services operations return an encoded authorization message. The\n documentation for an individual operation indicates whether that operation returns an\n encoded message in addition to returning an HTTP code.

\n
\n

The message is encoded because the details of the authorization status can contain\n privileged information that the user who requested the operation should not see. To decode\n an authorization status message, a user must be granted permissions through an IAM policy to\n request the DecodeAuthorizationMessage\n (sts:DecodeAuthorizationMessage) action.

\n

The decoded message includes the following type of information:

\n
    \n
  • \n

    Whether the request was denied due to an explicit deny or due to the absence of an\n explicit allow. For more information, see Determining Whether a Request is Allowed or Denied in the\n IAM User Guide.

    \n
  • \n
  • \n

    The principal who made the request.

    \n
  • \n
  • \n

    The requested action.

    \n
  • \n
  • \n

    The requested resource.

    \n
  • \n
  • \n

    The values of condition keys in the context of the user's request.

    \n
  • \n
" + "smithy.api#documentation": "

Decodes additional information about the authorization status of a request from an\n encoded message returned in response to an Amazon Web Services request.

\n

For example, if a user is not authorized to perform an operation that he or she has\n requested, the request returns a Client.UnauthorizedOperation response (an\n HTTP 403 response). Some Amazon Web Services operations additionally return an encoded message that can\n provide details about this authorization failure.

\n \n

Only certain Amazon Web Services operations return an encoded authorization message. The\n documentation for an individual operation indicates whether that operation returns an\n encoded message in addition to returning an HTTP code.

\n
\n

The message is encoded because the details of the authorization status can contain\n privileged information that the user who requested the operation should not see. To decode\n an authorization status message, a user must be granted permissions through an IAM policy to\n request the DecodeAuthorizationMessage\n (sts:DecodeAuthorizationMessage) action.

\n

The decoded message includes the following type of information:

\n
    \n
  • \n

    Whether the request was denied due to an explicit deny or due to the absence of an\n explicit allow. For more information, see Determining Whether a Request is Allowed or Denied in the\n IAM User Guide.

    \n
  • \n
  • \n

    The principal who made the request.

    \n
  • \n
  • \n

    The requested action.

    \n
  • \n
  • \n

    The requested resource.

    \n
  • \n
  • \n

    The values of condition keys in the context of the user's request.

    \n
  • \n
", + "smithy.api#examples": [ + { + "title": "To decode information about an authorization status of a request", + "documentation": "", + "input": { + "EncodedMessage": "" + }, + "output": { + "DecodedMessage": "{\"allowed\": \"false\",\"explicitDeny\": \"false\",\"matchedStatements\": \"\",\"failures\": \"\",\"context\": {\"principal\": {\"id\": \"AIDACKCEVSQ6C2EXAMPLE\",\"name\": \"Bob\",\"arn\": \"arn:aws:iam::123456789012:user/Bob\"},\"action\": \"ec2:StopInstances\",\"resource\": \"arn:aws:ec2:us-east-1:123456789012:instance/i-dd01c9bd\",\"conditions\": [{\"item\": {\"key\": \"ec2:Tenancy\",\"values\": [\"default\"]},{\"item\": {\"key\": \"ec2:ResourceTag/elasticbeanstalk:environment-name\",\"values\": [\"Default-Environment\"]}},(Additional items ...)]}}" + } + } + ] } }, "com.amazonaws.sts#DecodeAuthorizationMessageRequest": { @@ -2901,7 +2980,18 @@ "target": "com.amazonaws.sts#GetCallerIdentityResponse" }, "traits": { - "smithy.api#documentation": "

Returns details about the IAM user or role whose credentials are used to\n call the operation.

\n \n

No permissions are required to perform this operation. If an administrator attaches a\n policy to your identity that explicitly denies access to the\n sts:GetCallerIdentity action, you can still perform this operation.\n Permissions are not required because the same information is returned when access is\n denied. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the\n IAM User Guide.

\n
" + "smithy.api#documentation": "

Returns details about the IAM user or role whose credentials are used to\n call the operation.

\n \n

No permissions are required to perform this operation. If an administrator attaches a\n policy to your identity that explicitly denies access to the\n sts:GetCallerIdentity action, you can still perform this operation.\n Permissions are not required because the same information is returned when access is\n denied. To view an example response, see I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice in the\n IAM User Guide.

\n
", + "smithy.api#examples": [ + { + "title": "To get details about a calling IAM user", + "documentation": "This example shows a request and response made with the credentials for a user named Alice in the AWS account 123456789012.", + "output": { + "UserId": "AKIAI44QH8DHBEXAMPLE", + "Account": "123456789012", + "Arn": "arn:aws:iam::123456789012:user/Alice" + } + } + ] } }, "com.amazonaws.sts#GetCallerIdentityRequest": { @@ -2958,7 +3048,41 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a set of temporary security credentials (consisting of an access key ID, a\n secret access key, and a security token) for a user. A typical use is in a proxy\n application that gets temporary security credentials on behalf of distributed applications\n inside a corporate network.

\n

You must call the GetFederationToken operation using the long-term security\n credentials of an IAM user. As a result, this call is appropriate in\n contexts where those credentials can be safeguarded, usually in a server-based application.\n For a comparison of GetFederationToken with the other API operations that\n produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n

Although it is possible to call GetFederationToken using the security\n credentials of an Amazon Web Services account root user rather than an IAM user that you\n create for the purpose of a proxy application, we do not recommend it. For more\n information, see Safeguard your root user credentials and don't use them for everyday tasks in the\n IAM User Guide.

\n \n

You can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.

\n
\n

\n Session duration\n

\n

The temporary credentials are valid for the specified duration, from 900 seconds (15\n minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is\n 43,200 seconds (12 hours). Temporary credentials obtained by using the root user\n credentials have a maximum duration of 3,600 seconds (1 hour).

\n

\n Permissions\n

\n

You can use the temporary credentials created by GetFederationToken in any\n Amazon Web Services service with the following exceptions:

\n
    \n
  • \n

    You cannot call any IAM operations using the CLI or the Amazon Web Services API. This\n limitation does not apply to console sessions.

    \n
  • \n
  • \n

    You cannot call any STS operations except GetCallerIdentity.

    \n
  • \n
\n

You can use temporary credentials for single sign-on (SSO) to the console.

\n

You must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters.

\n

Though the session policy parameters are optional, if you do not pass a policy, then the\n resulting federated user session has no permissions. When you pass session policies, the\n session permissions are the intersection of the IAM user policies and the\n session policies that you pass. This gives you a way to further restrict the permissions\n for a federated user. You cannot use session policies to grant more permissions than those\n that are defined in the permissions policy of the IAM user. For more\n information, see Session Policies in\n the IAM User Guide. For information about using\n GetFederationToken to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.

\n

You can use the credentials to access a resource that has a resource-based policy. If\n that policy specifically references the federated user session in the\n Principal element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions granted by the\n session policies.

\n

\n Tags\n

\n

(Optional) You can pass tag key-value pairs to your session. These are called session\n tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.

\n \n

You can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.

\n
\n

An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.

\n

Tag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department and department tag keys. Assume\n that the user that you are federating has the\n Department=Marketing tag and you pass the\n department=engineering session tag. Department\n and department are not saved as separate tags, and the session tag passed in\n the request takes precedence over the user tag.

" + "smithy.api#documentation": "

Returns a set of temporary security credentials (consisting of an access key ID, a\n secret access key, and a security token) for a user. A typical use is in a proxy\n application that gets temporary security credentials on behalf of distributed applications\n inside a corporate network.

\n

You must call the GetFederationToken operation using the long-term security\n credentials of an IAM user. As a result, this call is appropriate in\n contexts where those credentials can be safeguarded, usually in a server-based application.\n For a comparison of GetFederationToken with the other API operations that\n produce temporary credentials, see Requesting Temporary Security\n Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n

Although it is possible to call GetFederationToken using the security\n credentials of an Amazon Web Services account root user rather than an IAM user that you\n create for the purpose of a proxy application, we do not recommend it. For more\n information, see Safeguard your root user credentials and don't use them for everyday tasks in the\n IAM User Guide.

\n \n

You can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.

\n
\n

\n Session duration\n

\n

The temporary credentials are valid for the specified duration, from 900 seconds (15\n minutes) up to a maximum of 129,600 seconds (36 hours). The default session duration is\n 43,200 seconds (12 hours). Temporary credentials obtained by using the root user\n credentials have a maximum duration of 3,600 seconds (1 hour).

\n

\n Permissions\n

\n

You can use the temporary credentials created by GetFederationToken in any\n Amazon Web Services service with the following exceptions:

\n
    \n
  • \n

    You cannot call any IAM operations using the CLI or the Amazon Web Services API. This\n limitation does not apply to console sessions.

    \n
  • \n
  • \n

    You cannot call any STS operations except GetCallerIdentity.

    \n
  • \n
\n

You can use temporary credentials for single sign-on (SSO) to the console.

\n

You must pass an inline or managed session policy to\n this operation. You can pass a single JSON policy document to use as an inline session\n policy. You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use as\n managed session policies. The plaintext that you use for both inline and managed session\n policies can't exceed 2,048 characters.

\n

Though the session policy parameters are optional, if you do not pass a policy, then the\n resulting federated user session has no permissions. When you pass session policies, the\n session permissions are the intersection of the IAM user policies and the\n session policies that you pass. This gives you a way to further restrict the permissions\n for a federated user. You cannot use session policies to grant more permissions than those\n that are defined in the permissions policy of the IAM user. For more\n information, see Session Policies in\n the IAM User Guide. For information about using\n GetFederationToken to create temporary security credentials, see GetFederationToken—Federation Through a Custom Identity Broker.

\n

You can use the credentials to access a resource that has a resource-based policy. If\n that policy specifically references the federated user session in the\n Principal element of the policy, the session has the permissions allowed by\n the policy. These permissions are granted in addition to the permissions granted by the\n session policies.

\n

\n Tags\n

\n

(Optional) You can pass tag key-value pairs to your session. These are called session\n tags. For more information about session tags, see Passing Session Tags in STS in the\n IAM User Guide.

\n \n

You can create a mobile-based or browser-based app that can authenticate users using\n a web identity provider like Login with Amazon, Facebook, Google, or an OpenID\n Connect-compatible identity provider. In this case, we recommend that you use Amazon Cognito or\n AssumeRoleWithWebIdentity. For more information, see Federation Through a Web-based Identity Provider in the\n IAM User Guide.

\n
\n

An administrator must grant you the permissions necessary to pass session tags. The\n administrator can also create granular permissions to allow you to pass only specific\n session tags. For more information, see Tutorial: Using Tags\n for Attribute-Based Access Control in the\n IAM User Guide.

\n

Tag key–value pairs are not case sensitive, but case is preserved. This means that you\n cannot have separate Department and department tag keys. Assume\n that the user that you are federating has the\n Department=Marketing tag and you pass the\n department=engineering session tag. Department\n and department are not saved as separate tags, and the session tag passed in\n the request takes precedence over the user tag.

", + "smithy.api#examples": [ + { + "title": "To get temporary credentials for a role by using GetFederationToken", + "documentation": "", + "input": { + "Name": "testFedUserSession", + "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Stmt1\",\"Effect\":\"Allow\",\"Action\":\"s3:ListAllMyBuckets\",\"Resource\":\"*\"}]}", + "DurationSeconds": 3600, + "Tags": [ + { + "Key": "Project", + "Value": "Pegasus" + }, + { + "Key": "Cost-Center", + "Value": "98765" + } + ] + }, + "output": { + "Credentials": { + "SessionToken": "AQoDYXdzEPT//////////wEXAMPLEtc764bNrC9SAPBSM22wDOk4x4HIZ8j4FZTwdQWLWsKWHGBuFqwAeMicRXmxfpSPfIeoIYRqTflfKD8YUuwthAx7mSEI/qkPpKPi/kMcGdQrmGdeehM4IC1NtBmUpp2wUE8phUZampKsburEDy0KPkyQDYwT7WZ0wq5VSXDvp75YU9HFvlRd8Tx6q6fE8YQcHNVXAkiY9q6d+xo0rKwT38xVqr7ZD0u0iPPkUL64lIZbqBAz+scqKmlzm8FDrypNC9Yjc8fPOLn9FX9KSYvKTr4rvx3iSIlTJabIQwj2ICCR/oLxBA==", + "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + "Expiration": "2011-07-15T23:28:33.359Z", + "AccessKeyId": "AKIAIOSFODNN7EXAMPLE" + }, + "FederatedUser": { + "Arn": "arn:aws:sts::123456789012:federated-user/Bob", + "FederatedUserId": "123456789012:Bob" + }, + "PackedPolicySize": 8 + } + } + ] } }, "com.amazonaws.sts#GetFederationTokenRequest": { @@ -3041,7 +3165,26 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a set of temporary credentials for an Amazon Web Services account or IAM user.\n The credentials consist of an access key ID, a secret access key, and a security token.\n Typically, you use GetSessionToken if you want to use MFA to protect\n programmatic calls to specific Amazon Web Services API operations like Amazon EC2\n StopInstances.

\n

MFA-enabled IAM users must call GetSessionToken and submit\n an MFA code that is associated with their MFA device. Using the temporary security\n credentials that the call returns, IAM users can then make programmatic\n calls to API operations that require MFA authentication. An incorrect MFA code causes the\n API to return an access denied error. For a comparison of GetSessionToken with\n the other API operations that produce temporary credentials, see Requesting\n Temporary Security Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n \n

No permissions are required for users to perform this operation. The purpose of the\n sts:GetSessionToken operation is to authenticate the user using MFA. You\n cannot use policies to control authentication operations. For more information, see\n Permissions for GetSessionToken in the\n IAM User Guide.

\n
\n

\n Session Duration\n

\n

The GetSessionToken operation must be called by using the long-term Amazon Web Services\n security credentials of an IAM user. Credentials that are created by IAM users are valid for the duration that you specify. This duration can range\n from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default\n of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900\n seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.

\n

\n Permissions\n

\n

The temporary security credentials created by GetSessionToken can be used\n to make API calls to any Amazon Web Services service with the following exceptions:

\n
    \n
  • \n

    You cannot call any IAM API operations unless MFA authentication information is\n included in the request.

    \n
  • \n
  • \n

    You cannot call any STS API except\n AssumeRole or GetCallerIdentity.

    \n
  • \n
\n

The credentials that GetSessionToken returns are based on permissions\n associated with the IAM user whose credentials were used to call the\n operation. The temporary credentials have the same permissions as the IAM user.

\n \n

Although it is possible to call GetSessionToken using the security\n credentials of an Amazon Web Services account root user rather than an IAM user, we do\n not recommend it. If GetSessionToken is called using root user\n credentials, the temporary credentials have root user permissions. For more\n information, see Safeguard your root user credentials and don't use them for everyday tasks in the\n IAM User Guide\n

\n
\n

For more information about using GetSessionToken to create temporary\n credentials, see Temporary\n Credentials for Users in Untrusted Environments in the\n IAM User Guide.

" + "smithy.api#documentation": "

Returns a set of temporary credentials for an Amazon Web Services account or IAM user.\n The credentials consist of an access key ID, a secret access key, and a security token.\n Typically, you use GetSessionToken if you want to use MFA to protect\n programmatic calls to specific Amazon Web Services API operations like Amazon EC2\n StopInstances.

\n

MFA-enabled IAM users must call GetSessionToken and submit\n an MFA code that is associated with their MFA device. Using the temporary security\n credentials that the call returns, IAM users can then make programmatic\n calls to API operations that require MFA authentication. An incorrect MFA code causes the\n API to return an access denied error. For a comparison of GetSessionToken with\n the other API operations that produce temporary credentials, see Requesting\n Temporary Security Credentials and Comparing the\n Amazon Web Services STS API operations in the IAM User Guide.

\n \n

No permissions are required for users to perform this operation. The purpose of the\n sts:GetSessionToken operation is to authenticate the user using MFA. You\n cannot use policies to control authentication operations. For more information, see\n Permissions for GetSessionToken in the\n IAM User Guide.

\n
\n

\n Session Duration\n

\n

The GetSessionToken operation must be called by using the long-term Amazon Web Services\n security credentials of an IAM user. Credentials that are created by IAM users are valid for the duration that you specify. This duration can range\n from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default\n of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900\n seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour.

\n

\n Permissions\n

\n

The temporary security credentials created by GetSessionToken can be used\n to make API calls to any Amazon Web Services service with the following exceptions:

\n
    \n
  • \n

    You cannot call any IAM API operations unless MFA authentication information is\n included in the request.

    \n
  • \n
  • \n

    You cannot call any STS API except\n AssumeRole or GetCallerIdentity.

    \n
  • \n
\n

The credentials that GetSessionToken returns are based on permissions\n associated with the IAM user whose credentials were used to call the\n operation. The temporary credentials have the same permissions as the IAM user.

\n \n

Although it is possible to call GetSessionToken using the security\n credentials of an Amazon Web Services account root user rather than an IAM user, we do\n not recommend it. If GetSessionToken is called using root user\n credentials, the temporary credentials have root user permissions. For more\n information, see Safeguard your root user credentials and don't use them for everyday tasks in the\n IAM User Guide\n

\n
\n

For more information about using GetSessionToken to create temporary\n credentials, see Temporary\n Credentials for Users in Untrusted Environments in the\n IAM User Guide.

", + "smithy.api#examples": [ + { + "title": "To get temporary credentials for an IAM user or an AWS account", + "documentation": "", + "input": { + "DurationSeconds": 3600, + "SerialNumber": "YourMFASerialNumber", + "TokenCode": "123456" + }, + "output": { + "Credentials": { + "SessionToken": "AQoEXAMPLEH4aoAH0gNCAPyJxz4BlCFFxWNE1OPTgk5TthT+FvwqnKwRcOIfrRh3c/LTo6UDdyJwOOvEVPvLXCrrrUtdnniCEXAMPLE/IvU1dYUg2RVAJBanLiHb4IgRmpRV3zrkuWJOgQs8IZZaIv2BXIa2R4OlgkBN9bkUDNCJiBeb/AXlzBBko7b15fjrBs2+cTQtpZ3CYWFXG8C5zqx37wnOE49mRl/+OtkIKGO7fAE", + "SecretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY", + "Expiration": "2011-07-11T19:55:29.611Z", + "AccessKeyId": "AKIAIOSFODNN7EXAMPLE" + } + } + } + ] } }, "com.amazonaws.sts#GetSessionTokenRequest": { diff --git a/codegen/sdk-codegen/aws-models/support-app.json b/codegen/sdk-codegen/aws-models/support-app.json index 027d42b33d9..4023ad327b6 100644 --- a/codegen/sdk-codegen/aws-models/support-app.json +++ b/codegen/sdk-codegen/aws-models/support-app.json @@ -826,52 +826,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -879,13 +883,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -895,224 +908,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://supportapp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://supportapp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://supportapp-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://supportapp-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://supportapp.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://supportapp.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://supportapp.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://supportapp.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1127,8 +1091,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1140,8 +1104,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1153,8 +1117,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1166,8 +1130,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1179,8 +1143,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1192,8 +1156,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1205,8 +1169,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1218,8 +1182,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1231,8 +1195,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1244,8 +1208,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1257,8 +1221,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1270,8 +1234,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1283,8 +1258,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1296,8 +1282,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1309,8 +1306,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1322,8 +1330,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1335,8 +1343,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1348,8 +1356,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1360,8 +1368,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1372,10 +1380,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1620,4 +1634,4 @@ } } } -} +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/support.json b/codegen/sdk-codegen/aws-models/support.json index 3695bdcbf99..0515f6a42a9 100644 --- a/codegen/sdk-codegen/aws-models/support.json +++ b/codegen/sdk-codegen/aws-models/support.json @@ -159,52 +159,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -212,495 +216,455 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://support.us-east-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "support", - "signingRegion": "us-east-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://support.us-east-1.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-east-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-cn" + "name" ] }, + "aws-cn" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://support.cn-north-1.amazonaws.com.cn", + "properties": { + "authSchemes": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "name": "sigv4", + "signingName": "support", + "signingRegion": "cn-north-1" } - ], - "endpoint": { - "url": "https://support.cn-north-1.amazonaws.com.cn", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "support", - "signingRegion": "cn-north-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-us-gov" + "name" ] }, + "aws-us-gov" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://support.us-gov-west-1.amazonaws.com", + "properties": { + "authSchemes": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-gov-west-1" } - ], - "endpoint": { - "url": "https://support.us-gov-west-1.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "support", - "signingRegion": "us-gov-west-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-iso" + "name" ] }, + "aws-iso" + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseFIPS" }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] - } - ], - "endpoint": { - "url": "https://support.us-iso-east-1.c2s.ic.gov", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "support", - "signingRegion": "us-iso-east-1" - } - ] + "ref": "UseDualStack" }, - "headers": {} - }, - "type": "endpoint" + false + ] + } + ], + "endpoint": { + "url": "https://support.us-iso-east-1.c2s.ic.gov", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-iso-east-1" + } + ] }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws-iso-b" + "name" ] }, + "aws-iso-b" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - false - ] + "ref": "UseDualStack" }, + false + ] + } + ], + "endpoint": { + "url": "https://support.us-isob-east-1.sc2s.sgov.gov", + "properties": { + "authSchemes": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - false - ] + "name": "sigv4", + "signingName": "support", + "signingRegion": "us-isob-east-1" } - ], - "endpoint": { - "url": "https://support.us-isob-east-1.sc2s.sgov.gov", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "support", - "signingRegion": "us-isob-east-1" - } - ] + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" }, - "headers": {} - }, - "type": "endpoint" + true + ] }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://support-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://support-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://support-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://support-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://support.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://support.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://support.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://support.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/synthetics.json b/codegen/sdk-codegen/aws-models/synthetics.json index e9f7e3384e0..e8c43baf771 100644 --- a/codegen/sdk-codegen/aws-models/synthetics.json +++ b/codegen/sdk-codegen/aws-models/synthetics.json @@ -109,11 +109,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#AssociateResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.synthetics#BadRequestException": { "type": "structure", @@ -491,37 +497,43 @@ } }, "com.amazonaws.synthetics#CanaryRunState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "PASSED", - "name": "PASSED" - }, - { - "value": "FAILED", - "name": "FAILED" + "type": "enum", + "members": { + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "PASSED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PASSED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" } - ] + } } }, "com.amazonaws.synthetics#CanaryRunStateReasonCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CANARY_FAILURE", - "name": "CANARY_FAILURE" - }, - { - "value": "EXECUTION_FAILURE", - "name": "EXECUTION_FAILURE" + "type": "enum", + "members": { + "CANARY_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANARY_FAILURE" + } + }, + "EXECUTION_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXECUTION_FAILURE" } - ] + } } }, "com.amazonaws.synthetics#CanaryRunStatus": { @@ -618,101 +630,139 @@ } }, "com.amazonaws.synthetics#CanaryState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "READY", - "name": "READY" - }, - { - "value": "STARTING", - "name": "STARTING" - }, - { - "value": "RUNNING", - "name": "RUNNING" - }, - { - "value": "UPDATING", - "name": "UPDATING" - }, - { - "value": "STOPPING", - "name": "STOPPING" - }, - { - "value": "STOPPED", - "name": "STOPPED" - }, - { - "value": "ERROR", - "name": "ERROR" - }, - { - "value": "DELETING", - "name": "DELETING" + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "READY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "READY" + } + }, + "STARTING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STARTING" + } + }, + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + }, + "STOPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPING" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STOPPED" } - ] + }, + "ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ERROR" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + } } }, "com.amazonaws.synthetics#CanaryStateReasonCode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INVALID_PERMISSIONS", - "name": "INVALID_PERMISSIONS" - }, - { - "value": "CREATE_PENDING", - "name": "CREATE_PENDING" - }, - { - "value": "CREATE_IN_PROGRESS", - "name": "CREATE_IN_PROGRESS" - }, - { - "value": "CREATE_FAILED", - "name": "CREATE_FAILED" - }, - { - "value": "UPDATE_PENDING", - "name": "UPDATE_PENDING" - }, - { - "value": "UPDATE_IN_PROGRESS", - "name": "UPDATE_IN_PROGRESS" - }, - { - "value": "UPDATE_COMPLETE", - "name": "UPDATE_COMPLETE" - }, - { - "value": "ROLLBACK_COMPLETE", - "name": "ROLLBACK_COMPLETE" - }, - { - "value": "ROLLBACK_FAILED", - "name": "ROLLBACK_FAILED" - }, - { - "value": "DELETE_IN_PROGRESS", - "name": "DELETE_IN_PROGRESS" - }, - { - "value": "DELETE_FAILED", - "name": "DELETE_FAILED" - }, - { - "value": "SYNC_DELETE_IN_PROGRESS", - "name": "SYNC_DELETE_IN_PROGRESS" + "type": "enum", + "members": { + "INVALID_PERMISSIONS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_PERMISSIONS" + } + }, + "CREATE_PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_PENDING" + } + }, + "CREATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_IN_PROGRESS" + } + }, + "CREATE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATE_FAILED" + } + }, + "UPDATE_PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_PENDING" + } + }, + "UPDATE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_IN_PROGRESS" + } + }, + "UPDATE_COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATE_COMPLETE" } - ] + }, + "ROLLBACK_COMPLETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLLBACK_COMPLETE" + } + }, + "ROLLBACK_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ROLLBACK_FAILED" + } + }, + "DELETE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_IN_PROGRESS" + } + }, + "DELETE_FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE_FAILED" + } + }, + "SYNC_DELETE_IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SYNC_DELETE_IN_PROGRESS" + } + } } }, "com.amazonaws.synthetics#CanaryStatus": { @@ -905,6 +955,9 @@ "smithy.api#documentation": "

A structure that contains the configuration for canary artifacts, including \n the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#CreateCanaryResponse": { @@ -916,6 +969,9 @@ "smithy.api#documentation": "

The full details about the canary you have created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#CreateGroup": { @@ -965,6 +1021,9 @@ "smithy.api#documentation": "

A list of key-value pairs to associate with the group. \n You can associate as many as 50 tags with a group.

\n

Tags can help you organize and categorize your\n resources. You can also use them to scope user permissions, by \n granting a user permission to access or change only the resources that have\n certain tag values.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#CreateGroupResponse": { @@ -976,6 +1035,9 @@ "smithy.api#documentation": "

A structure that contains information about the group that was just created.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#DeleteCanary": { @@ -1001,7 +1063,7 @@ } ], "traits": { - "smithy.api#documentation": "

Permanently deletes the specified canary.

\n

If you specify DeleteLambda to true, CloudWatch Synthetics also deletes\n the Lambda functions and layers that are used by the canary.

\n

Other resources used and created by the canary are not automatically deleted. \n After you delete a canary that you do not intend to\n use again, you\n should also delete the following:

\n
    \n
  • \n

    The CloudWatch alarms created for this canary. These alarms have a name of\n Synthetics-SharpDrop-Alarm-MyCanaryName\n .

    \n
  • \n
  • \n

    Amazon S3 objects and buckets, such as the canary's artifact location.

    \n
  • \n
  • \n

    IAM roles created for the canary. If they were created in the console, these roles\n have the name \n role/service-role/CloudWatchSyntheticsRole-MyCanaryName\n .

    \n
  • \n
  • \n

    CloudWatch Logs log groups created for the canary. These logs groups have the name\n /aws/lambda/cwsyn-MyCanaryName\n .

    \n
  • \n
\n \n

Before you delete a canary, you might want to use GetCanary to display\n the information about this canary. Make\n note of the information returned by this operation so that you can delete these resources\n after you delete the canary.

", + "smithy.api#documentation": "

Permanently deletes the specified canary.

\n

If you specify DeleteLambda to true, CloudWatch Synthetics also deletes\n the Lambda functions and layers that are used by the canary.

\n

Other resources used and created by the canary are not automatically deleted. \n After you delete a canary that you do not intend to\n use again, you\n should also delete the following:

\n
    \n
  • \n

    The CloudWatch alarms created for this canary. These alarms have a name of\n Synthetics-SharpDrop-Alarm-MyCanaryName\n .

    \n
  • \n
  • \n

    Amazon S3 objects and buckets, such as the canary's artifact location.

    \n
  • \n
  • \n

    IAM roles created for the canary. If they were created in the console, these roles\n have the name \n role/service-role/CloudWatchSyntheticsRole-MyCanaryName\n .

    \n
  • \n
  • \n

    CloudWatch Logs log groups created for the canary. These logs groups have the name\n /aws/lambda/cwsyn-MyCanaryName\n .

    \n
  • \n
\n

Before you delete a canary, you might want to use GetCanary to display\n the information about this canary. Make\n note of the information returned by this operation so that you can delete these resources\n after you delete the canary.

", "smithy.api#http": { "method": "DELETE", "uri": "/canary/{Name}", @@ -1028,11 +1090,17 @@ "smithy.api#httpQuery": "deleteLambda" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#DeleteCanaryResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.synthetics#DeleteGroup": { "type": "operation", @@ -1076,11 +1144,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#DeleteGroupResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.synthetics#DescribeCanaries": { "type": "operation", @@ -1129,7 +1203,7 @@ } ], "traits": { - "smithy.api#documentation": "

Use this operation to see information from the most recent run of each canary that you have created.

\n \n

This operation supports resource-level authorization using an IAM policy and \n the Names parameter. If you specify the Names parameter, the operation is successful only if you have authorization to view\n all the canaries that you specify in your request. If you do not have permission to view any of \n the canaries, the request fails with a 403 response.

\n

You are required to use the Names parameter if you are logged on to a user or role that has an \n IAM policy that restricts which canaries that you are allowed to view. For more information, \n see \n Limiting a user to viewing specific canaries.

", + "smithy.api#documentation": "

Use this operation to see information from the most recent run of each canary that you have created.

\n

This operation supports resource-level authorization using an IAM policy and \n the Names parameter. If you specify the Names parameter, the operation is successful only if you have authorization to view\n all the canaries that you specify in your request. If you do not have permission to view any of \n the canaries, the request fails with a 403 response.

\n

You are required to use the Names parameter if you are logged on to a user or role that has an \n IAM policy that restricts which canaries that you are allowed to view. For more information, \n see \n Limiting a user to viewing specific canaries.

", "smithy.api#http": { "method": "POST", "uri": "/canaries/last-run", @@ -1175,6 +1249,9 @@ "smithy.api#documentation": "

Use this parameter to return only canaries that match the names that you specify here. You can\n specify as many as five canary names.

\n

If you specify this parameter, the operation is successful only if you have authorization to view\n all the canaries that you specify in your request. If you do not have permission to view any of \n the canaries, the request fails with a 403 response.

\n

You are required to use the Names parameter if you are logged on to a user or role that has an \n IAM policy that restricts which canaries that you are allowed to view. For more information, \n see \n Limiting a user to viewing specific canaries.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#DescribeCanariesLastRunResponse": { @@ -1192,6 +1269,9 @@ "smithy.api#documentation": "

A token that indicates that there is more data\n available. You can use this token in a subsequent DescribeCanariesLastRun operation to retrieve the next \n set of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#DescribeCanariesNameFilter": { @@ -1227,6 +1307,9 @@ "smithy.api#documentation": "

Use this parameter to return only canaries that match the names that you specify here. You can\n specify as many as five canary names.

\n

If you specify this parameter, the operation is successful only if you have authorization to view\n all the canaries that you specify in your request. If you do not have permission to view any of \n the canaries, the request fails with a 403 response.

\n

You are required to use this parameter if you are logged on to a user or role that has an \n IAM policy that restricts which canaries that you are allowed to view. For more information, \n see \n Limiting a user to viewing specific canaries.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#DescribeCanariesResponse": { @@ -1244,6 +1327,9 @@ "smithy.api#documentation": "

A token that indicates that there is more data\n available. You can use this token in a subsequent DescribeCanaries operation to retrieve the next \n set of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#DescribeRuntimeVersions": { @@ -1291,6 +1377,9 @@ "smithy.api#documentation": "

Specify this parameter to limit how many runs are returned each time you use\n the DescribeRuntimeVersions operation. If you omit this parameter, the default of 100 is used.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#DescribeRuntimeVersionsResponse": { @@ -1308,6 +1397,9 @@ "smithy.api#documentation": "

A token that indicates that there is more data\n available. You can use this token in a subsequent DescribeRuntimeVersions operation to retrieve the next \n set of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#DisassociateResource": { @@ -1359,25 +1451,33 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#DisassociateResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.synthetics#EncryptionMode": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SSE_S3", - "name": "SSE_S3" - }, - { - "value": "SSE_KMS", - "name": "SSE_KMS" + "type": "enum", + "members": { + "SSE_S3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SSE_S3" + } + }, + "SSE_KMS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SSE_KMS" } - ] + } } }, "com.amazonaws.synthetics#EnvironmentVariableName": { @@ -1447,6 +1547,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#GetCanaryResponse": { @@ -1458,6 +1561,9 @@ "smithy.api#documentation": "

A structure that contains the full information about the canary.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#GetCanaryRuns": { @@ -1516,6 +1622,9 @@ "smithy.api#documentation": "

Specify this parameter to limit how many runs are returned each time you use\n the GetCanaryRuns operation. If you omit this parameter, the default of 100 is used.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#GetCanaryRunsResponse": { @@ -1533,6 +1642,9 @@ "smithy.api#documentation": "

A token that indicates that there is more data\n available. You can use this token in a subsequent GetCanaryRuns \n operation to retrieve the next \n set of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#GetGroup": { @@ -1577,6 +1689,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#GetGroupResponse": { @@ -1588,6 +1703,9 @@ "smithy.api#documentation": "

A structure that contains information about the group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#Group": { @@ -1786,6 +1904,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#ListAssociatedGroupsResponse": { @@ -1803,6 +1924,9 @@ "smithy.api#documentation": "

A token that indicates that there is more data\n available. You can use this token in a subsequent ListAssociatedGroups operation to retrieve the next \n set of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#ListGroupResources": { @@ -1864,6 +1988,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#ListGroupResourcesResponse": { @@ -1881,6 +2008,9 @@ "smithy.api#documentation": "

A token that indicates that there is more data\n available. You can use this token in a subsequent ListGroupResources operation to retrieve the next \n set of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#ListGroups": { @@ -1928,6 +2058,9 @@ "smithy.api#documentation": "

Specify this parameter to limit how many groups are returned each time you use\n the ListGroups operation. If you omit this parameter, the default of 20 is used.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#ListGroupsResponse": { @@ -1945,6 +2078,9 @@ "smithy.api#documentation": "

A token that indicates that there is more data\n available. You can use this token in a subsequent ListGroups operation to retrieve the next \n set of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#ListTagsForResource": { @@ -1987,11 +2123,14 @@ "ResourceArn": { "target": "com.amazonaws.synthetics#ResourceArn", "traits": { - "smithy.api#documentation": "

The ARN of the canary or group that you want to view tags for.

\n

The ARN format of a canary is\n arn:aws:synthetics:Region:account-id:canary:canary-name\n .

\n

The ARN format of a group is\n arn:aws:synthetics:Region:account-id:group:group-name\n \n

", + "smithy.api#documentation": "

The ARN of the canary or group that you want to view tags for.

\n

The ARN format of a canary is\n arn:aws:synthetics:Region:account-id:canary:canary-name\n .

\n

The ARN format of a group is\n arn:aws:synthetics:Region:account-id:group:group-name\n \n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#ListTagsForResourceResponse": { @@ -2003,6 +2142,9 @@ "smithy.api#documentation": "

The list of tag keys and values associated with the resource that you specified.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.synthetics#MaxCanaryResults": { @@ -2195,7 +2337,7 @@ } }, "traits": { - "smithy.api#documentation": "

A structure that contains the configuration of encryption-at-rest settings for canary artifacts that the canary\n uploads to Amazon S3.

\n

For more information, see\n Encrypting canary artifacts\n

" + "smithy.api#documentation": "

A structure that contains the configuration of encryption-at-rest settings for canary artifacts that the canary\n uploads to Amazon S3.

\n

For more information, see\n Encrypting canary artifacts\n

" } }, "com.amazonaws.synthetics#SecurityGroupId": { @@ -2268,11 +2410,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#StartCanaryResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.synthetics#StopCanary": { "type": "operation", @@ -2316,11 +2464,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#StopCanaryResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.synthetics#String": { "type": "string", @@ -2432,7 +2586,7 @@ "name": "synthetics" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "Amazon CloudWatch Synthetics\n

You can use Amazon CloudWatch Synthetics to continually monitor your services. You can\n create and manage canaries, which are modular, lightweight scripts \n that monitor your endpoints and APIs\n from the outside-in. You can set up your canaries to run\n 24 hours a day, once per minute. The canaries help you check the availability and latency\n of your web services and troubleshoot anomalies by investigating load time data,\n screenshots of the UI, logs, and metrics. The canaries seamlessly integrate with CloudWatch\n ServiceLens to help you trace the causes of impacted nodes in your applications. For more\n information, see Using ServiceLens to Monitor\n the Health of Your Applications in the Amazon CloudWatch User\n Guide.

\n \n

Before you create and manage canaries, be aware of the security considerations. For more\n information, see Security\n Considerations for Synthetics Canaries.

", + "smithy.api#documentation": "Amazon CloudWatch Synthetics\n

You can use Amazon CloudWatch Synthetics to continually monitor your services. You can\n create and manage canaries, which are modular, lightweight scripts \n that monitor your endpoints and APIs\n from the outside-in. You can set up your canaries to run\n 24 hours a day, once per minute. The canaries help you check the availability and latency\n of your web services and troubleshoot anomalies by investigating load time data,\n screenshots of the UI, logs, and metrics. The canaries seamlessly integrate with CloudWatch\n ServiceLens to help you trace the causes of impacted nodes in your applications. For more\n information, see Using ServiceLens to Monitor\n the Health of Your Applications in the Amazon CloudWatch User\n Guide.

\n

Before you create and manage canaries, be aware of the security considerations. For more\n information, see Security\n Considerations for Synthetics Canaries.

", "smithy.api#title": "Synthetics", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -2494,52 +2648,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2547,13 +2705,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2563,224 +2730,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://synthetics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://synthetics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://synthetics-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://synthetics-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://synthetics.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://synthetics.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://synthetics.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://synthetics.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2795,8 +2913,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2808,8 +2926,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2821,8 +2939,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2834,8 +2952,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2847,8 +2965,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2860,8 +2978,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2873,8 +2991,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2886,8 +3004,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2899,8 +3017,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2912,8 +3030,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2925,8 +3043,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2938,8 +3056,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2951,8 +3069,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2964,8 +3082,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2977,8 +3095,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2990,8 +3108,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3003,8 +3121,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3016,8 +3134,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3029,8 +3147,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3042,8 +3160,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3055,8 +3173,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3068,8 +3186,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3081,8 +3199,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3094,8 +3212,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3107,8 +3225,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3120,8 +3238,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3133,8 +3251,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3146,8 +3264,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3159,8 +3277,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3172,8 +3290,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3185,8 +3303,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3198,8 +3316,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3211,8 +3329,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3224,8 +3342,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3237,8 +3355,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3250,8 +3368,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3263,8 +3381,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3276,8 +3394,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3289,8 +3407,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3302,8 +3420,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3315,8 +3444,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3328,8 +3468,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3341,8 +3492,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3354,8 +3516,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3367,8 +3529,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3379,8 +3541,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3391,10 +3553,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -3478,7 +3646,7 @@ "ResourceArn": { "target": "com.amazonaws.synthetics#ResourceArn", "traits": { - "smithy.api#documentation": "

The ARN of the canary or group that you're adding tags to.

\n

The ARN format of a canary is\narn:aws:synthetics:Region:account-id:canary:canary-name\n .

\n

The ARN format of a group is\n arn:aws:synthetics:Region:account-id:group:group-name\n \n

", + "smithy.api#documentation": "

The ARN of the canary or group that you're adding tags to.

\n

The ARN format of a canary is\narn:aws:synthetics:Region:account-id:canary:canary-name\n .

\n

The ARN format of a group is\n arn:aws:synthetics:Region:account-id:group:group-name\n \n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3490,11 +3658,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.synthetics#TagValue": { "type": "string", @@ -3576,7 +3750,7 @@ "ResourceArn": { "target": "com.amazonaws.synthetics#ResourceArn", "traits": { - "smithy.api#documentation": "

The ARN of the canary or group that you're removing tags from.

\n

The ARN format of a canary is\n arn:aws:synthetics:Region:account-id:canary:canary-name\n .

\n

The ARN format of a group is\n arn:aws:synthetics:Region:account-id:group:group-name\n \n

", + "smithy.api#documentation": "

The ARN of the canary or group that you're removing tags from.

\n

The ARN format of a canary is\n arn:aws:synthetics:Region:account-id:canary:canary-name\n .

\n

The ARN format of a group is\n arn:aws:synthetics:Region:account-id:group:group-name\n \n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -3589,11 +3763,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.synthetics#UpdateCanary": { "type": "operation", @@ -3706,11 +3886,17 @@ "smithy.api#documentation": "

A structure that contains the configuration for canary artifacts, \n including the encryption-at-rest settings for artifacts that \n the canary uploads to Amazon S3.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.synthetics#UpdateCanaryResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.synthetics#ValidationException": { "type": "structure", @@ -3743,7 +3929,7 @@ } }, "traits": { - "smithy.api#documentation": "

An object that specifies what screenshots to use as a baseline for visual monitoring by this canary. It can\n optionally also specify parts of the screenshots to ignore during the visual monitoring comparison.

\n \n

Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2\n runtime or later. For more information, see \n Visual monitoring and \n Visual monitoring blueprint\n

" + "smithy.api#documentation": "

An object that specifies what screenshots to use as a baseline for visual monitoring by this canary. It can\n optionally also specify parts of the screenshots to ignore during the visual monitoring comparison.

\n

Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2\n runtime or later. For more information, see \n Visual monitoring and \n Visual monitoring blueprint\n

" } }, "com.amazonaws.synthetics#VisualReferenceOutput": { diff --git a/codegen/sdk-codegen/aws-models/textract.json b/codegen/sdk-codegen/aws-models/textract.json index 17631674560..5c928414d33 100644 --- a/codegen/sdk-codegen/aws-models/textract.json +++ b/codegen/sdk-codegen/aws-models/textract.json @@ -3376,52 +3376,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3429,13 +3433,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3445,224 +3458,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://textract-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://textract-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://textract-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://textract-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://textract.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://textract.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://textract.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://textract.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -4058,6 +4022,17 @@ "UseDualStack": true } }, + { + "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": { @@ -4071,6 +4046,17 @@ "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": { @@ -4084,6 +4070,17 @@ "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": { @@ -4097,6 +4094,17 @@ "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": { @@ -4160,6 +4168,12 @@ "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/timestream-query.json b/codegen/sdk-codegen/aws-models/timestream-query.json index 9545cf1b2b9..13e1aea96af 100644 --- a/codegen/sdk-codegen/aws-models/timestream-query.json +++ b/codegen/sdk-codegen/aws-models/timestream-query.json @@ -98,6 +98,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#CancelQueryResponse": { @@ -109,6 +112,9 @@ "smithy.api#documentation": "

A CancellationMessage is returned when a CancelQuery\n request for the query specified by QueryId has already been issued.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.timestreamquery#ClientRequestToken": { @@ -223,7 +229,7 @@ "QueryString": { "target": "com.amazonaws.timestreamquery#QueryString", "traits": { - "smithy.api#documentation": "

The query string to run. Parameter\n names can be specified in the query string @ character followed by an\n identifier. The named Parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run.

\n

The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of @scheduled_runtime paramater for each query run. \n For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is \n initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.

", + "smithy.api#documentation": "

The query string to run. Parameter\n names can be specified in the query string @ character followed by an\n identifier. The named Parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run.

\n

The timestamp calculated according to the ScheduleConfiguration parameter, will be the value of @scheduled_runtime paramater for each query run. \n For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is \n initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.

", "smithy.api#required": {} } }, @@ -250,7 +256,7 @@ "ClientToken": { "target": "com.amazonaws.timestreamquery#ClientToken", "traits": { - "smithy.api#documentation": "

Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making \n multiple identical CreateScheduledQuery requests has the same effect as making a single request.\n\n

\n
    \n
  • \n

    If CreateScheduledQuery is called without a ClientToken, the\n Query SDK generates a ClientToken on your behalf.

    \n
  • \n
  • \n

    After 8 hours, any request with the same ClientToken is treated\n as a new request.

    \n
  • \n
", + "smithy.api#documentation": "

Using a ClientToken makes the call to CreateScheduledQuery idempotent, in other words, making the same request repeatedly will produce the same result. Making \n multiple identical CreateScheduledQuery requests has the same effect as making a single request.\n\n

\n
    \n
  • \n

    If CreateScheduledQuery is called without a ClientToken, the\n Query SDK generates a ClientToken on your behalf.

    \n
  • \n
  • \n

    After 8 hours, any request with the same ClientToken is treated\n as a new request.

    \n
  • \n
", "smithy.api#idempotencyToken": {} } }, @@ -270,7 +276,7 @@ "KmsKeyId": { "target": "com.amazonaws.timestreamquery#StringValue2048", "traits": { - "smithy.api#documentation": "

The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS\n key is not specified, the scheduled query resource will be encrypted with a Timestream\n owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias\n ARN. When using an alias name, prefix the name with alias/\n

\n

If ErrorReportConfiguration uses SSE_KMS as encryption type, the same KmsKeyId is used to encrypt the error report at rest.

" + "smithy.api#documentation": "

The Amazon KMS key used to encrypt the scheduled query resource, at-rest. If the Amazon KMS\n key is not specified, the scheduled query resource will be encrypted with a Timestream\n owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias\n ARN. When using an alias name, prefix the name with alias/\n

\n

If ErrorReportConfiguration uses SSE_KMS as encryption type, the same KmsKeyId is used to encrypt the error report at rest.

" } }, "ErrorReportConfiguration": { @@ -280,6 +286,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#CreateScheduledQueryResponse": { @@ -292,6 +301,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.timestreamquery#Datum": { @@ -384,6 +396,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#DescribeEndpoints": { @@ -406,12 +421,15 @@ } ], "traits": { - "smithy.api#documentation": "

DescribeEndpoints returns a list of available endpoints to make Timestream\n API calls against. This API is available through both Write and Query.

\n

Because the Timestream SDKs are designed to transparently work with the\n service’s architecture, including the management and mapping of the service endpoints,\n it is not recommended that you use this API unless:

\n \n

For detailed information on how and when to use and implement DescribeEndpoints, see\n The Endpoint Discovery Pattern.

" + "smithy.api#documentation": "

DescribeEndpoints returns a list of available endpoints to make Timestream\n API calls against. This API is available through both Write and Query.

\n

Because the Timestream SDKs are designed to transparently work with the\n service’s architecture, including the management and mapping of the service endpoints,\n it is not recommended that you use this API unless:

\n \n

For detailed information on how and when to use and implement DescribeEndpoints, see\n The Endpoint Discovery Pattern.

" } }, "com.amazonaws.timestreamquery#DescribeEndpointsRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.timestreamquery#DescribeEndpointsResponse": { "type": "structure", @@ -423,6 +441,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.timestreamquery#DescribeScheduledQuery": { @@ -470,6 +491,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#DescribeScheduledQueryResponse": { @@ -482,6 +506,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.timestreamquery#DimensionMapping": { @@ -513,14 +540,14 @@ } }, "com.amazonaws.timestreamquery#DimensionValueType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "VARCHAR", - "name": "VARCHAR" + "type": "enum", + "members": { + "VARCHAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VARCHAR" } - ] + } } }, "com.amazonaws.timestreamquery#Double": { @@ -650,6 +677,9 @@ "smithy.api#idempotencyToken": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#ExecutionStats": { @@ -754,6 +784,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "ScheduledQueries", "pageSize": "MaxResults" } } @@ -773,6 +804,9 @@ "smithy.api#documentation": "

A pagination token to resume pagination.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#ListScheduledQueriesResponse": { @@ -791,6 +825,9 @@ "smithy.api#documentation": "

A token to specify where to start paginating. This is the NextToken from a previously\n truncated response.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.timestreamquery#ListTagsForResource": { @@ -823,6 +860,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "Tags", "pageSize": "MaxResults" } } @@ -849,6 +887,9 @@ "smithy.api#documentation": "

A pagination token to resume pagination.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#ListTagsForResourceResponse": { @@ -867,6 +908,9 @@ "smithy.api#documentation": "

A pagination token to resume pagination with a subsequent call to\n ListTagsForResourceResponse.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.timestreamquery#Long": { @@ -903,30 +947,38 @@ } }, "com.amazonaws.timestreamquery#MeasureValueType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BIGINT", - "name": "BIGINT" - }, - { - "value": "BOOLEAN", - "name": "BOOLEAN" - }, - { - "value": "DOUBLE", - "name": "DOUBLE" - }, - { - "value": "VARCHAR", - "name": "VARCHAR" - }, - { - "value": "MULTI", - "name": "MULTI" + "type": "enum", + "members": { + "BIGINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BIGINT" } - ] + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOOLEAN" + } + }, + "DOUBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOUBLE" + } + }, + "VARCHAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VARCHAR" + } + }, + "MULTI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MULTI" + } + } } }, "com.amazonaws.timestreamquery#MixedMeasureMapping": { @@ -1148,6 +1200,9 @@ "smithy.api#documentation": "

By setting this value to true, Timestream will only validate that the\n query string is a valid Timestream query, and not store the prepared query for later\n use.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#PrepareQueryResponse": { @@ -1174,6 +1229,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.timestreamquery#Query": { @@ -1211,7 +1269,7 @@ "aws.api#clientDiscoveredEndpoint": { "required": true }, - "smithy.api#documentation": "

\n Query is a synchronous operation that enables you to run a query against\n your Amazon Timestream data. Query will time out after 60 seconds.\n You must update the default timeout in the SDK to support a timeout of 60 seconds. See\n the code\n sample for details.

\n

Your query request will fail in the following cases:

\n
    \n
  • \n

    If you submit a Query request with the same client token outside\n of the 5-minute idempotency window.

    \n
  • \n
  • \n

    If you submit a Query request with the same client token, but\n change other parameters, within the 5-minute idempotency window.

    \n
  • \n
  • \n

    If the size of the row (including the query metadata) exceeds 1 MB, then the\n query will fail with the following error message:

    \n

    \n Query aborted as max page response size has been exceeded by the output\n result row\n

    \n
  • \n
  • \n

    If the IAM principal of the query initiator and the result reader are not the\n same and/or the query initiator and the result reader do not have the same query\n string in the query requests, the query will fail with an Invalid\n pagination token error.

    \n
  • \n
", + "smithy.api#documentation": "

\n Query is a synchronous operation that enables you to run a query against\n your Amazon Timestream data. Query will time out after 60 seconds.\n You must update the default timeout in the SDK to support a timeout of 60 seconds. See\n the code\n sample for details.

\n

Your query request will fail in the following cases:

\n
    \n
  • \n

    If you submit a Query request with the same client token outside\n of the 5-minute idempotency window.

    \n
  • \n
  • \n

    If you submit a Query request with the same client token, but\n change other parameters, within the 5-minute idempotency window.

    \n
  • \n
  • \n

    If the size of the row (including the query metadata) exceeds 1 MB, then the\n query will fail with the following error message:

    \n

    \n Query aborted as max page response size has been exceeded by the output\n result row\n

    \n
  • \n
  • \n

    If the IAM principal of the query initiator and the result reader are not the\n same and/or the query initiator and the result reader do not have the same query\n string in the query requests, the query will fail with an Invalid\n pagination token error.

    \n
  • \n
", "smithy.api#idempotent": {}, "smithy.api#paginated": { "inputToken": "NextToken", @@ -1257,22 +1315,25 @@ "ClientToken": { "target": "com.amazonaws.timestreamquery#ClientRequestToken", "traits": { - "smithy.api#documentation": "

Unique, case-sensitive string of up to 64 ASCII characters specified when a\n Query request is made. Providing a ClientToken makes the\n call to Query\n idempotent. This means that running the same query repeatedly will\n produce the same result. In other words, making multiple identical Query\n requests has the same effect as making a single request. When using\n ClientToken in a query, note the following:

\n
    \n
  • \n

    If the Query API is instantiated without a ClientToken, the\n Query SDK generates a ClientToken on your behalf.

    \n
  • \n
  • \n

    If the Query invocation only contains the\n ClientToken but does not include a NextToken, that\n invocation of Query is assumed to be a new query run.

    \n
  • \n
  • \n

    If the invocation contains NextToken, that particular invocation\n is assumed to be a subsequent invocation of a prior call to the Query API, and a\n result set is returned.

    \n
  • \n
  • \n

    After 4 hours, any request with the same ClientToken is treated\n as a new request.

    \n
  • \n
", + "smithy.api#documentation": "

Unique, case-sensitive string of up to 64 ASCII characters specified when a\n Query request is made. Providing a ClientToken makes the\n call to Query\n idempotent. This means that running the same query repeatedly will\n produce the same result. In other words, making multiple identical Query\n requests has the same effect as making a single request. When using\n ClientToken in a query, note the following:

\n
    \n
  • \n

    If the Query API is instantiated without a ClientToken, the\n Query SDK generates a ClientToken on your behalf.

    \n
  • \n
  • \n

    If the Query invocation only contains the\n ClientToken but does not include a NextToken, that\n invocation of Query is assumed to be a new query run.

    \n
  • \n
  • \n

    If the invocation contains NextToken, that particular invocation\n is assumed to be a subsequent invocation of a prior call to the Query API, and a\n result set is returned.

    \n
  • \n
  • \n

    After 4 hours, any request with the same ClientToken is treated\n as a new request.

    \n
  • \n
", "smithy.api#idempotencyToken": {} } }, "NextToken": { "target": "com.amazonaws.timestreamquery#PaginationToken", "traits": { - "smithy.api#documentation": "

A pagination token used to return a set of results. When the Query API\n is invoked using NextToken, that particular invocation is assumed to be a\n subsequent invocation of a prior call to Query, and a result set is\n returned. However, if the Query invocation only contains the\n ClientToken, that invocation of Query is assumed to be a\n new query run.

\n

Note the following when using NextToken in a query:

\n
    \n
  • \n

    A pagination token can be used for up to five Query invocations,\n OR for a duration of up to 1 hour – whichever comes first.

    \n
  • \n
  • \n

    Using the same NextToken will return the same set of records. To\n keep paginating through the result set, you must to use the most recent\n nextToken.

    \n
  • \n
  • \n

    Suppose a Query invocation returns two NextToken\n values, TokenA and TokenB. If TokenB is\n used in a subsequent Query invocation, then TokenA is\n invalidated and cannot be reused.

    \n
  • \n
  • \n

    To request a previous result set from a query after pagination has begun, you\n must re-invoke the Query API.

    \n
  • \n
  • \n

    The latest NextToken should be used to paginate until\n null is returned, at which point a new NextToken\n should be used.

    \n
  • \n
  • \n

    If the IAM principal of the query initiator and the result reader are not the\n same and/or the query initiator and the result reader do not have the same query\n string in the query requests, the query will fail with an Invalid\n pagination token error.

    \n
  • \n
" + "smithy.api#documentation": "

A pagination token used to return a set of results. When the Query API\n is invoked using NextToken, that particular invocation is assumed to be a\n subsequent invocation of a prior call to Query, and a result set is\n returned. However, if the Query invocation only contains the\n ClientToken, that invocation of Query is assumed to be a\n new query run.

\n

Note the following when using NextToken in a query:

\n
    \n
  • \n

    A pagination token can be used for up to five Query invocations,\n OR for a duration of up to 1 hour – whichever comes first.

    \n
  • \n
  • \n

    Using the same NextToken will return the same set of records. To\n keep paginating through the result set, you must to use the most recent\n nextToken.

    \n
  • \n
  • \n

    Suppose a Query invocation returns two NextToken\n values, TokenA and TokenB. If TokenB is\n used in a subsequent Query invocation, then TokenA is\n invalidated and cannot be reused.

    \n
  • \n
  • \n

    To request a previous result set from a query after pagination has begun, you\n must re-invoke the Query API.

    \n
  • \n
  • \n

    The latest NextToken should be used to paginate until\n null is returned, at which point a new NextToken\n should be used.

    \n
  • \n
  • \n

    If the IAM principal of the query initiator and the result reader are not the\n same and/or the query initiator and the result reader do not have the same query\n string in the query requests, the query will fail with an Invalid\n pagination token error.

    \n
  • \n
" } }, "MaxRows": { "target": "com.amazonaws.timestreamquery#MaxQueryResults", "traits": { - "smithy.api#documentation": "

The total number of rows to be returned in the Query output. The initial\n run of Query with a MaxRows value specified will return the\n result set of the query in two cases:

\n
    \n
  • \n

    The size of the result is less than 1MB.

    \n
  • \n
  • \n

    The number of rows in the result set is less than the value of\n maxRows.

    \n
  • \n
\n

Otherwise, the initial invocation of Query only returns a\n NextToken, which can then be used in subsequent calls to fetch the\n result set. To resume pagination, provide the NextToken value in the\n subsequent command.

\n

If the row size is large (e.g. a row has many columns), Timestream may return\n fewer rows to keep the response size from exceeding the 1 MB limit. If\n MaxRows is not provided, Timestream will send the necessary\n number of rows to meet the 1 MB limit.

" + "smithy.api#documentation": "

The total number of rows to be returned in the Query output. The initial\n run of Query with a MaxRows value specified will return the\n result set of the query in two cases:

\n
    \n
  • \n

    The size of the result is less than 1MB.

    \n
  • \n
  • \n

    The number of rows in the result set is less than the value of\n maxRows.

    \n
  • \n
\n

Otherwise, the initial invocation of Query only returns a\n NextToken, which can then be used in subsequent calls to fetch the\n result set. To resume pagination, provide the NextToken value in the\n subsequent command.

\n

If the row size is large (e.g. a row has many columns), Timestream may return\n fewer rows to keep the response size from exceeding the 1 MB limit. If\n MaxRows is not provided, Timestream will send the necessary\n number of rows to meet the 1 MB limit.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#QueryResponse": { @@ -1311,6 +1372,9 @@ "smithy.api#documentation": "

Information about the status of the query, including progress and bytes\n scanned.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.timestreamquery#QueryStatus": { @@ -1433,18 +1497,20 @@ } }, "com.amazonaws.timestreamquery#S3EncryptionOption": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SSE_S3", - "name": "SSE_S3" - }, - { - "value": "SSE_KMS", - "name": "SSE_KMS" + "type": "enum", + "members": { + "SSE_S3": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SSE_S3" } - ] + }, + "SSE_KMS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SSE_KMS" + } + } } }, "com.amazonaws.timestreamquery#S3ObjectKey": { @@ -1481,81 +1547,109 @@ } }, "com.amazonaws.timestreamquery#ScalarMeasureValueType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BIGINT", - "name": "BIGINT" - }, - { - "value": "BOOLEAN", - "name": "BOOLEAN" - }, - { - "value": "DOUBLE", - "name": "DOUBLE" - }, - { - "value": "VARCHAR", - "name": "VARCHAR" - }, - { - "value": "TIMESTAMP", - "name": "TIMESTAMP" + "type": "enum", + "members": { + "BIGINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BIGINT" + } + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOOLEAN" } - ] + }, + "DOUBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOUBLE" + } + }, + "VARCHAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VARCHAR" + } + }, + "TIMESTAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMESTAMP" + } + } } }, "com.amazonaws.timestreamquery#ScalarType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "VARCHAR", - "name": "VARCHAR" - }, - { - "value": "BOOLEAN", - "name": "BOOLEAN" - }, - { - "value": "BIGINT", - "name": "BIGINT" - }, - { - "value": "DOUBLE", - "name": "DOUBLE" - }, - { - "value": "TIMESTAMP", - "name": "TIMESTAMP" - }, - { - "value": "DATE", - "name": "DATE" - }, - { - "value": "TIME", - "name": "TIME" - }, - { - "value": "INTERVAL_DAY_TO_SECOND", - "name": "INTERVAL_DAY_TO_SECOND" - }, - { - "value": "INTERVAL_YEAR_TO_MONTH", - "name": "INTERVAL_YEAR_TO_MONTH" - }, - { - "value": "UNKNOWN", - "name": "UNKNOWN" - }, - { - "value": "INTEGER", - "name": "INTEGER" + "type": "enum", + "members": { + "VARCHAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VARCHAR" + } + }, + "BOOLEAN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BOOLEAN" } - ] + }, + "BIGINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BIGINT" + } + }, + "DOUBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DOUBLE" + } + }, + "TIMESTAMP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIMESTAMP" + } + }, + "DATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DATE" + } + }, + "TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TIME" + } + }, + "INTERVAL_DAY_TO_SECOND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTERVAL_DAY_TO_SECOND" + } + }, + "INTERVAL_YEAR_TO_MONTH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTERVAL_YEAR_TO_MONTH" + } + }, + "UNKNOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UNKNOWN" + } + }, + "INTEGER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INTEGER" + } + } } }, "com.amazonaws.timestreamquery#ScalarValue": { @@ -1771,26 +1865,32 @@ } }, "com.amazonaws.timestreamquery#ScheduledQueryRunStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AUTO_TRIGGER_SUCCESS", - "name": "AUTO_TRIGGER_SUCCESS" - }, - { - "value": "AUTO_TRIGGER_FAILURE", - "name": "AUTO_TRIGGER_FAILURE" - }, - { - "value": "MANUAL_TRIGGER_SUCCESS", - "name": "MANUAL_TRIGGER_SUCCESS" - }, - { - "value": "MANUAL_TRIGGER_FAILURE", - "name": "MANUAL_TRIGGER_FAILURE" + "type": "enum", + "members": { + "AUTO_TRIGGER_SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUTO_TRIGGER_SUCCESS" + } + }, + "AUTO_TRIGGER_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AUTO_TRIGGER_FAILURE" + } + }, + "MANUAL_TRIGGER_SUCCESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MANUAL_TRIGGER_SUCCESS" } - ] + }, + "MANUAL_TRIGGER_FAILURE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MANUAL_TRIGGER_FAILURE" + } + } } }, "com.amazonaws.timestreamquery#ScheduledQueryRunSummary": { @@ -1844,18 +1944,20 @@ } }, "com.amazonaws.timestreamquery#ScheduledQueryState": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENABLED", - "name": "ENABLED" - }, - { - "value": "DISABLED", - "name": "DISABLED" + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" } - ] + } } }, "com.amazonaws.timestreamquery#SchemaName": { @@ -2049,11 +2151,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.timestreamquery#TagValue": { "type": "string", @@ -2274,7 +2382,7 @@ "name": "timestream" }, "aws.protocols#awsJson1_0": {}, - "smithy.api#documentation": "Amazon Timestream Query\n \n

", + "smithy.api#documentation": "Amazon Timestream Query\n \n

", "smithy.api#title": "Amazon Timestream Query", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -2336,52 +2444,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2389,13 +2501,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2405,224 +2526,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://query.timestream-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://query.timestream-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://query.timestream-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://query.timestream-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://query.timestream.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://query.timestream.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://query.timestream.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://query.timestream.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2637,8 +2709,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2650,8 +2722,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2663,8 +2735,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2676,8 +2748,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2689,8 +2761,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2702,8 +2774,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2715,8 +2787,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2728,8 +2800,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2741,8 +2813,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2754,8 +2826,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2767,8 +2839,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2780,8 +2852,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2793,8 +2876,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2806,8 +2900,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2819,8 +2924,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -2832,8 +2948,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2845,8 +2961,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2858,8 +2974,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2870,8 +2986,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -2882,10 +2998,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2970,11 +3092,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.timestreamquery#UpdateScheduledQuery": { "type": "operation", @@ -3028,6 +3156,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.timestreamquery#ValidationException": { diff --git a/codegen/sdk-codegen/aws-models/timestream-write.json b/codegen/sdk-codegen/aws-models/timestream-write.json index a3378d042b1..7c2da01499a 100644 --- a/codegen/sdk-codegen/aws-models/timestream-write.json +++ b/codegen/sdk-codegen/aws-models/timestream-write.json @@ -2883,52 +2883,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2936,13 +2940,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2952,92 +2965,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://ingest.timestream-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://ingest.timestream-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -3046,130 +3050,115 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://ingest.timestream-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://ingest.timestream.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://ingest.timestream-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://ingest.timestream.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://ingest.timestream.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://ingest.timestream.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://ingest.timestream.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3279,6 +3268,32 @@ "UseDualStack": false } }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://ingest.timestream.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, { "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { @@ -3296,7 +3311,7 @@ "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://ingest.timestream-fips.us-gov-east-1.amazonaws.com" + "url": "https://ingest.timestream.us-gov-east-1.amazonaws.com" } }, "params": { diff --git a/codegen/sdk-codegen/aws-models/tnb.json b/codegen/sdk-codegen/aws-models/tnb.json index f8fd250fda7..16c21fe9c6e 100644 --- a/codegen/sdk-codegen/aws-models/tnb.json +++ b/codegen/sdk-codegen/aws-models/tnb.json @@ -4718,54 +4718,54 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://tnb-fips.us-gov-east-1.api.aws" + "url": "https://tnb-fips.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://tnb-fips.us-gov-east-1.amazonaws.com" + "url": "https://tnb-fips.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-gov-east-1", "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://tnb.us-gov-east-1.api.aws" + "url": "https://tnb.us-east-1.api.aws" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://tnb.us-gov-east-1.amazonaws.com" + "url": "https://tnb.us-east-1.amazonaws.com" } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-gov-east-1", "UseDualStack": false } }, @@ -4777,8 +4777,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -4790,8 +4790,8 @@ } }, "params": { - "UseFIPS": true, "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -4803,8 +4803,8 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -4816,108 +4816,108 @@ } }, "params": { - "UseFIPS": false, "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://tnb-fips.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://tnb-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://tnb-fips.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://tnb.us-gov-east-1.api.aws" + } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://tnb.us-iso-east-1.c2s.ic.gov" + "url": "https://tnb.us-gov-east-1.amazonaws.com" } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-iso-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://tnb-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://tnb-fips.us-east-1.amazonaws.com" + "url": "https://tnb-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-east-1", "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://tnb.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://tnb.us-east-1.amazonaws.com" + "url": "https://tnb.us-iso-east-1.c2s.ic.gov" } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-east-1", "UseDualStack": false } }, @@ -4927,8 +4927,8 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": true } }, @@ -4940,8 +4940,8 @@ } }, "params": { - "UseFIPS": true, "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": false } }, @@ -4951,8 +4951,8 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": true } }, @@ -4964,21 +4964,34 @@ } }, "params": { - "UseFIPS": false, "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -4989,8 +5002,8 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": false, "Endpoint": "https://example.com" } @@ -5001,11 +5014,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/transcribe-streaming.json b/codegen/sdk-codegen/aws-models/transcribe-streaming.json index 93e63cde42a..49bde387a53 100644 --- a/codegen/sdk-codegen/aws-models/transcribe-streaming.json +++ b/codegen/sdk-codegen/aws-models/transcribe-streaming.json @@ -96,7 +96,7 @@ } }, "traits": { - "smithy.api#documentation": "

An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket \n data frames.

\n

For more information, see Transcribing streaming audio.

", + "smithy.api#documentation": "

An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket \n data frames.

\n

For more information, see Transcribing streaming audio.

", "smithy.api#streaming": {} } }, @@ -915,7 +915,7 @@ "Confidence": { "target": "com.amazonaws.transcribestreaming#Confidence", "traits": { - "smithy.api#documentation": "

The confidence score associated with the identified PHI entity in your audio.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified entity correctly matches the entity spoken in your\n media.

" + "smithy.api#documentation": "

The confidence score associated with the identified PHI entity in your audio.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified entity correctly matches the entity spoken in your\n media.

" } } }, @@ -961,7 +961,7 @@ "Confidence": { "target": "com.amazonaws.transcribestreaming#Confidence", "traits": { - "smithy.api#documentation": "

The confidence score associated with a word or phrase in your transcript.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified item correctly matches the item spoken in your\n media.

" + "smithy.api#documentation": "

The confidence score associated with a word or phrase in your transcript.

\n

Confidence scores are values between 0 and 1. A larger value indicates a higher\n probability that the identified item correctly matches the item spoken in your\n media.

" } }, "Speaker": { @@ -1008,7 +1008,7 @@ "target": "com.amazonaws.transcribestreaming#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Indicates if the segment is complete.

\n

If IsPartial is true, the segment is not complete. If\n IsPartial is false, the segment is complete.

" + "smithy.api#documentation": "

Indicates if the segment is complete.

\n

If IsPartial is true, the segment is not complete. If\n IsPartial is false, the segment is complete.

" } }, "Alternatives": { @@ -1025,7 +1025,7 @@ } }, "traits": { - "smithy.api#documentation": "

The Result associated with a \n .

\n

Contains a set of transcription results from one or more audio segments, along with\n additional information per your request parameters. This can include information relating to\n alternative transcriptions, channel identification, partial result stabilization, language \n identification, and other transcription-related data.

" + "smithy.api#documentation": "

The Result associated with a \n .

\n

Contains a set of transcription results from one or more audio segments, along with\n additional information per your request parameters. This can include information relating to\n alternative transcriptions, channel identification, partial result stabilization, language \n identification, and other transcription-related data.

" } }, "com.amazonaws.transcribestreaming#MedicalResultList": { @@ -1045,7 +1045,7 @@ } }, "traits": { - "smithy.api#documentation": "

The MedicalTranscript associated with a \n .

\n

\n MedicalTranscript contains Results, which contains a set of \n transcription results from one or more audio segments, along with additional information per your \n request parameters.

" + "smithy.api#documentation": "

The MedicalTranscript associated with a \n .

\n

\n MedicalTranscript contains Results, which contains a set of \n transcription results from one or more audio segments, along with additional information per your \n request parameters.

" } }, "com.amazonaws.transcribestreaming#MedicalTranscriptEvent": { @@ -1059,7 +1059,7 @@ } }, "traits": { - "smithy.api#documentation": "

The MedicalTranscriptEvent associated with a \n MedicalTranscriptResultStream.

\n

Contains a set of transcription results from one or more audio segments, along with additional \n information per your request parameters.

" + "smithy.api#documentation": "

The MedicalTranscriptEvent associated with a \n MedicalTranscriptResultStream.

\n

Contains a set of transcription results from one or more audio segments, along with additional \n information per your request parameters.

" } }, "com.amazonaws.transcribestreaming#MedicalTranscriptResultStream": { @@ -1068,7 +1068,7 @@ "TranscriptEvent": { "target": "com.amazonaws.transcribestreaming#MedicalTranscriptEvent", "traits": { - "smithy.api#documentation": "

The MedicalTranscriptEvent associated with a \n MedicalTranscriptResultStream.

\n

Contains a set of transcription results from one or more audio segments, along with \n additional information per your request parameters. This can include information relating to\n alternative transcriptions, channel identification, partial result stabilization, language \n identification, and other transcription-related data.

" + "smithy.api#documentation": "

The MedicalTranscriptEvent associated with a \n MedicalTranscriptResultStream.

\n

Contains a set of transcription results from one or more audio segments, along with \n additional information per your request parameters. This can include information relating to\n alternative transcriptions, channel identification, partial result stabilization, language \n identification, and other transcription-related data.

" } }, "BadRequestException": { @@ -1457,7 +1457,7 @@ "VocabularyFilterName": { "target": "com.amazonaws.transcribestreaming#VocabularyFilterName", "traits": { - "smithy.api#documentation": "

Specify the name of the custom vocabulary filter that you want to use when processing your\n transcription. Note that vocabulary filter names are case sensitive.

\n

If the language of the specified custom vocabulary filter doesn't match the language identified in\n your media, the vocabulary filter is not applied to your transcription.

\n

For more information, see Using vocabulary filtering with unwanted \n words.

", + "smithy.api#documentation": "

Specify the name of the custom vocabulary filter that you want to use when processing your\n transcription. Note that vocabulary filter names are case sensitive.

\n

If the language of the specified custom vocabulary filter doesn't match the language identified in\n your media, the vocabulary filter is not applied to your transcription.

\n

For more information, see Using vocabulary filtering with unwanted \n words.

", "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-name" } }, @@ -1471,7 +1471,7 @@ "LanguageModelName": { "target": "com.amazonaws.transcribestreaming#ModelName", "traits": { - "smithy.api#documentation": "

Specify the name of the custom language model that you want to use when processing your\n transcription. Note that language model names are case sensitive.

\n

The language of the specified language model must match the language code you specify\n in your transcription request. If the languages don't match, the custom language model isn't applied. \n There are no errors or warnings associated with a language mismatch.

\n

For more information, see Custom language models.

", + "smithy.api#documentation": "

Specify the name of the custom language model that you want to use when processing your\n transcription. Note that language model names are case sensitive.

\n

The language of the specified language model must match the language code you specify\n in your transcription request. If the languages don't match, the custom language model isn't applied. \n There are no errors or warnings associated with a language mismatch.

\n

For more information, see Custom language models.

", "smithy.api#httpHeader": "x-amzn-transcribe-language-model-name" } }, @@ -1486,21 +1486,21 @@ "PartialResultsStability": { "target": "com.amazonaws.transcribestreaming#PartialResultsStability", "traits": { - "smithy.api#documentation": "

Specify the level of stability to use when you enable partial results stabilization \n (EnablePartialResultsStabilization).

\n

Low stability provides the highest accuracy. High stability transcribes faster, but with slightly\n lower accuracy.

\n

For more information, see Partial-result \n stabilization.

", + "smithy.api#documentation": "

Specify the level of stability to use when you enable partial results stabilization \n (EnablePartialResultsStabilization).

\n

Low stability provides the highest accuracy. High stability transcribes faster, but with slightly\n lower accuracy.

\n

For more information, see Partial-result \n stabilization.

", "smithy.api#httpHeader": "x-amzn-transcribe-partial-results-stability" } }, "ContentIdentificationType": { "target": "com.amazonaws.transcribestreaming#ContentIdentificationType", "traits": { - "smithy.api#documentation": "

Labels all personally identifiable information (PII) identified in your transcript.

\n

Content identification is performed at the segment level; PII specified in \n PiiEntityTypes is flagged upon complete transcription of an audio segment.

\n

You can’t set ContentIdentificationType and ContentRedactionType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", + "smithy.api#documentation": "

Labels all personally identifiable information (PII) identified in your transcript.

\n

Content identification is performed at the segment level; PII specified in \n PiiEntityTypes is flagged upon complete transcription of an audio segment.

\n

You can’t set ContentIdentificationType and ContentRedactionType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" } }, "ContentRedactionType": { "target": "com.amazonaws.transcribestreaming#ContentRedactionType", "traits": { - "smithy.api#documentation": "

Redacts all personally identifiable information (PII) identified in your transcript.

\n

Content redaction is performed at the segment level; PII specified in \n PiiEntityTypes is redacted upon complete transcription of an audio segment.

\n

You can’t set ContentRedactionType and ContentIdentificationType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", + "smithy.api#documentation": "

Redacts all personally identifiable information (PII) identified in your transcript.

\n

Content redaction is performed at the segment level; PII specified in \n PiiEntityTypes is redacted upon complete transcription of an audio segment.

\n

You can’t set ContentRedactionType and ContentIdentificationType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", "smithy.api#httpHeader": "x-amzn-transcribe-content-redaction-type" } }, @@ -1511,6 +1511,9 @@ "smithy.api#httpHeader": "x-amzn-transcribe-pii-entity-types" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.transcribestreaming#StartCallAnalyticsStreamTranscriptionResponse": { @@ -1622,6 +1625,9 @@ "smithy.api#httpHeader": "x-amzn-transcribe-pii-entity-types" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.transcribestreaming#StartMedicalStreamTranscription": { @@ -1650,7 +1656,7 @@ } ], "traits": { - "smithy.api#documentation": "

Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to \n Amazon Transcribe Medical and the transcription results are streamed to your\n application.

\n

The following parameters are required:

\n
    \n
  • \n

    \n language-code\n

    \n
  • \n
  • \n

    \n media-encoding\n

    \n
  • \n
  • \n

    \n sample-rate\n

    \n
  • \n
\n

For more information on streaming with Amazon Transcribe Medical, see \n Transcribing\n streaming audio.

", + "smithy.api#documentation": "

Starts a bidirectional HTTP/2 or WebSocket stream where audio is streamed to \n Amazon Transcribe Medical and the transcription results are streamed to your\n application.

\n

The following parameters are required:

\n
    \n
  • \n

    \n language-code\n

    \n
  • \n
  • \n

    \n media-encoding\n

    \n
  • \n
  • \n

    \n sample-rate\n

    \n
  • \n
\n

For more information on streaming with Amazon Transcribe Medical, see \n Transcribing\n streaming audio.

", "smithy.api#http": { "method": "POST", "uri": "/medical-stream-transcription", @@ -1664,7 +1670,7 @@ "LanguageCode": { "target": "com.amazonaws.transcribestreaming#LanguageCode", "traits": { - "smithy.api#documentation": "

Specify the language code that represents the language spoken in your audio.

\n \n

Amazon Transcribe Medical only supports US English (en-US).

\n
", + "smithy.api#documentation": "

Specify the language code that represents the language spoken in your audio.

\n \n

Amazon Transcribe Medical only supports US English (en-US).

\n
", "smithy.api#httpHeader": "x-amzn-transcribe-language-code", "smithy.api#required": {} } @@ -1680,7 +1686,7 @@ "MediaEncoding": { "target": "com.amazonaws.transcribestreaming#MediaEncoding", "traits": { - "smithy.api#documentation": "

Specify the encoding used for the input audio. Supported formats are:

\n
    \n
  • \n

    FLAC

    \n
  • \n
  • \n

    OPUS-encoded audio in an Ogg container

    \n
  • \n
  • \n

    PCM (only signed 16-bit little-endian audio formats, which does not include\n WAV)

    \n
  • \n
\n

For more information, see Media formats.

", + "smithy.api#documentation": "

Specify the encoding used for the input audio. Supported formats are:

\n
    \n
  • \n

    FLAC

    \n
  • \n
  • \n

    OPUS-encoded audio in an Ogg container

    \n
  • \n
  • \n

    PCM (only signed 16-bit little-endian audio formats, which does not include\n WAV)

    \n
  • \n
\n

For more information, see Media formats.

", "smithy.api#httpHeader": "x-amzn-transcribe-media-encoding", "smithy.api#required": {} } @@ -1712,14 +1718,14 @@ "target": "com.amazonaws.transcribestreaming#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Enables speaker partitioning (diarization) in your transcription output. Speaker\n partitioning labels the speech from individual speakers in your media file.

\n

For more information, see Partitioning speakers (diarization).

", + "smithy.api#documentation": "

Enables speaker partitioning (diarization) in your transcription output. Speaker\n partitioning labels the speech from individual speakers in your media file.

\n

For more information, see Partitioning speakers (diarization).

", "smithy.api#httpHeader": "x-amzn-transcribe-show-speaker-label" } }, "SessionId": { "target": "com.amazonaws.transcribestreaming#SessionId", "traits": { - "smithy.api#documentation": "

Specify a name for your transcription session. If you don't include this parameter in \n your request, Amazon Transcribe Medical generates an ID and returns it in the\n response.

\n

You can use a session ID to retry a streaming session.

", + "smithy.api#documentation": "

Specify a name for your transcription session. If you don't include this parameter in \n your request, Amazon Transcribe Medical generates an ID and returns it in the\n response.

\n

You can use a session ID to retry a streaming session.

", "smithy.api#httpHeader": "x-amzn-transcribe-session-id" } }, @@ -1734,7 +1740,7 @@ "target": "com.amazonaws.transcribestreaming#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Enables channel identification in multi-channel audio.

\n

Channel identification transcribes the audio on each channel independently, then appends\n the output for each channel into one transcript.

\n

If you have multi-channel audio and do not enable channel identification, your audio is \n transcribed in a continuous manner and your transcript is not separated by channel.

\n

For more information, see Transcribing multi-channel audio.

", + "smithy.api#documentation": "

Enables channel identification in multi-channel audio.

\n

Channel identification transcribes the audio on each channel independently, then appends\n the output for each channel into one transcript.

\n

If you have multi-channel audio and do not enable channel identification, your audio is \n transcribed in a continuous manner and your transcript is not separated by channel.

\n

For more information, see Transcribing multi-channel audio.

", "smithy.api#httpHeader": "x-amzn-transcribe-enable-channel-identification" } }, @@ -1748,10 +1754,13 @@ "ContentIdentificationType": { "target": "com.amazonaws.transcribestreaming#MedicalContentIdentificationType", "traits": { - "smithy.api#documentation": "

Labels all personal health information (PHI) identified in your transcript.

\n

Content identification is performed at the segment level; PHI is flagged upon complete\n transcription of an audio segment.

\n

For more information, see Identifying personal health information (PHI) in a\n transcription.

", + "smithy.api#documentation": "

Labels all personal health information (PHI) identified in your transcript.

\n

Content identification is performed at the segment level; PHI is flagged upon complete\n transcription of an audio segment.

\n

For more information, see Identifying personal health information (PHI) in a\n transcription.

", "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.transcribestreaming#StartMedicalStreamTranscriptionResponse": { @@ -1850,6 +1859,9 @@ "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.transcribestreaming#StartStreamTranscription": { @@ -1929,7 +1941,7 @@ "AudioStream": { "target": "com.amazonaws.transcribestreaming#AudioStream", "traits": { - "smithy.api#documentation": "

An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket \n data frames.

\n

For more information, see Transcribing streaming audio.

", + "smithy.api#documentation": "

An encoded stream of audio blobs. Audio streams are encoded as either HTTP/2 or WebSocket \n data frames.

\n

For more information, see Transcribing streaming audio.

", "smithy.api#httpPayload": {}, "smithy.api#required": {} } @@ -1937,7 +1949,7 @@ "VocabularyFilterName": { "target": "com.amazonaws.transcribestreaming#VocabularyFilterName", "traits": { - "smithy.api#documentation": "

Specify the name of the custom vocabulary filter that you want to use when processing your\n transcription. Note that vocabulary filter names are case sensitive.

\n

If the language of the specified custom vocabulary filter doesn't match the language identified in\n your media, the vocabulary filter is not applied to your transcription.

\n \n

This parameter is not intended for use with the\n IdentifyLanguage parameter. If you're including IdentifyLanguage\n in your request and want to use one or more vocabulary filters with your transcription, use\n the VocabularyFilterNames parameter instead.

\n
\n

For more information, see Using vocabulary filtering with unwanted \n words.

", + "smithy.api#documentation": "

Specify the name of the custom vocabulary filter that you want to use when processing your\n transcription. Note that vocabulary filter names are case sensitive.

\n

If the language of the specified custom vocabulary filter doesn't match the language identified in\n your media, the vocabulary filter is not applied to your transcription.

\n \n

This parameter is not intended for use with the\n IdentifyLanguage parameter. If you're including IdentifyLanguage\n in your request and want to use one or more vocabulary filters with your transcription, use\n the VocabularyFilterNames parameter instead.

\n
\n

For more information, see Using vocabulary filtering with unwanted \n words.

", "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-name" } }, @@ -1952,7 +1964,7 @@ "target": "com.amazonaws.transcribestreaming#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Enables speaker partitioning (diarization) in your transcription output. Speaker partitioning \n labels the speech from individual speakers in your media file.

\n

For more information, see Partitioning speakers (diarization).

", + "smithy.api#documentation": "

Enables speaker partitioning (diarization) in your transcription output. Speaker partitioning \n labels the speech from individual speakers in your media file.

\n

For more information, see Partitioning speakers (diarization).

", "smithy.api#httpHeader": "x-amzn-transcribe-show-speaker-label" } }, @@ -1960,7 +1972,7 @@ "target": "com.amazonaws.transcribestreaming#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Enables channel identification in multi-channel audio.

\n

Channel identification transcribes the audio on each channel independently, then appends the \n output for each channel into one transcript.

\n

If you have multi-channel audio and do not enable channel identification, your audio is \n transcribed in a continuous manner and your transcript is not separated by channel.

\n

For more information, see Transcribing multi-channel audio.

", + "smithy.api#documentation": "

Enables channel identification in multi-channel audio.

\n

Channel identification transcribes the audio on each channel independently, then appends the \n output for each channel into one transcript.

\n

If you have multi-channel audio and do not enable channel identification, your audio is \n transcribed in a continuous manner and your transcript is not separated by channel.

\n

For more information, see Transcribing multi-channel audio.

", "smithy.api#httpHeader": "x-amzn-transcribe-enable-channel-identification" } }, @@ -1982,21 +1994,21 @@ "PartialResultsStability": { "target": "com.amazonaws.transcribestreaming#PartialResultsStability", "traits": { - "smithy.api#documentation": "

Specify the level of stability to use when you enable partial results stabilization \n (EnablePartialResultsStabilization).

\n

Low stability provides the highest accuracy. High stability transcribes faster, but with slightly\n lower accuracy.

\n

For more information, see Partial-result \n stabilization.

", + "smithy.api#documentation": "

Specify the level of stability to use when you enable partial results stabilization \n (EnablePartialResultsStabilization).

\n

Low stability provides the highest accuracy. High stability transcribes faster, but with slightly\n lower accuracy.

\n

For more information, see Partial-result \n stabilization.

", "smithy.api#httpHeader": "x-amzn-transcribe-partial-results-stability" } }, "ContentIdentificationType": { "target": "com.amazonaws.transcribestreaming#ContentIdentificationType", "traits": { - "smithy.api#documentation": "

Labels all personally identifiable information (PII) identified in your transcript.

\n

Content identification is performed at the segment level; PII specified in \n PiiEntityTypes is flagged upon complete transcription of an audio segment.

\n

You can’t set ContentIdentificationType and ContentRedactionType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", + "smithy.api#documentation": "

Labels all personally identifiable information (PII) identified in your transcript.

\n

Content identification is performed at the segment level; PII specified in \n PiiEntityTypes is flagged upon complete transcription of an audio segment.

\n

You can’t set ContentIdentificationType and ContentRedactionType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", "smithy.api#httpHeader": "x-amzn-transcribe-content-identification-type" } }, "ContentRedactionType": { "target": "com.amazonaws.transcribestreaming#ContentRedactionType", "traits": { - "smithy.api#documentation": "

Redacts all personally identifiable information (PII) identified in your transcript.

\n

Content redaction is performed at the segment level; PII specified in \n PiiEntityTypes is redacted upon complete transcription of an audio segment.

\n

You can’t set ContentRedactionType and ContentIdentificationType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", + "smithy.api#documentation": "

Redacts all personally identifiable information (PII) identified in your transcript.

\n

Content redaction is performed at the segment level; PII specified in \n PiiEntityTypes is redacted upon complete transcription of an audio segment.

\n

You can’t set ContentRedactionType and ContentIdentificationType\n in the same request. If you set both, your request returns a\n BadRequestException.

\n

For more information, see Redacting or identifying personally identifiable\n information.

", "smithy.api#httpHeader": "x-amzn-transcribe-content-redaction-type" } }, @@ -2010,7 +2022,7 @@ "LanguageModelName": { "target": "com.amazonaws.transcribestreaming#ModelName", "traits": { - "smithy.api#documentation": "

Specify the name of the custom language model that you want to use when processing your\n transcription. Note that language model names are case sensitive.

\n

The language of the specified language model must match the language code you specify\n in your transcription request. If the languages don't match, the custom language model isn't applied. \n There are no errors or warnings associated with a language mismatch.

\n

For more information, see Custom language models.

", + "smithy.api#documentation": "

Specify the name of the custom language model that you want to use when processing your\n transcription. Note that language model names are case sensitive.

\n

The language of the specified language model must match the language code you specify\n in your transcription request. If the languages don't match, the custom language model isn't applied. \n There are no errors or warnings associated with a language mismatch.

\n

For more information, see Custom language models.

", "smithy.api#httpHeader": "x-amzn-transcribe-language-model-name" } }, @@ -2018,7 +2030,7 @@ "target": "com.amazonaws.transcribestreaming#Boolean", "traits": { "smithy.api#default": false, - "smithy.api#documentation": "

Enables automatic language identification for your transcription.

\n

If you include IdentifyLanguage, you can optionally include a list of \n language codes, using LanguageOptions, that you think may be present in \n your audio stream. Including language options can improve transcription accuracy.

\n

You can also include a preferred language using PreferredLanguage. Adding a \n preferred language can help Amazon Transcribe identify the language faster than if you omit this \n parameter.

\n

If you have multi-channel audio that contains different languages on each channel, and you've \n enabled channel identification, automatic language identification identifies the dominant language on \n each audio channel.

\n

Note that you must include either LanguageCode or \n IdentifyLanguage in your request. If you include both parameters, your request\n fails.

\n

Streaming language identification can't be combined with custom language models or \n redaction.

", + "smithy.api#documentation": "

Enables automatic language identification for your transcription.

\n

If you include IdentifyLanguage, you can optionally include a list of \n language codes, using LanguageOptions, that you think may be present in \n your audio stream. Including language options can improve transcription accuracy.

\n

You can also include a preferred language using PreferredLanguage. Adding a \n preferred language can help Amazon Transcribe identify the language faster than if you omit this \n parameter.

\n

If you have multi-channel audio that contains different languages on each channel, and you've \n enabled channel identification, automatic language identification identifies the dominant language on \n each audio channel.

\n

Note that you must include either LanguageCode or \n IdentifyLanguage in your request. If you include both parameters, your request\n fails.

\n

Streaming language identification can't be combined with custom language models or \n redaction.

", "smithy.api#httpHeader": "x-amzn-transcribe-identify-language" } }, @@ -2039,17 +2051,20 @@ "VocabularyNames": { "target": "com.amazonaws.transcribestreaming#VocabularyNames", "traits": { - "smithy.api#documentation": "

Specify the names of the custom vocabularies that you want to use when processing your\n transcription. Note that vocabulary names are case sensitive.

\n

If none of the languages of the specified custom vocabularies match the language identified in \n your media, your job fails.

\n \n

This parameter is only intended for use with the\n IdentifyLanguage parameter. If you're not\n including IdentifyLanguage in your request and want to use a custom vocabulary\n with your transcription, use the VocabularyName parameter instead.

\n
\n

For more information, see Custom vocabularies.

", + "smithy.api#documentation": "

Specify the names of the custom vocabularies that you want to use when processing your\n transcription. Note that vocabulary names are case sensitive.

\n

If none of the languages of the specified custom vocabularies match the language identified in \n your media, your job fails.

\n \n

This parameter is only intended for use with the\n IdentifyLanguage parameter. If you're not\n including IdentifyLanguage in your request and want to use a custom vocabulary\n with your transcription, use the VocabularyName parameter instead.

\n
\n

For more information, see Custom vocabularies.

", "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-names" } }, "VocabularyFilterNames": { "target": "com.amazonaws.transcribestreaming#VocabularyFilterNames", "traits": { - "smithy.api#documentation": "

Specify the names of the custom vocabulary filters that you want to use when processing\n your transcription. Note that vocabulary filter names are case sensitive.

\n

If none of the languages of the specified custom vocabulary filters match the language identified\n in your media, your job fails.

\n \n

This parameter is only intended for use with \n the IdentifyLanguage parameter. If you're not \n including IdentifyLanguage in your request and want to use a custom vocabulary filter \n with your transcription, use the VocabularyFilterName parameter instead.

\n
\n

For more information, see Using vocabulary filtering with unwanted \n words.

", + "smithy.api#documentation": "

Specify the names of the custom vocabulary filters that you want to use when processing\n your transcription. Note that vocabulary filter names are case sensitive.

\n

If none of the languages of the specified custom vocabulary filters match the language identified\n in your media, your job fails.

\n \n

This parameter is only intended for use with \n the IdentifyLanguage parameter. If you're not \n including IdentifyLanguage in your request and want to use a custom vocabulary filter \n with your transcription, use the VocabularyFilterName parameter instead.

\n
\n

For more information, see Using vocabulary filtering with unwanted \n words.

", "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-names" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.transcribestreaming#StartStreamTranscriptionResponse": { @@ -2220,6 +2235,9 @@ "smithy.api#httpHeader": "x-amzn-transcribe-vocabulary-filter-names" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.transcribestreaming#String": { @@ -2291,7 +2309,7 @@ "h2" ] }, - "smithy.api#documentation": "

Amazon Transcribe streaming offers three main types of real-time transcription: \n Standard, Medical, and \n Call Analytics.

\n
    \n
  • \n

    \n Standard transcriptions are the most common option. Refer\n to for details.

    \n
  • \n
  • \n

    \n Medical transcriptions are tailored to medical professionals \n and incorporate medical terms. A common use case for this service is transcribing doctor-patient \n dialogue in real time, so doctors can focus on their patient instead of taking notes. Refer to\n for details.

    \n
  • \n
  • \n

    \n Call Analytics transcriptions are designed for use with call\n center audio on two different channels; if you're looking for insight into customer service calls, use this \n option. Refer to for details.

    \n
  • \n
", + "smithy.api#documentation": "

Amazon Transcribe streaming offers three main types of real-time transcription: \n Standard, Medical, and \n Call Analytics.

\n
    \n
  • \n

    \n Standard transcriptions are the most common option. Refer\n to for details.

    \n
  • \n
  • \n

    \n Medical transcriptions are tailored to medical professionals \n and incorporate medical terms. A common use case for this service is transcribing doctor-patient \n dialogue in real time, so doctors can focus on their patient instead of taking notes. Refer to\n for details.

    \n
  • \n
  • \n

    \n Call Analytics transcriptions are designed for use with call\n center audio on two different channels; if you're looking for insight into customer service calls, use this \n option. Refer to for details.

    \n
  • \n
", "smithy.api#title": "Amazon Transcribe Streaming Service", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -2353,52 +2371,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -2406,13 +2428,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -2422,224 +2453,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://transcribestreaming-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://transcribestreaming-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://transcribestreaming-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://transcribestreaming-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://transcribestreaming.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://transcribestreaming.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://transcribestreaming.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://transcribestreaming.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -2654,8 +2636,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2667,8 +2649,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2680,8 +2662,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2693,8 +2675,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2706,8 +2688,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2719,8 +2701,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2732,8 +2714,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2745,8 +2727,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2758,8 +2740,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2771,8 +2753,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2784,8 +2766,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2797,8 +2779,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2810,8 +2792,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2823,8 +2805,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2836,8 +2818,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2849,8 +2831,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2862,8 +2844,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2875,8 +2857,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2888,8 +2870,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2901,8 +2883,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2914,8 +2896,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -2927,8 +2909,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -2940,8 +2922,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -2953,8 +2935,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -2966,8 +2948,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -2979,8 +2972,30 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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-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 } }, { @@ -2992,8 +3007,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3005,8 +3031,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3018,8 +3044,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3031,8 +3057,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3043,8 +3069,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3055,10 +3081,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/transcribe.json b/codegen/sdk-codegen/aws-models/transcribe.json index 7510101509a..5a676378c87 100644 --- a/codegen/sdk-codegen/aws-models/transcribe.json +++ b/codegen/sdk-codegen/aws-models/transcribe.json @@ -5111,52 +5111,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -5164,13 +5168,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -5180,92 +5193,83 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://transcribe-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://transcribe-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] } ], @@ -5274,218 +5278,178 @@ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsFIPS" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://fips.transcribe.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - "aws-us-gov", - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - } - ] - } - ], - "endpoint": { - "url": "https://fips.transcribe.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://transcribe-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://fips.transcribe.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ { "conditions": [ { - "fn": "booleanEquals", + "fn": "stringEquals", "argv": [ - true, + "aws-us-gov", { "fn": "getAttr", "argv": [ { "ref": "PartitionResult" }, - "supportsDualStack" + "name" ] } ] } ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://transcribe.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "endpoint": { + "url": "https://fips.transcribe.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" + "endpoint": { + "url": "https://transcribe-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { "conditions": [], - "type": "tree", - "rules": [ + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "cn-north-1" - ] - } - ], - "endpoint": { - "url": "https://cn.transcribe.cn-north-1.amazonaws.com.cn", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "cn-northwest-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://cn.transcribe.cn-northwest-1.amazonaws.com.cn", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://transcribe.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://transcribe.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "cn-north-1" + ] + } + ], + "endpoint": { + "url": "https://cn.transcribe.cn-north-1.amazonaws.com.cn", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "ref": "Region" + }, + "cn-northwest-1" + ] + } + ], + "endpoint": { + "url": "https://cn.transcribe.cn-northwest-1.amazonaws.com.cn", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://transcribe.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/translate.json b/codegen/sdk-codegen/aws-models/translate.json index e148064e50c..37e62a1e6c2 100644 --- a/codegen/sdk-codegen/aws-models/translate.json +++ b/codegen/sdk-codegen/aws-models/translate.json @@ -165,52 +165,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -218,13 +222,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -234,224 +247,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://translate-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://translate-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://translate-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://translate-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://translate.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://translate.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://translate.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://translate.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/voice-id.json b/codegen/sdk-codegen/aws-models/voice-id.json index 41e31ea006a..2455a1235d9 100644 --- a/codegen/sdk-codegen/aws-models/voice-id.json +++ b/codegen/sdk-codegen/aws-models/voice-id.json @@ -3946,52 +3946,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3999,13 +4003,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -4015,224 +4028,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://voiceid-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://voiceid-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://voiceid-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://voiceid-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://voiceid.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://voiceid.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://voiceid.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://voiceid.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -4246,9 +4210,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "ap-northeast-1", "UseFIPS": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { @@ -4259,9 +4223,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "ap-southeast-1", "UseFIPS": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { @@ -4272,9 +4236,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "ap-southeast-2", "UseFIPS": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { @@ -4285,9 +4249,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "eu-central-1", "UseFIPS": false, - "Region": "eu-central-1" + "UseDualStack": false } }, { @@ -4298,9 +4262,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "eu-west-2", "UseFIPS": false, - "Region": "eu-west-2" + "UseDualStack": false } }, { @@ -4311,9 +4275,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -4324,9 +4288,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-west-2", "UseFIPS": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -4337,9 +4301,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -4350,9 +4314,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-east-1", "UseFIPS": true, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -4363,9 +4327,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "us-east-1", "UseFIPS": false, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -4376,9 +4340,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -4389,9 +4353,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": true, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -4402,9 +4366,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -4415,9 +4379,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "cn-north-1", "UseFIPS": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -4428,9 +4392,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -4441,9 +4405,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": true, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -4454,9 +4418,9 @@ } }, "params": { - "UseDualStack": true, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -4467,9 +4431,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-gov-east-1", "UseFIPS": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -4478,9 +4442,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -4491,9 +4455,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": true, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -4502,9 +4466,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": true } }, { @@ -4515,9 +4479,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-iso-east-1", "UseFIPS": false, - "Region": "us-iso-east-1" + "UseDualStack": false } }, { @@ -4526,9 +4490,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -4539,9 +4503,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": true, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -4550,9 +4514,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": true } }, { @@ -4563,9 +4527,9 @@ } }, "params": { - "UseDualStack": false, + "Region": "us-isob-east-1", "UseFIPS": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -4576,9 +4540,9 @@ } }, "params": { - "UseDualStack": false, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4590,8 +4554,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4601,9 +4565,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, - "UseFIPS": true, "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -4613,9 +4577,9 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, - "UseFIPS": false, "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } }, diff --git a/codegen/sdk-codegen/aws-models/waf-regional.json b/codegen/sdk-codegen/aws-models/waf-regional.json index cd2805c6538..8a4ba049d37 100644 --- a/codegen/sdk-codegen/aws-models/waf-regional.json +++ b/codegen/sdk-codegen/aws-models/waf-regional.json @@ -354,52 +354,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -407,13 +411,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -423,718 +436,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://waf-regional-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] - }, - { - "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://waf-regional-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ] - }, - { - "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": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://waf-regional.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] - }, { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ] - }, - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "af-south-1" - ] - } - ], "endpoint": { - "url": "https://waf-regional.af-south-1.amazonaws.com", + "url": "https://waf-regional-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" - }, + } + ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-east-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.ap-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseFIPS" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "ap-northeast-1" + "supportsFIPS" ] } - ], - "endpoint": { - "url": "https://waf-regional.ap-northeast-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-northeast-2" - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://waf-regional.ap-northeast-2.amazonaws.com", + "url": "https://waf-regional-fips.{Region}.{PartitionResult#dnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" - }, + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-northeast-3" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.ap-northeast-3.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "ref": "Region" + "ref": "PartitionResult" }, - "ap-south-1" + "supportsDualStack" ] } - ], - "endpoint": { - "url": "https://waf-regional.ap-south-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, + ] + } + ], + "type": "tree", + "rules": [ { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-southeast-1" - ] - } - ], + "conditions": [], "endpoint": { - "url": "https://waf-regional.ap-southeast-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-southeast-2" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.ap-southeast-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ap-southeast-3" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.ap-southeast-3.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "ca-central-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.ca-central-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-central-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.eu-central-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-north-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.eu-north-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-south-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.eu-south-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-west-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.eu-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-west-2" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.eu-west-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "eu-west-3" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.eu-west-3.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "me-south-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.me-south-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "sa-east-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.sa-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.us-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-east-2" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.us-east-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-west-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.us-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-west-2" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.us-west-2.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "cn-north-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.cn-north-1.amazonaws.com.cn", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "cn-northwest-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.cn-northwest-1.amazonaws.com.cn", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-east-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.us-gov-east-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "us-gov-west-1" - ] - } - ], - "endpoint": { - "url": "https://waf-regional.us-gov-west-1.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://waf-regional.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://waf-regional.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] - } - ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": "https://waf-regional.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1149,8 +619,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1162,8 +632,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1175,8 +645,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1188,8 +658,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1201,8 +671,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1214,8 +684,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1227,8 +697,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1240,8 +710,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1253,8 +723,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1266,8 +736,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1279,8 +749,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1292,8 +762,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1305,8 +775,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1318,8 +788,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1331,8 +801,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1344,8 +814,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1357,8 +827,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1370,8 +840,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1383,8 +853,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1396,8 +866,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1409,8 +879,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1422,8 +892,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1435,8 +905,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1448,8 +918,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1461,8 +931,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1474,8 +944,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1487,8 +957,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1500,8 +970,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1513,8 +983,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1526,8 +996,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1539,8 +1009,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1552,8 +1022,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1565,8 +1035,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1578,8 +1048,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1591,8 +1061,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1604,8 +1074,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1617,8 +1087,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1630,8 +1100,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1643,8 +1113,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1656,8 +1126,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1669,8 +1139,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1682,8 +1152,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1695,8 +1165,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1708,8 +1178,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1721,8 +1191,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1734,8 +1204,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1747,8 +1217,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1760,8 +1230,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1773,8 +1243,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1786,8 +1256,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1799,8 +1269,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1812,8 +1282,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1825,8 +1295,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1838,8 +1308,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1851,8 +1321,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1864,8 +1334,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1877,8 +1347,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1890,8 +1360,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "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 } }, { @@ -1903,8 +1384,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1916,8 +1408,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1929,8 +1432,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1942,8 +1456,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1955,8 +1469,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1968,8 +1482,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1980,8 +1494,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1992,10 +1506,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2103,11 +1623,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#AssociateWebACLResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.wafregional#ByteMatchSet": { "type": "structure", @@ -2244,18 +1770,20 @@ } }, "com.amazonaws.wafregional#ChangeAction": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INSERT", - "name": "INSERT" - }, - { - "value": "DELETE", - "name": "DELETE" + "type": "enum", + "members": { + "INSERT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INSERT" } - ] + }, + "DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE" + } + } } }, "com.amazonaws.wafregional#ChangeToken": { @@ -2265,57 +1793,71 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#ChangeTokenStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PROVISIONED", - "name": "PROVISIONED" - }, - { - "value": "PENDING", - "name": "PENDING" - }, - { - "value": "INSYNC", - "name": "INSYNC" + "type": "enum", + "members": { + "PROVISIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROVISIONED" } - ] + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "INSYNC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INSYNC" + } + } } }, "com.amazonaws.wafregional#ComparisonOperator": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EQ", - "name": "EQ" - }, - { - "value": "NE", - "name": "NE" - }, - { - "value": "LE", - "name": "LE" - }, - { - "value": "LT", - "name": "LT" - }, - { - "value": "GE", - "name": "GE" - }, - { - "value": "GT", - "name": "GT" + "type": "enum", + "members": { + "EQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EQ" } - ] + }, + "NE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NE" + } + }, + "LE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LE" + } + }, + "LT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LT" + } + }, + "GE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GE" + } + }, + "GT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GT" + } + } } }, "com.amazonaws.wafregional#Country": { @@ -2370,6 +1912,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateByteMatchSetResponse": { @@ -2387,6 +1932,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateByteMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateGeoMatchSet": { @@ -2438,6 +1986,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateGeoMatchSetResponse": { @@ -2455,6 +2006,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateGeoMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateIPSet": { @@ -2486,8 +2040,31 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates an IPSet, which you use to specify which web requests\n that\n you want to allow or block based on the IP addresses that the requests\n originate from. For example, if you're receiving a lot of requests from one or more\n individual IP addresses or one or more ranges of IP addresses and you want to block the\n requests, you can create an IPSet that contains those IP addresses and then\n configure AWS WAF to block the requests.

\n\t\t

To create and configure an IPSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateIPSet request.

    \n
  2. \n
  3. \n

    Submit a CreateIPSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateIPSet request to specify the IP addresses that you want AWS WAF to watch for.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" - } + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates an IPSet, which you use to specify which web requests\n that\n you want to allow or block based on the IP addresses that the requests\n originate from. For example, if you're receiving a lot of requests from one or more\n individual IP addresses or one or more ranges of IP addresses and you want to block the\n requests, you can create an IPSet that contains those IP addresses and then\n configure AWS WAF to block the requests.

\n\t\t

To create and configure an IPSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateIPSet request.

    \n
  2. \n
  3. \n

    Submit a CreateIPSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateIPSet request to specify the IP addresses that you want AWS WAF to watch for.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create an IP set", + "documentation": "The following example creates an IP match set named MyIPSetFriendlyName.", + "input": { + "Name": "MyIPSetFriendlyName", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "IPSet": { + "IPSetDescriptors": [ + { + "Type": "IPV4", + "Value": "192.0.2.44/32" + } + ], + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "Name": "MyIPSetFriendlyName" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] + } }, "com.amazonaws.wafregional#CreateIPSetRequest": { "type": "structure", @@ -2506,6 +2083,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateIPSetResponse": { @@ -2523,6 +2103,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateIPSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateRateBasedRule": { @@ -2608,6 +2191,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateRateBasedRuleResponse": { @@ -2625,6 +2211,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the\n CreateRateBasedRule request. You can also use this value to query the\n status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateRegexMatchSet": { @@ -2670,6 +2259,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateRegexMatchSetResponse": { @@ -2687,6 +2279,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateRegexMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateRegexPatternSet": { @@ -2732,6 +2327,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateRegexPatternSetResponse": { @@ -2749,6 +2347,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateRegexPatternSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateRule": { @@ -2786,7 +2387,33 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a Rule, which contains the IPSet objects,\n ByteMatchSet objects, and other predicates that identify the requests that\n you want to block. If you add more than one predicate to a Rule, a request\n must match all of the specifications to be allowed or blocked. For example, suppose\n that\n you add the following to a Rule:

\n\t\t
    \n
  • \n

    An IPSet that matches the IP address 192.0.2.44/32\n

    \n
  • \n
  • \n

    A ByteMatchSet that matches BadBot in the User-Agent header

    \n
  • \n
\n\t\t

You then add the Rule to a WebACL and specify that you want to blocks requests that satisfy the Rule. \n\t\t\tFor a request to be blocked, it must come from the IP address 192.0.2.44 and the User-Agent header in the request \n\t\t\tmust contain the value BadBot.

\n\t\t

To create and configure a Rule, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in the Rule. For more information, see \n\t\t\t\tCreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateRule request.

    \n
  4. \n
  5. \n

    Submit a CreateRule request.

    \n
  6. \n
  7. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateRule request.

    \n
  8. \n
  9. \n

    Submit an UpdateRule request to specify the predicates that you want to include in the Rule.

    \n
  10. \n
  11. \n

    Create and update a WebACL that contains the Rule. For more information, see CreateWebACL.

    \n
  12. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a Rule, which contains the IPSet objects,\n ByteMatchSet objects, and other predicates that identify the requests that\n you want to block. If you add more than one predicate to a Rule, a request\n must match all of the specifications to be allowed or blocked. For example, suppose\n that\n you add the following to a Rule:

\n\t\t
    \n
  • \n

    An IPSet that matches the IP address 192.0.2.44/32\n

    \n
  • \n
  • \n

    A ByteMatchSet that matches BadBot in the User-Agent header

    \n
  • \n
\n\t\t

You then add the Rule to a WebACL and specify that you want to blocks requests that satisfy the Rule. \n\t\t\tFor a request to be blocked, it must come from the IP address 192.0.2.44 and the User-Agent header in the request \n\t\t\tmust contain the value BadBot.

\n\t\t

To create and configure a Rule, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in the Rule. For more information, see \n\t\t\t\tCreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateRule request.

    \n
  4. \n
  5. \n

    Submit a CreateRule request.

    \n
  6. \n
  7. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateRule request.

    \n
  8. \n
  9. \n

    Submit an UpdateRule request to specify the predicates that you want to include in the Rule.

    \n
  10. \n
  11. \n

    Create and update a WebACL that contains the Rule. For more information, see CreateWebACL.

    \n
  12. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create a rule", + "documentation": "The following example creates a rule named WAFByteHeaderRule.", + "input": { + "Name": "WAFByteHeaderRule", + "MetricName": "WAFByteHeaderRule", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "Rule": { + "MetricName": "WAFByteHeaderRule", + "Name": "WAFByteHeaderRule", + "Predicates": [ + { + "DataId": "MyByteMatchSetID", + "Negated": false, + "Type": "ByteMatch" + } + ], + "RuleId": "WAFRule-1-Example" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#CreateRuleGroup": { @@ -2854,6 +2481,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateRuleGroupResponse": { @@ -2871,6 +2501,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateRuleGroup request. You can also use this value \n to query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateRuleRequest": { @@ -2903,6 +2536,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateRuleResponse": { @@ -2920,6 +2556,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateRule request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateSizeConstraintSet": { @@ -2951,7 +2590,34 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify the part of a \n\t\t\tweb request that you want AWS WAF to check for length, such as the length of the User-Agent header or the length of the query string. \n\t\t\tFor example, you can create a SizeConstraintSet that matches any requests that have a query string that is longer than 100 bytes. \n\t\t\tYou can then configure AWS WAF to reject those requests.

\n\t\t

To create and configure a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateSizeConstraintSet request.

    \n
  2. \n
  3. \n

    Submit a CreateSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSizeConstraintSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify the part of a \n\t\t\tweb request that you want AWS WAF to check for length, such as the length of the User-Agent header or the length of the query string. \n\t\t\tFor example, you can create a SizeConstraintSet that matches any requests that have a query string that is longer than 100 bytes. \n\t\t\tYou can then configure AWS WAF to reject those requests.

\n\t\t

To create and configure a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateSizeConstraintSet request.

    \n
  2. \n
  3. \n

    Submit a CreateSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSizeConstraintSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create a size constraint", + "documentation": "The following example creates size constraint set named MySampleSizeConstraintSet.", + "input": { + "Name": "MySampleSizeConstraintSet", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "SizeConstraintSet": { + "Name": "MySampleSizeConstraintSet", + "SizeConstraints": [ + { + "ComparisonOperator": "GT", + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "Size": 0, + "TextTransformation": "NONE" + } + ], + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#CreateSizeConstraintSetRequest": { @@ -2971,6 +2637,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateSizeConstraintSetResponse": { @@ -2988,6 +2657,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateSizeConstraintSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateSqlInjectionMatchSet": { @@ -3019,7 +2691,32 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests that contain snippets of SQL code in a \n\t\t\tspecified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

\n\t\t

To create and configure a SqlInjectionMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateSqlInjectionMatchSet request.

    \n
  2. \n
  3. \n

    Submit a CreateSqlInjectionMatchSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSqlInjectionMatchSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests in which you want to \n\t\t\t\tallow, block, or count malicious SQL code.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests that contain snippets of SQL code in a \n\t\t\tspecified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

\n\t\t

To create and configure a SqlInjectionMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateSqlInjectionMatchSet request.

    \n
  2. \n
  3. \n

    Submit a CreateSqlInjectionMatchSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSqlInjectionMatchSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests in which you want to \n\t\t\t\tallow, block, or count malicious SQL code.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create a SQL injection match set", + "documentation": "The following example creates a SQL injection match set named MySQLInjectionMatchSet.", + "input": { + "Name": "MySQLInjectionMatchSet", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "SqlInjectionMatchSet": { + "Name": "MySQLInjectionMatchSet", + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "SqlInjectionMatchTuples": [ + { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + ] + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#CreateSqlInjectionMatchSetRequest": { @@ -3041,7 +2738,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to create a SqlInjectionMatchSet.

" + "smithy.api#documentation": "

A request to create a SqlInjectionMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateSqlInjectionMatchSetResponse": { @@ -3061,7 +2759,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a CreateSqlInjectionMatchSet request.

" + "smithy.api#documentation": "

The response to a CreateSqlInjectionMatchSet request.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateWebACL": { @@ -3102,7 +2801,41 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a WebACL, which contains the Rules that identify the CloudFront web requests that you want to allow, block, or count. \n\t\t\tAWS WAF evaluates Rules in order based on the value of Priority for each Rule.

\t\t\t\n\t\t

You also specify a default action, either ALLOW or BLOCK. If a web request doesn't match \n\t\t\tany of the Rules in a WebACL, AWS WAF responds to the request with the default action.

\t\t\t\n\t\t

To create and configure a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the ByteMatchSet objects and other predicates that you want to include in Rules. \n\t\t\t\tFor more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, \n\t\t\t\tCreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Create and update the Rules that you want to include in the WebACL. For more information, see \n\t\t\t\tCreateRule and UpdateRule.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateWebACL request.

    \n
  6. \n
  7. \n

    Submit a CreateWebACL request.

    \n
  8. \n
  9. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateWebACL request.

    \n
  10. \n
  11. \n

    Submit an UpdateWebACL request to specify the Rules that you want to include in the WebACL, \n\t\t\t\tto specify the default action, and to associate the WebACL with a CloudFront distribution.

    \n
  12. \n
\n\t\t

For more information about how to use the AWS WAF API, see the AWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a WebACL, which contains the Rules that identify the CloudFront web requests that you want to allow, block, or count. \n\t\t\tAWS WAF evaluates Rules in order based on the value of Priority for each Rule.

\t\t\t\n\t\t

You also specify a default action, either ALLOW or BLOCK. If a web request doesn't match \n\t\t\tany of the Rules in a WebACL, AWS WAF responds to the request with the default action.

\t\t\t\n\t\t

To create and configure a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the ByteMatchSet objects and other predicates that you want to include in Rules. \n\t\t\t\tFor more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, \n\t\t\t\tCreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Create and update the Rules that you want to include in the WebACL. For more information, see \n\t\t\t\tCreateRule and UpdateRule.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateWebACL request.

    \n
  6. \n
  7. \n

    Submit a CreateWebACL request.

    \n
  8. \n
  9. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateWebACL request.

    \n
  10. \n
  11. \n

    Submit an UpdateWebACL request to specify the Rules that you want to include in the WebACL, \n\t\t\t\tto specify the default action, and to associate the WebACL with a CloudFront distribution.

    \n
  12. \n
\n\t\t

For more information about how to use the AWS WAF API, see the AWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create a web ACL", + "documentation": "The following example creates a web ACL named CreateExample.", + "input": { + "Name": "CreateExample", + "MetricName": "CreateExample", + "DefaultAction": { + "Type": "ALLOW" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "WebACL": { + "DefaultAction": { + "Type": "ALLOW" + }, + "MetricName": "CreateExample", + "Name": "CreateExample", + "Rules": [ + { + "Action": { + "Type": "ALLOW" + }, + "Priority": 1, + "RuleId": "WAFRule-1-Example" + } + ], + "WebACLId": "example-46da-4444-5555-example" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#CreateWebACLMigrationStack": { @@ -3158,6 +2891,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateWebACLMigrationStackResponse": { @@ -3170,6 +2906,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateWebACLRequest": { @@ -3209,6 +2948,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateWebACLResponse": { @@ -3226,6 +2968,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateWebACL request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#CreateXssMatchSet": { @@ -3257,7 +3002,32 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates an XssMatchSet, which you use to allow, block, or count requests that contain cross-site scripting attacks\n\t\t\tin the specified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

\n\t\t

To create and configure an XssMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateXssMatchSet request.

    \n
  2. \n
  3. \n

    Submit a CreateXssMatchSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateXssMatchSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateXssMatchSet request to specify the parts of web requests in which you want to \n\t\t\t\tallow, block, or count cross-site scripting attacks.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates an XssMatchSet, which you use to allow, block, or count requests that contain cross-site scripting attacks\n\t\t\tin the specified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

\n\t\t

To create and configure an XssMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateXssMatchSet request.

    \n
  2. \n
  3. \n

    Submit a CreateXssMatchSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateXssMatchSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateXssMatchSet request to specify the parts of web requests in which you want to \n\t\t\t\tallow, block, or count cross-site scripting attacks.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create an XSS match set", + "documentation": "The following example creates an XSS match set named MySampleXssMatchSet.", + "input": { + "Name": "MySampleXssMatchSet", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "XssMatchSet": { + "Name": "MySampleXssMatchSet", + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "XssMatchTuples": [ + { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + ] + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#CreateXssMatchSetRequest": { @@ -3279,7 +3049,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to create an XssMatchSet.

" + "smithy.api#documentation": "

A request to create an XssMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#CreateXssMatchSetResponse": { @@ -3299,7 +3070,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a CreateXssMatchSet request.

" + "smithy.api#documentation": "

The response to a CreateXssMatchSet request.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteByteMatchSet": { @@ -3331,7 +3103,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's still used in any Rules \n\t\t\tor if it still includes any ByteMatchTuple objects (any filters).

\t\t\n\t\t

If you just want to remove a ByteMatchSet from a Rule, use UpdateRule.

\t\t\n\t\t

To permanently delete a ByteMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the ByteMatchSet to remove filters, if any. For more information, see UpdateByteMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteByteMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteByteMatchSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's still used in any Rules \n\t\t\tor if it still includes any ByteMatchTuple objects (any filters).

\t\t\n\t\t

If you just want to remove a ByteMatchSet from a Rule, use UpdateRule.

\t\t\n\t\t

To permanently delete a ByteMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the ByteMatchSet to remove filters, if any. For more information, see UpdateByteMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteByteMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteByteMatchSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a byte match set", + "documentation": "The following example deletes a byte match set with the ID exampleIDs3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "ByteMatchSetId": "exampleIDs3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#DeleteByteMatchSetRequest": { @@ -3351,6 +3136,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteByteMatchSetResponse": { @@ -3362,6 +3150,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteByteMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteGeoMatchSet": { @@ -3413,6 +3204,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteGeoMatchSetResponse": { @@ -3424,6 +3218,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteGeoMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteIPSet": { @@ -3455,7 +3252,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes an IPSet. You can't delete an IPSet if it's still used in any Rules or \n\t\t\tif it still includes any IP addresses.

\n\t\t

If you just want to remove an IPSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete an IPSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the IPSet to remove IP address ranges, if any. For more information, see UpdateIPSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteIPSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteIPSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes an IPSet. You can't delete an IPSet if it's still used in any Rules or \n\t\t\tif it still includes any IP addresses.

\n\t\t

If you just want to remove an IPSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete an IPSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the IPSet to remove IP address ranges, if any. For more information, see UpdateIPSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteIPSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteIPSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete an IP set", + "documentation": "The following example deletes an IP match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#DeleteIPSetRequest": { @@ -3475,6 +3285,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteIPSetResponse": { @@ -3486,6 +3299,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteIPSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteLoggingConfiguration": { @@ -3521,11 +3337,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteLoggingConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.wafregional#DeletePermissionPolicy": { "type": "operation", @@ -3560,11 +3382,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeletePermissionPolicyResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.wafregional#DeleteRateBasedRule": { "type": "operation", @@ -3621,6 +3449,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteRateBasedRuleResponse": { @@ -3632,6 +3463,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the\n DeleteRateBasedRule request. You can also use this value to query the\n status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteRegexMatchSet": { @@ -3683,6 +3517,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteRegexMatchSetResponse": { @@ -3694,6 +3531,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteRegexMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteRegexPatternSet": { @@ -3745,6 +3585,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteRegexPatternSetResponse": { @@ -3756,6 +3599,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteRegexPatternSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteRule": { @@ -3793,7 +3639,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a Rule. You can't delete a Rule if it's still used in any WebACL \n\t\t\tobjects or if it still includes any predicates, such as ByteMatchSet objects.

\n\t\t

If you just want to remove a Rule from a WebACL, use UpdateWebACL.

\n\t\t

To permanently delete a Rule from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the Rule to remove predicates, if any. For more information, see UpdateRule.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteRule request.

    \n
  4. \n
  5. \n

    Submit a DeleteRule request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a Rule. You can't delete a Rule if it's still used in any WebACL \n\t\t\tobjects or if it still includes any predicates, such as ByteMatchSet objects.

\n\t\t

If you just want to remove a Rule from a WebACL, use UpdateWebACL.

\n\t\t

To permanently delete a Rule from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the Rule to remove predicates, if any. For more information, see UpdateRule.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteRule request.

    \n
  4. \n
  5. \n

    Submit a DeleteRule request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a rule", + "documentation": "The following example deletes a rule with the ID WAFRule-1-Example.", + "input": { + "RuleId": "WAFRule-1-Example", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#DeleteRuleGroup": { @@ -3851,6 +3710,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteRuleGroupResponse": { @@ -3862,6 +3724,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteRuleGroup request. You can also use this value \n to query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteRuleRequest": { @@ -3881,6 +3746,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteRuleResponse": { @@ -3892,6 +3760,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteRule request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteSizeConstraintSet": { @@ -3923,7 +3794,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet if it's still used in any Rules \n\t\t\tor if it still includes any SizeConstraint objects (any filters).

\t\t\n\t\t

If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule.

\t\t\n\t\t

To permanently delete a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the SizeConstraintSet to remove filters, if any. For more information, see UpdateSizeConstraintSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteSizeConstraintSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet if it's still used in any Rules \n\t\t\tor if it still includes any SizeConstraint objects (any filters).

\t\t\n\t\t

If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule.

\t\t\n\t\t

To permanently delete a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the SizeConstraintSet to remove filters, if any. For more information, see UpdateSizeConstraintSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteSizeConstraintSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a size constraint set", + "documentation": "The following example deletes a size constraint set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#DeleteSizeConstraintSetRequest": { @@ -3943,6 +3827,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteSizeConstraintSetResponse": { @@ -3954,6 +3841,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteSizeConstraintSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteSqlInjectionMatchSet": { @@ -3985,7 +3875,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet if it's \n\t\t\tstill used in any Rules or if it still contains any SqlInjectionMatchTuple objects.

\n\t\t

If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the SqlInjectionMatchSet to remove filters, if any. For more information, see \n\t\t\t\tUpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteSqlInjectionMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteSqlInjectionMatchSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet if it's \n\t\t\tstill used in any Rules or if it still contains any SqlInjectionMatchTuple objects.

\n\t\t

If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the SqlInjectionMatchSet to remove filters, if any. For more information, see \n\t\t\t\tUpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteSqlInjectionMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteSqlInjectionMatchSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a SQL injection match set", + "documentation": "The following example deletes a SQL injection match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#DeleteSqlInjectionMatchSetRequest": { @@ -4007,7 +3910,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to delete a SqlInjectionMatchSet from AWS WAF.

" + "smithy.api#documentation": "

A request to delete a SqlInjectionMatchSet from AWS WAF.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteSqlInjectionMatchSetResponse": { @@ -4021,7 +3925,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a request to delete a SqlInjectionMatchSet from AWS WAF.

" + "smithy.api#documentation": "

The response to a request to delete a SqlInjectionMatchSet from AWS WAF.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteWebACL": { @@ -4059,7 +3964,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a WebACL. You can't delete a WebACL if it still contains any Rules.

\n\t\t

To delete a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteWebACL request.

    \n
  4. \n
  5. \n

    Submit a DeleteWebACL request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a WebACL. You can't delete a WebACL if it still contains any Rules.

\n\t\t

To delete a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteWebACL request.

    \n
  4. \n
  5. \n

    Submit a DeleteWebACL request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a web ACL", + "documentation": "The following example deletes a web ACL with the ID example-46da-4444-5555-example.", + "input": { + "WebACLId": "example-46da-4444-5555-example", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#DeleteWebACLRequest": { @@ -4079,6 +3997,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteWebACLResponse": { @@ -4090,6 +4011,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteWebACL request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DeleteXssMatchSet": { @@ -4121,7 +4045,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's \n\t\t\tstill used in any Rules or if it still contains any XssMatchTuple objects.

\n\t\t

If you just want to remove an XssMatchSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete an XssMatchSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the XssMatchSet to remove filters, if any. For more information, see \n\t\t\t\tUpdateXssMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteXssMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteXssMatchSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's \n\t\t\tstill used in any Rules or if it still contains any XssMatchTuple objects.

\n\t\t

If you just want to remove an XssMatchSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete an XssMatchSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the XssMatchSet to remove filters, if any. For more information, see \n\t\t\t\tUpdateXssMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteXssMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteXssMatchSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete an XSS match set", + "documentation": "The following example deletes an XSS match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#DeleteXssMatchSetRequest": { @@ -4143,7 +4080,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to delete an XssMatchSet from AWS WAF.

" + "smithy.api#documentation": "

A request to delete an XssMatchSet from AWS WAF.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DeleteXssMatchSetResponse": { @@ -4157,7 +4095,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a request to delete an XssMatchSet from AWS WAF.

" + "smithy.api#documentation": "

The response to a request to delete an XssMatchSet from AWS WAF.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#DisassociateWebACL": { @@ -4196,11 +4135,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#DisassociateWebACLResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.wafregional#ErrorReason": { "type": "string" @@ -4270,1017 +4215,1513 @@ } }, "com.amazonaws.wafregional#GeoMatchConstraintType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Country", - "name": "Country" + "type": "enum", + "members": { + "Country": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Country" } - ] + } } }, "com.amazonaws.wafregional#GeoMatchConstraintValue": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AF", - "name": "AF" - }, - { - "value": "AX", - "name": "AX" - }, - { - "value": "AL", - "name": "AL" - }, - { - "value": "DZ", - "name": "DZ" - }, - { - "value": "AS", - "name": "AS" - }, - { - "value": "AD", - "name": "AD" - }, - { - "value": "AO", - "name": "AO" - }, - { - "value": "AI", - "name": "AI" - }, - { - "value": "AQ", - "name": "AQ" - }, - { - "value": "AG", - "name": "AG" - }, - { - "value": "AR", - "name": "AR" - }, - { - "value": "AM", - "name": "AM" - }, - { - "value": "AW", - "name": "AW" - }, - { - "value": "AU", - "name": "AU" - }, - { - "value": "AT", - "name": "AT" - }, - { - "value": "AZ", - "name": "AZ" - }, - { - "value": "BS", - "name": "BS" - }, - { - "value": "BH", - "name": "BH" - }, - { - "value": "BD", - "name": "BD" - }, - { - "value": "BB", - "name": "BB" - }, - { - "value": "BY", - "name": "BY" - }, - { - "value": "BE", - "name": "BE" - }, - { - "value": "BZ", - "name": "BZ" - }, - { - "value": "BJ", - "name": "BJ" - }, - { - "value": "BM", - "name": "BM" - }, - { - "value": "BT", - "name": "BT" - }, - { - "value": "BO", - "name": "BO" - }, - { - "value": "BQ", - "name": "BQ" - }, - { - "value": "BA", - "name": "BA" - }, - { - "value": "BW", - "name": "BW" - }, - { - "value": "BV", - "name": "BV" - }, - { - "value": "BR", - "name": "BR" - }, - { - "value": "IO", - "name": "IO" - }, - { - "value": "BN", - "name": "BN" - }, - { - "value": "BG", - "name": "BG" - }, - { - "value": "BF", - "name": "BF" - }, - { - "value": "BI", - "name": "BI" - }, - { - "value": "KH", - "name": "KH" - }, - { - "value": "CM", - "name": "CM" - }, - { - "value": "CA", - "name": "CA" - }, - { - "value": "CV", - "name": "CV" - }, - { - "value": "KY", - "name": "KY" - }, - { - "value": "CF", - "name": "CF" - }, - { - "value": "TD", - "name": "TD" - }, - { - "value": "CL", - "name": "CL" - }, - { - "value": "CN", - "name": "CN" - }, - { - "value": "CX", - "name": "CX" - }, - { - "value": "CC", - "name": "CC" - }, - { - "value": "CO", - "name": "CO" - }, - { - "value": "KM", - "name": "KM" - }, - { - "value": "CG", - "name": "CG" - }, - { - "value": "CD", - "name": "CD" - }, - { - "value": "CK", - "name": "CK" - }, - { - "value": "CR", - "name": "CR" - }, - { - "value": "CI", - "name": "CI" - }, - { - "value": "HR", - "name": "HR" - }, - { - "value": "CU", - "name": "CU" - }, - { - "value": "CW", - "name": "CW" - }, - { - "value": "CY", - "name": "CY" - }, - { - "value": "CZ", - "name": "CZ" - }, - { - "value": "DK", - "name": "DK" - }, - { - "value": "DJ", - "name": "DJ" - }, - { - "value": "DM", - "name": "DM" - }, - { - "value": "DO", - "name": "DO" - }, - { - "value": "EC", - "name": "EC" - }, - { - "value": "EG", - "name": "EG" - }, - { - "value": "SV", - "name": "SV" - }, - { - "value": "GQ", - "name": "GQ" - }, - { - "value": "ER", - "name": "ER" - }, - { - "value": "EE", - "name": "EE" - }, - { - "value": "ET", - "name": "ET" - }, - { - "value": "FK", - "name": "FK" - }, - { - "value": "FO", - "name": "FO" - }, - { - "value": "FJ", - "name": "FJ" - }, - { - "value": "FI", - "name": "FI" - }, - { - "value": "FR", - "name": "FR" - }, - { - "value": "GF", - "name": "GF" - }, - { - "value": "PF", - "name": "PF" - }, - { - "value": "TF", - "name": "TF" - }, - { - "value": "GA", - "name": "GA" - }, - { - "value": "GM", - "name": "GM" - }, - { - "value": "GE", - "name": "GE" - }, - { - "value": "DE", - "name": "DE" - }, - { - "value": "GH", - "name": "GH" - }, - { - "value": "GI", - "name": "GI" - }, - { - "value": "GR", - "name": "GR" - }, - { - "value": "GL", - "name": "GL" - }, - { - "value": "GD", - "name": "GD" - }, - { - "value": "GP", - "name": "GP" - }, - { - "value": "GU", - "name": "GU" - }, - { - "value": "GT", - "name": "GT" - }, - { - "value": "GG", - "name": "GG" - }, - { - "value": "GN", - "name": "GN" - }, - { - "value": "GW", - "name": "GW" - }, - { - "value": "GY", - "name": "GY" - }, - { - "value": "HT", - "name": "HT" - }, - { - "value": "HM", - "name": "HM" - }, - { - "value": "VA", - "name": "VA" - }, - { - "value": "HN", - "name": "HN" - }, - { - "value": "HK", - "name": "HK" - }, - { - "value": "HU", - "name": "HU" - }, - { - "value": "IS", - "name": "IS" - }, - { - "value": "IN", - "name": "IN" - }, - { - "value": "ID", - "name": "ID" - }, - { - "value": "IR", - "name": "IR" - }, - { - "value": "IQ", - "name": "IQ" - }, - { - "value": "IE", - "name": "IE" - }, - { - "value": "IM", - "name": "IM" - }, - { - "value": "IL", - "name": "IL" - }, - { - "value": "IT", - "name": "IT" - }, - { - "value": "JM", - "name": "JM" - }, - { - "value": "JP", - "name": "JP" - }, - { - "value": "JE", - "name": "JE" - }, - { - "value": "JO", - "name": "JO" - }, - { - "value": "KZ", - "name": "KZ" - }, - { - "value": "KE", - "name": "KE" - }, - { - "value": "KI", - "name": "KI" - }, - { - "value": "KP", - "name": "KP" - }, - { - "value": "KR", - "name": "KR" - }, - { - "value": "KW", - "name": "KW" - }, - { - "value": "KG", - "name": "KG" - }, - { - "value": "LA", - "name": "LA" - }, - { - "value": "LV", - "name": "LV" - }, - { - "value": "LB", - "name": "LB" - }, - { - "value": "LS", - "name": "LS" - }, - { - "value": "LR", - "name": "LR" - }, - { - "value": "LY", - "name": "LY" - }, - { - "value": "LI", - "name": "LI" - }, - { - "value": "LT", - "name": "LT" - }, - { - "value": "LU", - "name": "LU" - }, - { - "value": "MO", - "name": "MO" - }, - { - "value": "MK", - "name": "MK" - }, - { - "value": "MG", - "name": "MG" - }, - { - "value": "MW", - "name": "MW" - }, - { - "value": "MY", - "name": "MY" - }, - { - "value": "MV", - "name": "MV" - }, - { - "value": "ML", - "name": "ML" - }, - { - "value": "MT", - "name": "MT" - }, - { - "value": "MH", - "name": "MH" - }, - { - "value": "MQ", - "name": "MQ" - }, - { - "value": "MR", - "name": "MR" - }, - { - "value": "MU", - "name": "MU" - }, - { - "value": "YT", - "name": "YT" - }, - { - "value": "MX", - "name": "MX" - }, - { - "value": "FM", - "name": "FM" - }, - { - "value": "MD", - "name": "MD" - }, - { - "value": "MC", - "name": "MC" - }, - { - "value": "MN", - "name": "MN" - }, - { - "value": "ME", - "name": "ME" - }, - { - "value": "MS", - "name": "MS" - }, - { - "value": "MA", - "name": "MA" - }, - { - "value": "MZ", - "name": "MZ" - }, - { - "value": "MM", - "name": "MM" - }, - { - "value": "NA", - "name": "NA" - }, - { - "value": "NR", - "name": "NR" - }, - { - "value": "NP", - "name": "NP" - }, - { - "value": "NL", - "name": "NL" - }, - { - "value": "NC", - "name": "NC" - }, - { - "value": "NZ", - "name": "NZ" - }, - { - "value": "NI", - "name": "NI" - }, - { - "value": "NE", - "name": "NE" - }, - { - "value": "NG", - "name": "NG" - }, - { - "value": "NU", - "name": "NU" - }, - { - "value": "NF", - "name": "NF" - }, - { - "value": "MP", - "name": "MP" - }, - { - "value": "NO", - "name": "NO" - }, - { - "value": "OM", - "name": "OM" - }, - { - "value": "PK", - "name": "PK" - }, - { - "value": "PW", - "name": "PW" - }, - { - "value": "PS", - "name": "PS" - }, - { - "value": "PA", - "name": "PA" - }, - { - "value": "PG", - "name": "PG" - }, - { - "value": "PY", - "name": "PY" - }, - { - "value": "PE", - "name": "PE" - }, - { - "value": "PH", - "name": "PH" - }, - { - "value": "PN", - "name": "PN" - }, - { - "value": "PL", - "name": "PL" - }, - { - "value": "PT", - "name": "PT" - }, - { - "value": "PR", - "name": "PR" - }, - { - "value": "QA", - "name": "QA" - }, - { - "value": "RE", - "name": "RE" - }, - { - "value": "RO", - "name": "RO" - }, - { - "value": "RU", - "name": "RU" - }, - { - "value": "RW", - "name": "RW" - }, - { - "value": "BL", - "name": "BL" - }, - { - "value": "SH", - "name": "SH" - }, - { - "value": "KN", - "name": "KN" - }, - { - "value": "LC", - "name": "LC" - }, - { - "value": "MF", - "name": "MF" - }, - { - "value": "PM", - "name": "PM" - }, - { - "value": "VC", - "name": "VC" - }, - { - "value": "WS", - "name": "WS" - }, - { - "value": "SM", - "name": "SM" - }, - { - "value": "ST", - "name": "ST" - }, - { - "value": "SA", - "name": "SA" - }, - { - "value": "SN", - "name": "SN" - }, - { - "value": "RS", - "name": "RS" - }, - { - "value": "SC", - "name": "SC" - }, - { - "value": "SL", - "name": "SL" - }, - { - "value": "SG", - "name": "SG" - }, - { - "value": "SX", - "name": "SX" - }, - { - "value": "SK", - "name": "SK" - }, - { - "value": "SI", - "name": "SI" - }, - { - "value": "SB", - "name": "SB" - }, - { - "value": "SO", - "name": "SO" - }, - { - "value": "ZA", - "name": "ZA" - }, - { - "value": "GS", - "name": "GS" - }, - { - "value": "SS", - "name": "SS" - }, - { - "value": "ES", - "name": "ES" - }, - { - "value": "LK", - "name": "LK" - }, - { - "value": "SD", - "name": "SD" - }, - { - "value": "SR", - "name": "SR" - }, - { - "value": "SJ", - "name": "SJ" - }, - { - "value": "SZ", - "name": "SZ" - }, - { - "value": "SE", - "name": "SE" - }, - { - "value": "CH", - "name": "CH" - }, - { - "value": "SY", - "name": "SY" - }, - { - "value": "TW", - "name": "TW" - }, - { - "value": "TJ", - "name": "TJ" - }, - { - "value": "TZ", - "name": "TZ" - }, - { - "value": "TH", - "name": "TH" - }, - { - "value": "TL", - "name": "TL" - }, - { - "value": "TG", - "name": "TG" - }, - { - "value": "TK", - "name": "TK" - }, - { - "value": "TO", - "name": "TO" - }, - { - "value": "TT", - "name": "TT" - }, - { - "value": "TN", - "name": "TN" - }, - { - "value": "TR", - "name": "TR" - }, - { - "value": "TM", - "name": "TM" - }, - { - "value": "TC", - "name": "TC" - }, - { - "value": "TV", - "name": "TV" - }, - { - "value": "UG", - "name": "UG" - }, - { - "value": "UA", - "name": "UA" - }, - { - "value": "AE", - "name": "AE" - }, - { - "value": "GB", - "name": "GB" - }, - { - "value": "US", - "name": "US" - }, - { - "value": "UM", - "name": "UM" - }, - { - "value": "UY", - "name": "UY" - }, - { - "value": "UZ", - "name": "UZ" - }, - { - "value": "VU", - "name": "VU" - }, - { - "value": "VE", - "name": "VE" - }, - { - "value": "VN", - "name": "VN" - }, - { - "value": "VG", - "name": "VG" - }, - { - "value": "VI", - "name": "VI" - }, - { - "value": "WF", - "name": "WF" - }, - { - "value": "EH", - "name": "EH" - }, - { - "value": "YE", - "name": "YE" - }, - { - "value": "ZM", - "name": "ZM" - }, - { - "value": "ZW", - "name": "ZW" + "type": "enum", + "members": { + "AF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AF" + } + }, + "AX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AX" + } + }, + "AL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AL" + } + }, + "DZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DZ" + } + }, + "AS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AS" + } + }, + "AD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AD" + } + }, + "AO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AO" + } + }, + "AI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AI" + } + }, + "AQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AQ" + } + }, + "AG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AG" + } + }, + "AR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AR" + } + }, + "AM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AM" + } + }, + "AW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AW" + } + }, + "AU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AU" + } + }, + "AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AT" + } + }, + "AZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AZ" + } + }, + "BS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BS" + } + }, + "BH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BH" + } + }, + "BD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BD" + } + }, + "BB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BB" + } + }, + "BY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BY" + } + }, + "BE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BE" + } + }, + "BZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BZ" + } + }, + "BJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BJ" + } + }, + "BM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BM" + } + }, + "BT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BT" + } + }, + "BO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BO" + } + }, + "BQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BQ" + } + }, + "BA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BA" + } + }, + "BW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BW" + } + }, + "BV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BV" + } + }, + "BR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BR" + } + }, + "IO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IO" + } + }, + "BN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BN" + } + }, + "BG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BG" + } + }, + "BF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BF" + } + }, + "BI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BI" + } + }, + "KH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KH" + } + }, + "CM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CM" + } + }, + "CA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CA" + } + }, + "CV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CV" + } + }, + "KY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KY" + } + }, + "CF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CF" + } + }, + "TD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TD" + } + }, + "CL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CL" + } + }, + "CN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CN" + } + }, + "CX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CX" + } + }, + "CC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CC" + } + }, + "CO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CO" + } + }, + "KM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KM" + } + }, + "CG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CG" + } + }, + "CD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CD" + } + }, + "CK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CK" + } + }, + "CR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CR" + } + }, + "CI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CI" + } + }, + "HR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HR" + } + }, + "CU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CU" + } + }, + "CW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CW" + } + }, + "CY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CY" + } + }, + "CZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CZ" + } + }, + "DK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DK" + } + }, + "DJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DJ" + } + }, + "DM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DM" + } + }, + "DO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DO" + } + }, + "EC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EC" + } + }, + "EG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EG" + } + }, + "SV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SV" + } + }, + "GQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GQ" + } + }, + "ER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ER" + } + }, + "EE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EE" + } + }, + "ET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ET" + } + }, + "FK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FK" + } + }, + "FO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FO" + } + }, + "FJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FJ" + } + }, + "FI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FI" + } + }, + "FR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FR" + } + }, + "GF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GF" + } + }, + "PF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PF" + } + }, + "TF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TF" + } + }, + "GA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GA" + } + }, + "GM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GM" + } + }, + "GE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GE" + } + }, + "DE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DE" + } + }, + "GH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GH" + } + }, + "GI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GI" + } + }, + "GR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GR" + } + }, + "GL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GL" + } + }, + "GD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GD" + } + }, + "GP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GP" + } + }, + "GU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GU" + } + }, + "GT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GT" + } + }, + "GG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GG" + } + }, + "GN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GN" + } + }, + "GW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GW" + } + }, + "GY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GY" + } + }, + "HT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HT" + } + }, + "HM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HM" + } + }, + "VA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VA" + } + }, + "HN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HN" + } + }, + "HK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HK" + } + }, + "HU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HU" + } + }, + "IS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IS" + } + }, + "IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN" + } + }, + "ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ID" + } + }, + "IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IR" + } + }, + "IQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IQ" + } + }, + "IE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IE" + } + }, + "IM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IM" + } + }, + "IL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IL" + } + }, + "IT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IT" + } + }, + "JM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JM" + } + }, + "JP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JP" + } + }, + "JE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JE" + } + }, + "JO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JO" + } + }, + "KZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KZ" + } + }, + "KE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KE" + } + }, + "KI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KI" + } + }, + "KP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KP" + } + }, + "KR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KR" + } + }, + "KW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KW" + } + }, + "KG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KG" + } + }, + "LA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LA" + } + }, + "LV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LV" + } + }, + "LB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LB" + } + }, + "LS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LS" + } + }, + "LR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LR" + } + }, + "LY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LY" + } + }, + "LI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LI" + } + }, + "LT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LT" + } + }, + "LU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LU" + } + }, + "MO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MO" + } + }, + "MK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MK" + } + }, + "MG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MG" + } + }, + "MW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MW" + } + }, + "MY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MY" + } + }, + "MV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MV" + } + }, + "ML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ML" + } + }, + "MT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MT" + } + }, + "MH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MH" + } + }, + "MQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MQ" + } + }, + "MR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MR" + } + }, + "MU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MU" + } + }, + "YT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "YT" + } + }, + "MX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MX" + } + }, + "FM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FM" + } + }, + "MD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MD" + } + }, + "MC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MC" + } + }, + "MN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MN" + } + }, + "ME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ME" + } + }, + "MS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MS" + } + }, + "MA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MA" + } + }, + "MZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MZ" + } + }, + "MM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MM" + } + }, + "NA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NA" + } + }, + "NR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NR" + } + }, + "NP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NP" + } + }, + "NL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NL" + } + }, + "NC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NC" + } + }, + "NZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NZ" + } + }, + "NI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NI" + } + }, + "NE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NE" + } + }, + "NG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NG" + } + }, + "NU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NU" + } + }, + "NF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NF" + } + }, + "MP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MP" + } + }, + "NO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NO" + } + }, + "OM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OM" + } + }, + "PK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PK" + } + }, + "PW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PW" + } + }, + "PS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PS" + } + }, + "PA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PA" + } + }, + "PG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PG" + } + }, + "PY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PY" + } + }, + "PE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PE" + } + }, + "PH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PH" + } + }, + "PN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PN" + } + }, + "PL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PL" + } + }, + "PT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PT" + } + }, + "PR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PR" + } + }, + "QA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QA" + } + }, + "RE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RE" + } + }, + "RO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RO" + } + }, + "RU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RU" + } + }, + "RW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RW" + } + }, + "BL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BL" + } + }, + "SH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SH" + } + }, + "KN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KN" + } + }, + "LC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LC" + } + }, + "MF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MF" + } + }, + "PM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PM" + } + }, + "VC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VC" + } + }, + "WS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WS" + } + }, + "SM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SM" + } + }, + "ST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ST" + } + }, + "SA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SA" + } + }, + "SN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SN" + } + }, + "RS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RS" + } + }, + "SC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SC" + } + }, + "SL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SL" + } + }, + "SG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SG" + } + }, + "SX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SX" + } + }, + "SK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SK" + } + }, + "SI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SI" + } + }, + "SB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SB" + } + }, + "SO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SO" + } + }, + "ZA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZA" + } + }, + "GS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GS" + } + }, + "SS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SS" + } + }, + "ES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ES" + } + }, + "LK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LK" + } + }, + "SD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SD" + } + }, + "SR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SR" + } + }, + "SJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SJ" + } + }, + "SZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SZ" + } + }, + "SE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SE" + } + }, + "CH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CH" + } + }, + "SY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SY" + } + }, + "TW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TW" + } + }, + "TJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TJ" + } + }, + "TZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TZ" + } + }, + "TH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TH" + } + }, + "TL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TL" + } + }, + "TG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TG" + } + }, + "TK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TK" + } + }, + "TO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TO" + } + }, + "TT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TT" + } + }, + "TN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TN" + } + }, + "TR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TR" + } + }, + "TM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TM" + } + }, + "TC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TC" + } + }, + "TV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TV" + } + }, + "UG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UG" + } + }, + "UA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UA" } - ] + }, + "AE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AE" + } + }, + "GB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GB" + } + }, + "US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "US" + } + }, + "UM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UM" + } + }, + "UY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UY" + } + }, + "UZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UZ" + } + }, + "VU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VU" + } + }, + "VE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VE" + } + }, + "VN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VN" + } + }, + "VG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VG" + } + }, + "VI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VI" + } + }, + "WF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WF" + } + }, + "EH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EH" + } + }, + "YE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "YE" + } + }, + "ZM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZM" + } + }, + "ZW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZW" + } + } } }, "com.amazonaws.wafregional#GeoMatchConstraints": { @@ -5398,7 +5839,33 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the ByteMatchSet specified by ByteMatchSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the ByteMatchSet specified by ByteMatchSetId.

", + "smithy.api#examples": [ + { + "title": "To get a byte match set", + "documentation": "The following example returns the details of a byte match set with the ID exampleIDs3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "ByteMatchSetId": "exampleIDs3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "ByteMatchSet": { + "ByteMatchSetId": "exampleIDs3t-46da-4fdb-b8d5-abc321j569j5", + "ByteMatchTuples": [ + { + "FieldToMatch": { + "Data": "referer", + "Type": "HEADER" + }, + "PositionalConstraint": "CONTAINS", + "TargetString": "badrefer1", + "TextTransformation": "NONE" + } + ], + "Name": "ByteMatchNameExample" + } + } + } + ] } }, "com.amazonaws.wafregional#GetByteMatchSetRequest": { @@ -5411,6 +5878,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetByteMatchSetResponse": { @@ -5422,6 +5892,9 @@ "smithy.api#documentation": "

Information about the ByteMatchSet that you specified in the GetByteMatchSet request. For more information, see the \n\t\t\tfollowing topics:

\n\t\t
    \n
  • \n

    \n ByteMatchSet: Contains ByteMatchSetId, ByteMatchTuples, and Name\n

    \n
  • \n
  • \n

    \n ByteMatchTuples: Contains an array of ByteMatchTuple objects. Each ByteMatchTuple \n\t\t\t\tobject contains FieldToMatch, PositionalConstraint, TargetString, \n\t\t\t\tand TextTransformation\n

    \n
  • \n
  • \n

    \n FieldToMatch: Contains Data and Type\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetChangeToken": { @@ -5438,12 +5911,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

When you want to create, update, or delete AWS WAF objects, get a change token and include the change token in the create, update, or delete request. Change tokens ensure that your application doesn't submit conflicting requests to AWS WAF.

\n\t\t

Each create, update, or delete request must use a unique change token. If your application submits a GetChangeToken request \n\t\t\tand then submits a second GetChangeToken request before submitting a create, update, or delete request, the second \n\t\t\tGetChangeToken request returns the same value as the first GetChangeToken request.

\n\t\t

When you use a change token in a create, update, or delete request, the status of the change token changes to PENDING, \n\t\t\twhich indicates that AWS WAF is propagating the change to all AWS WAF servers. Use GetChangeTokenStatus to determine the \n\t\t\tstatus of your change token.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

When you want to create, update, or delete AWS WAF objects, get a change token and include the change token in the create, update, or delete request. Change tokens ensure that your application doesn't submit conflicting requests to AWS WAF.

\n\t\t

Each create, update, or delete request must use a unique change token. If your application submits a GetChangeToken request \n\t\t\tand then submits a second GetChangeToken request before submitting a create, update, or delete request, the second \n\t\t\tGetChangeToken request returns the same value as the first GetChangeToken request.

\n\t\t

When you use a change token in a create, update, or delete request, the status of the change token changes to PENDING, \n\t\t\twhich indicates that AWS WAF is propagating the change to all AWS WAF servers. Use GetChangeTokenStatus to determine the \n\t\t\tstatus of your change token.

", + "smithy.api#examples": [ + { + "title": "To get a change token", + "documentation": "The following example returns a change token to use for a create, update or delete operation.", + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#GetChangeTokenRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.wafregional#GetChangeTokenResponse": { "type": "structure", @@ -5454,6 +5939,9 @@ "smithy.api#documentation": "

The ChangeToken that you used in the request. Use this value in a GetChangeTokenStatus request \n\t\t\tto get the current status of the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetChangeTokenStatus": { @@ -5473,7 +5961,19 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the status of a ChangeToken that you got by calling GetChangeToken. ChangeTokenStatus is \n\t\t\tone of the following values:

\n\t\t
    \n
  • \n

    \n PROVISIONED: You requested the change token by calling GetChangeToken, but you haven't used it yet \n\t\t\t\tin a call to create, update, or delete an AWS WAF object.

    \n
  • \n
  • \n

    \n PENDING: AWS WAF is propagating the create, update, or delete request to all AWS WAF servers.

    \n
  • \n
  • \n

    \n INSYNC: Propagation is complete.

    \n
  • \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the status of a ChangeToken that you got by calling GetChangeToken. ChangeTokenStatus is \n\t\t\tone of the following values:

\n\t\t
    \n
  • \n

    \n PROVISIONED: You requested the change token by calling GetChangeToken, but you haven't used it yet \n\t\t\t\tin a call to create, update, or delete an AWS WAF object.

    \n
  • \n
  • \n

    \n PENDING: AWS WAF is propagating the create, update, or delete request to all AWS WAF servers.

    \n
  • \n
  • \n

    \n INSYNC: Propagation is complete.

    \n
  • \n
", + "smithy.api#examples": [ + { + "title": "To get the change token status", + "documentation": "The following example returns the status of a change token with the ID abcd12f2-46da-4fdb-b8d5-fbd4c466928f.", + "input": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeTokenStatus": "PENDING" + } + } + ] } }, "com.amazonaws.wafregional#GetChangeTokenStatusRequest": { @@ -5486,6 +5986,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetChangeTokenStatusResponse": { @@ -5497,6 +6000,9 @@ "smithy.api#documentation": "

The status of the change token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetGeoMatchSet": { @@ -5532,6 +6038,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetGeoMatchSetResponse": { @@ -5543,6 +6052,9 @@ "smithy.api#documentation": "

Information about the GeoMatchSet that you specified in the GetGeoMatchSet request. This includes the Type, which for a GeoMatchContraint is always Country, as well as the Value, which is the identifier for a specific country.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetIPSet": { @@ -5565,7 +6077,28 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the IPSet that is specified by IPSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the IPSet that is specified by IPSetId.

", + "smithy.api#examples": [ + { + "title": "To get an IP set", + "documentation": "The following example returns the details of an IP match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "IPSet": { + "IPSetDescriptors": [ + { + "Type": "IPV4", + "Value": "192.0.2.44/32" + } + ], + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "Name": "MyIPSetFriendlyName" + } + } + } + ] } }, "com.amazonaws.wafregional#GetIPSetRequest": { @@ -5578,6 +6111,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetIPSetResponse": { @@ -5589,6 +6125,9 @@ "smithy.api#documentation": "

Information about the IPSet that you specified in the GetIPSet request. For more information, see the \n\t\t\tfollowing topics:

\n\t\t
    \n
  • \n

    \n IPSet: Contains IPSetDescriptors, IPSetId, and Name\n

    \n
  • \n
  • \n

    \n IPSetDescriptors: Contains an array of IPSetDescriptor objects. Each IPSetDescriptor \n\t\t\t\tobject contains Type and Value\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetLoggingConfiguration": { @@ -5621,6 +6160,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetLoggingConfigurationResponse": { @@ -5632,6 +6174,9 @@ "smithy.api#documentation": "

The LoggingConfiguration for the specified web ACL.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetPermissionPolicy": { @@ -5664,6 +6209,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetPermissionPolicyResponse": { @@ -5675,6 +6223,9 @@ "smithy.api#documentation": "

The IAM policy attached to the specified RuleGroup.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetRateBasedRule": { @@ -5742,6 +6293,9 @@ "smithy.api#documentation": "

A null value and not currently used. Do not include this in your request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetRateBasedRuleManagedKeysResponse": { @@ -5759,6 +6313,9 @@ "smithy.api#documentation": "

A null value and not currently used.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetRateBasedRuleRequest": { @@ -5771,6 +6328,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetRateBasedRuleResponse": { @@ -5782,6 +6342,9 @@ "smithy.api#documentation": "

Information about the RateBasedRule that you specified in the\n GetRateBasedRule request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetRegexMatchSet": { @@ -5817,6 +6380,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetRegexMatchSetResponse": { @@ -5828,6 +6394,9 @@ "smithy.api#documentation": "

Information about the RegexMatchSet that you specified in the GetRegexMatchSet request. For more information, see RegexMatchTuple.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetRegexPatternSet": { @@ -5863,6 +6432,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetRegexPatternSetResponse": { @@ -5874,6 +6446,9 @@ "smithy.api#documentation": "

Information about the RegexPatternSet that you specified in the GetRegexPatternSet request, including the identifier of the pattern set and the regular expression patterns you want AWS WAF to search for.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetRule": { @@ -5896,7 +6471,30 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the Rule that is specified by the RuleId that you included in the GetRule request.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the Rule that is specified by the RuleId that you included in the GetRule request.

", + "smithy.api#examples": [ + { + "title": "To get a rule", + "documentation": "The following example returns the details of a rule with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "RuleId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "Rule": { + "MetricName": "WAFByteHeaderRule", + "Name": "WAFByteHeaderRule", + "Predicates": [ + { + "DataId": "MyByteMatchSetID", + "Negated": false, + "Type": "ByteMatch" + } + ], + "RuleId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + } + } + ] } }, "com.amazonaws.wafregional#GetRuleGroup": { @@ -5929,6 +6527,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetRuleGroupResponse": { @@ -5940,6 +6541,9 @@ "smithy.api#documentation": "

Information about the RuleGroup that you specified in the GetRuleGroup request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetRuleRequest": { @@ -5952,6 +6556,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetRuleResponse": { @@ -5963,6 +6570,9 @@ "smithy.api#documentation": "

Information about the Rule that you specified in the GetRule request. \n\t\t\tFor more information, see the following topics:

\n\t\t
    \n
  • \n

    \n Rule: Contains MetricName, Name, an array of Predicate objects, \n\t\t\t\tand RuleId\n

    \n
  • \n
  • \n

    \n Predicate: Each Predicate object contains DataId, Negated, and \n\t\t\t\tType\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetSampledRequests": { @@ -6027,6 +6637,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetSampledRequestsResponse": { @@ -6051,6 +6664,9 @@ "smithy.api#documentation": "

Usually, TimeWindow is the time range that you specified in the GetSampledRequests request. However, \n\t\t\tif your AWS resource received more than 5,000 requests during the time range that you specified in the request, \n\t\t\tGetSampledRequests returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetSizeConstraintSet": { @@ -6073,7 +6689,32 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the SizeConstraintSet specified by SizeConstraintSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the SizeConstraintSet specified by SizeConstraintSetId.

", + "smithy.api#examples": [ + { + "title": "To get a size constraint set", + "documentation": "The following example returns the details of a size constraint match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "SizeConstraintSet": { + "Name": "MySampleSizeConstraintSet", + "SizeConstraints": [ + { + "ComparisonOperator": "GT", + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "Size": 0, + "TextTransformation": "NONE" + } + ], + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + } + } + ] } }, "com.amazonaws.wafregional#GetSizeConstraintSetRequest": { @@ -6086,6 +6727,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetSizeConstraintSetResponse": { @@ -6097,6 +6741,9 @@ "smithy.api#documentation": "

Information about the SizeConstraintSet that you specified in the GetSizeConstraintSet request. For more information, see the \n\t\t\tfollowing topics:

\n\t\t
    \n
  • \n

    \n SizeConstraintSet: Contains SizeConstraintSetId, SizeConstraints, and Name\n

    \n
  • \n
  • \n

    \n SizeConstraints: Contains an array of SizeConstraint objects. Each SizeConstraint \n\t\t\t\tobject contains FieldToMatch, TextTransformation, ComparisonOperator, \n\t\t\t\tand Size\n

    \n
  • \n
  • \n

    \n FieldToMatch: Contains Data and Type\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetSqlInjectionMatchSet": { @@ -6119,7 +6766,30 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId.

", + "smithy.api#examples": [ + { + "title": "To get a SQL injection match set", + "documentation": "The following example returns the details of a SQL injection match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "SqlInjectionMatchSet": { + "Name": "MySQLInjectionMatchSet", + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "SqlInjectionMatchTuples": [ + { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + ] + } + } + } + ] } }, "com.amazonaws.wafregional#GetSqlInjectionMatchSetRequest": { @@ -6134,7 +6804,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get a SqlInjectionMatchSet.

" + "smithy.api#documentation": "

A request to get a SqlInjectionMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetSqlInjectionMatchSetResponse": { @@ -6148,7 +6819,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a GetSqlInjectionMatchSet request.

" + "smithy.api#documentation": "

The response to a GetSqlInjectionMatchSet request.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetWebACL": { @@ -6171,7 +6843,35 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the WebACL that is specified by WebACLId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the WebACL that is specified by WebACLId.

", + "smithy.api#examples": [ + { + "title": "To get a web ACL", + "documentation": "The following example returns the details of a web ACL with the ID createwebacl-1472061481310.", + "input": { + "WebACLId": "createwebacl-1472061481310" + }, + "output": { + "WebACL": { + "DefaultAction": { + "Type": "ALLOW" + }, + "MetricName": "CreateExample", + "Name": "CreateExample", + "Rules": [ + { + "Action": { + "Type": "ALLOW" + }, + "Priority": 1, + "RuleId": "WAFRule-1-Example" + } + ], + "WebACLId": "createwebacl-1472061481310" + } + } + } + ] } }, "com.amazonaws.wafregional#GetWebACLForResource": { @@ -6213,6 +6913,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetWebACLForResourceResponse": { @@ -6224,6 +6927,9 @@ "smithy.api#documentation": "

Information about the web ACL that you specified in the GetWebACLForResource request. If there is no associated resource, a null WebACLSummary is returned.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetWebACLRequest": { @@ -6236,6 +6942,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetWebACLResponse": { @@ -6247,6 +6956,9 @@ "smithy.api#documentation": "

Information about the WebACL that you specified in the GetWebACL request. \n\t\t\tFor more information, see the following topics:

\n\t\t
    \n
  • \n

    \n WebACL: Contains DefaultAction, MetricName, Name, an array of \n\t\t\t\tRule objects, and WebACLId\n

    \n
  • \n
  • \n

    \n DefaultAction (Data type is WafAction): Contains Type\n

    \n
  • \n
  • \n

    \n Rules: Contains an array of ActivatedRule objects, which contain Action, \n\t\t\t\tPriority, and RuleId\n

    \n
  • \n
  • \n

    \n Action: Contains Type\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#GetXssMatchSet": { @@ -6269,7 +6981,30 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the XssMatchSet that is specified by XssMatchSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the XssMatchSet that is specified by XssMatchSetId.

", + "smithy.api#examples": [ + { + "title": "To get an XSS match set", + "documentation": "The following example returns the details of an XSS match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "XssMatchSet": { + "Name": "MySampleXssMatchSet", + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "XssMatchTuples": [ + { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + ] + } + } + } + ] } }, "com.amazonaws.wafregional#GetXssMatchSetRequest": { @@ -6284,7 +7019,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get an XssMatchSet.

" + "smithy.api#documentation": "

A request to get an XssMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#GetXssMatchSetResponse": { @@ -6298,7 +7034,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a GetXssMatchSet request.

" + "smithy.api#documentation": "

The response to a GetXssMatchSet request.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#HTTPHeader": { @@ -6434,18 +7171,20 @@ } }, "com.amazonaws.wafregional#IPSetDescriptorType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IPV4", - "name": "IPV4" - }, - { - "value": "IPV6", - "name": "IPV6" + "type": "enum", + "members": { + "IPV4": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPV4" } - ] + }, + "IPV6": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPV6" + } + } } }, "com.amazonaws.wafregional#IPSetDescriptorValue": { @@ -6455,7 +7194,7 @@ "min": 1, "max": 50 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#IPSetDescriptors": { @@ -6576,6 +7315,9 @@ "smithy.api#documentation": "

Specifies the number of ActivatedRules that you want AWS WAF to return for this request. If you have more ActivatedRules than the number that you specify for Limit, the response includes a \n NextMarker value that you can use to get another batch of ActivatedRules.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListActivatedRulesInRuleGroupResponse": { @@ -6593,6 +7335,9 @@ "smithy.api#documentation": "

An array of ActivatedRules objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListByteMatchSets": { @@ -6631,6 +7376,9 @@ "smithy.api#documentation": "

Specifies the number of ByteMatchSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tByteMatchSets objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of ByteMatchSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListByteMatchSetsResponse": { @@ -6648,6 +7396,9 @@ "smithy.api#documentation": "

An array of ByteMatchSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListGeoMatchSets": { @@ -6686,6 +7437,9 @@ "smithy.api#documentation": "

Specifies the number of GeoMatchSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tGeoMatchSet objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of GeoMatchSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListGeoMatchSetsResponse": { @@ -6703,6 +7457,9 @@ "smithy.api#documentation": "

An array of GeoMatchSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListIPSets": { @@ -6722,7 +7479,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of IPSetSummary objects in the response.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of IPSetSummary objects in the response.

", + "smithy.api#examples": [ + { + "title": "To list IP sets", + "documentation": "The following example returns an array of up to 100 IP match sets.", + "input": { + "Limit": 100 + }, + "output": { + "IPSets": [ + { + "IPSetId": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Name": "MyIPSetFriendlyName" + } + ] + } + } + ] } }, "com.amazonaws.wafregional#ListIPSetsRequest": { @@ -6741,6 +7515,9 @@ "smithy.api#documentation": "

Specifies the number of IPSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tIPSet objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of IPSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListIPSetsResponse": { @@ -6758,6 +7535,9 @@ "smithy.api#documentation": "

An array of IPSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListLoggingConfigurations": { @@ -6799,6 +7579,9 @@ "smithy.api#documentation": "

Specifies the number of LoggingConfigurations that you want AWS WAF to return for this request. If you have more LoggingConfigurations than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of LoggingConfigurations.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListLoggingConfigurationsResponse": { @@ -6816,6 +7599,9 @@ "smithy.api#documentation": "

If you have more LoggingConfigurations than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more LoggingConfigurations, submit another ListLoggingConfigurations request, and specify the NextMarker value from the response in the NextMarker value in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListRateBasedRules": { @@ -6854,6 +7640,9 @@ "smithy.api#documentation": "

Specifies the number of Rules that you want AWS WAF to return for this\n request. If you have more Rules than the number that you specify for\n Limit, the response includes a NextMarker value that you can\n use to get another batch of Rules.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListRateBasedRulesResponse": { @@ -6871,6 +7660,9 @@ "smithy.api#documentation": "

An array of RuleSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListRegexMatchSets": { @@ -6909,6 +7701,9 @@ "smithy.api#documentation": "

Specifies the number of RegexMatchSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tRegexMatchSet objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of RegexMatchSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListRegexMatchSetsResponse": { @@ -6926,6 +7721,9 @@ "smithy.api#documentation": "

An array of RegexMatchSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListRegexPatternSets": { @@ -6964,6 +7762,9 @@ "smithy.api#documentation": "

Specifies the number of RegexPatternSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tRegexPatternSet objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of RegexPatternSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListRegexPatternSetsResponse": { @@ -6981,6 +7782,9 @@ "smithy.api#documentation": "

An array of RegexPatternSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListResourcesForWebACL": { @@ -7025,6 +7829,9 @@ "smithy.api#documentation": "

The type of resource to list, either an application load balancer or Amazon API Gateway.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListResourcesForWebACLResponse": { @@ -7036,6 +7843,9 @@ "smithy.api#documentation": "

An array of ARNs (Amazon Resource Names) of the resources associated with the specified web ACL. An array with zero elements is returned if there are no resources associated with the web ACL.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListRuleGroups": { @@ -7071,6 +7881,9 @@ "smithy.api#documentation": "

Specifies the number of RuleGroups that you want AWS WAF to return for this request. If you have more RuleGroups than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of RuleGroups.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListRuleGroupsResponse": { @@ -7088,6 +7901,9 @@ "smithy.api#documentation": "

An array of RuleGroup objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListRules": { @@ -7107,7 +7923,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of RuleSummary objects.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of RuleSummary objects.

", + "smithy.api#examples": [ + { + "title": "To list rules", + "documentation": "The following example returns an array of up to 100 rules.", + "input": { + "Limit": 100 + }, + "output": { + "Rules": [ + { + "Name": "WAFByteHeaderRule", + "RuleId": "WAFRule-1-Example" + } + ] + } + } + ] } }, "com.amazonaws.wafregional#ListRulesRequest": { @@ -7126,6 +7959,9 @@ "smithy.api#documentation": "

Specifies the number of Rules that you want AWS WAF to return for this request. If you have more \t\t\tRules than the number that you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of Rules.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListRulesResponse": { @@ -7143,6 +7979,9 @@ "smithy.api#documentation": "

An array of RuleSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListSizeConstraintSets": { @@ -7162,7 +8001,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of SizeConstraintSetSummary objects.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of SizeConstraintSetSummary objects.

", + "smithy.api#examples": [ + { + "title": "To list a size constraint sets", + "documentation": "The following example returns an array of up to 100 size contraint match sets.", + "input": { + "Limit": 100 + }, + "output": { + "SizeConstraintSets": [ + { + "Name": "MySampleSizeConstraintSet", + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + ] + } + } + ] } }, "com.amazonaws.wafregional#ListSizeConstraintSetsRequest": { @@ -7181,6 +8037,9 @@ "smithy.api#documentation": "

Specifies the number of SizeConstraintSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tSizeConstraintSets objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of SizeConstraintSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListSizeConstraintSetsResponse": { @@ -7198,6 +8057,9 @@ "smithy.api#documentation": "

An array of SizeConstraintSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListSqlInjectionMatchSets": { @@ -7217,7 +8079,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of SqlInjectionMatchSet objects.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of SqlInjectionMatchSet objects.

", + "smithy.api#examples": [ + { + "title": "To list SQL injection match sets", + "documentation": "The following example returns an array of up to 100 SQL injection match sets.", + "input": { + "Limit": 100 + }, + "output": { + "SqlInjectionMatchSets": [ + { + "Name": "MySQLInjectionMatchSet", + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + ] + } + } + ] } }, "com.amazonaws.wafregional#ListSqlInjectionMatchSetsRequest": { @@ -7238,7 +8117,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to list the SqlInjectionMatchSet objects created by the current AWS account.

" + "smithy.api#documentation": "

A request to list the SqlInjectionMatchSet objects created by the current AWS account.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListSqlInjectionMatchSetsResponse": { @@ -7258,7 +8138,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a ListSqlInjectionMatchSets request.

" + "smithy.api#documentation": "

The response to a ListSqlInjectionMatchSets request.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListSubscribedRuleGroups": { @@ -7297,6 +8178,9 @@ "smithy.api#documentation": "

Specifies the number of subscribed rule groups that you want AWS WAF to return for this request. If you have more \n\t\t\tobjects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListSubscribedRuleGroupsResponse": { @@ -7314,6 +8198,9 @@ "smithy.api#documentation": "

An array of RuleGroup objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListTagsForResource": { @@ -7371,6 +8258,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListTagsForResourceResponse": { @@ -7388,6 +8278,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListWebACLs": { @@ -7407,7 +8300,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of WebACLSummary objects in the response.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of WebACLSummary objects in the response.

", + "smithy.api#examples": [ + { + "title": "To list Web ACLs", + "documentation": "The following example returns an array of up to 100 web ACLs.", + "input": { + "Limit": 100 + }, + "output": { + "WebACLs": [ + { + "Name": "WebACLexample", + "WebACLId": "webacl-1472061481310" + } + ] + } + } + ] } }, "com.amazonaws.wafregional#ListWebACLsRequest": { @@ -7426,6 +8336,9 @@ "smithy.api#documentation": "

Specifies the number of WebACL objects that you want AWS WAF to return for this request. If you have more \n\t\t\tWebACL objects than the number that you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of WebACL objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListWebACLsResponse": { @@ -7443,6 +8356,9 @@ "smithy.api#documentation": "

An array of WebACLSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#ListXssMatchSets": { @@ -7462,7 +8378,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of XssMatchSet objects.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of XssMatchSet objects.

", + "smithy.api#examples": [ + { + "title": "To list XSS match sets", + "documentation": "The following example returns an array of up to 100 XSS match sets.", + "input": { + "Limit": 100 + }, + "output": { + "XssMatchSets": [ + { + "Name": "MySampleXssMatchSet", + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + ] + } + } + ] } }, "com.amazonaws.wafregional#ListXssMatchSetsRequest": { @@ -7483,7 +8416,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to list the XssMatchSet objects created by the current AWS account.

" + "smithy.api#documentation": "

A request to list the XssMatchSet objects created by the current AWS account.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#ListXssMatchSetsResponse": { @@ -7503,7 +8437,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a ListXssMatchSets request.

" + "smithy.api#documentation": "

The response to a ListXssMatchSets request.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#LogDestinationConfigs": { @@ -7568,42 +8503,54 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#MatchFieldType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "URI", - "name": "URI" - }, - { - "value": "QUERY_STRING", - "name": "QUERY_STRING" - }, - { - "value": "HEADER", - "name": "HEADER" - }, - { - "value": "METHOD", - "name": "METHOD" - }, - { - "value": "BODY", - "name": "BODY" - }, - { - "value": "SINGLE_QUERY_ARG", - "name": "SINGLE_QUERY_ARG" - }, - { - "value": "ALL_QUERY_ARGS", - "name": "ALL_QUERY_ARGS" + "type": "enum", + "members": { + "URI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "URI" } - ] + }, + "QUERY_STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY_STRING" + } + }, + "HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HEADER" + } + }, + "METHOD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "METHOD" + } + }, + "BODY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BODY" + } + }, + "SINGLE_QUERY_ARG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SINGLE_QUERY_ARG" + } + }, + "ALL_QUERY_ARGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL_QUERY_ARGS" + } + } } }, "com.amazonaws.wafregional#MetricName": { @@ -7613,42 +8560,54 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#MigrationErrorType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENTITY_NOT_SUPPORTED", - "name": "ENTITY_NOT_SUPPORTED" - }, - { - "value": "ENTITY_NOT_FOUND", - "name": "ENTITY_NOT_FOUND" - }, - { - "value": "S3_BUCKET_NO_PERMISSION", - "name": "S3_BUCKET_NO_PERMISSION" - }, - { - "value": "S3_BUCKET_NOT_ACCESSIBLE", - "name": "S3_BUCKET_NOT_ACCESSIBLE" - }, - { - "value": "S3_BUCKET_NOT_FOUND", - "name": "S3_BUCKET_NOT_FOUND" - }, - { - "value": "S3_BUCKET_INVALID_REGION", - "name": "S3_BUCKET_INVALID_REGION" - }, - { - "value": "S3_INTERNAL_ERROR", - "name": "S3_INTERNAL_ERROR" + "type": "enum", + "members": { + "ENTITY_NOT_SUPPORTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENTITY_NOT_SUPPORTED" } - ] + }, + "ENTITY_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENTITY_NOT_FOUND" + } + }, + "S3_BUCKET_NO_PERMISSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_BUCKET_NO_PERMISSION" + } + }, + "S3_BUCKET_NOT_ACCESSIBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_BUCKET_NOT_ACCESSIBLE" + } + }, + "S3_BUCKET_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_BUCKET_NOT_FOUND" + } + }, + "S3_BUCKET_INVALID_REGION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_BUCKET_INVALID_REGION" + } + }, + "S3_INTERNAL_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_INTERNAL_ERROR" + } + } } }, "com.amazonaws.wafregional#Negated": { @@ -7661,7 +8620,7 @@ "min": 1, "max": 1224 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#PaginationLimit": { @@ -7675,82 +8634,116 @@ } }, "com.amazonaws.wafregional#ParameterExceptionField": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CHANGE_ACTION", - "name": "CHANGE_ACTION" - }, - { - "value": "WAF_ACTION", - "name": "WAF_ACTION" - }, - { - "value": "WAF_OVERRIDE_ACTION", - "name": "WAF_OVERRIDE_ACTION" - }, - { - "value": "PREDICATE_TYPE", - "name": "PREDICATE_TYPE" - }, - { - "value": "IPSET_TYPE", - "name": "IPSET_TYPE" - }, - { - "value": "BYTE_MATCH_FIELD_TYPE", - "name": "BYTE_MATCH_FIELD_TYPE" - }, - { - "value": "SQL_INJECTION_MATCH_FIELD_TYPE", - "name": "SQL_INJECTION_MATCH_FIELD_TYPE" - }, - { - "value": "BYTE_MATCH_TEXT_TRANSFORMATION", - "name": "BYTE_MATCH_TEXT_TRANSFORMATION" - }, - { - "value": "BYTE_MATCH_POSITIONAL_CONSTRAINT", - "name": "BYTE_MATCH_POSITIONAL_CONSTRAINT" - }, - { - "value": "SIZE_CONSTRAINT_COMPARISON_OPERATOR", - "name": "SIZE_CONSTRAINT_COMPARISON_OPERATOR" - }, - { - "value": "GEO_MATCH_LOCATION_TYPE", - "name": "GEO_MATCH_LOCATION_TYPE" - }, - { - "value": "GEO_MATCH_LOCATION_VALUE", - "name": "GEO_MATCH_LOCATION_VALUE" - }, - { - "value": "RATE_KEY", - "name": "RATE_KEY" - }, - { - "value": "RULE_TYPE", - "name": "RULE_TYPE" - }, - { - "value": "NEXT_MARKER", - "name": "NEXT_MARKER" - }, - { - "value": "RESOURCE_ARN", - "name": "RESOURCE_ARN" - }, - { - "value": "TAGS", - "name": "TAGS" - }, - { - "value": "TAG_KEYS", - "name": "TAG_KEYS" + "type": "enum", + "members": { + "CHANGE_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CHANGE_ACTION" } - ] + }, + "WAF_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WAF_ACTION" + } + }, + "WAF_OVERRIDE_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WAF_OVERRIDE_ACTION" + } + }, + "PREDICATE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PREDICATE_TYPE" + } + }, + "IPSET_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPSET_TYPE" + } + }, + "BYTE_MATCH_FIELD_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BYTE_MATCH_FIELD_TYPE" + } + }, + "SQL_INJECTION_MATCH_FIELD_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SQL_INJECTION_MATCH_FIELD_TYPE" + } + }, + "BYTE_MATCH_TEXT_TRANSFORMATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BYTE_MATCH_TEXT_TRANSFORMATION" + } + }, + "BYTE_MATCH_POSITIONAL_CONSTRAINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BYTE_MATCH_POSITIONAL_CONSTRAINT" + } + }, + "SIZE_CONSTRAINT_COMPARISON_OPERATOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIZE_CONSTRAINT_COMPARISON_OPERATOR" + } + }, + "GEO_MATCH_LOCATION_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GEO_MATCH_LOCATION_TYPE" + } + }, + "GEO_MATCH_LOCATION_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GEO_MATCH_LOCATION_VALUE" + } + }, + "RATE_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RATE_KEY" + } + }, + "RULE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RULE_TYPE" + } + }, + "NEXT_MARKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXT_MARKER" + } + }, + "RESOURCE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESOURCE_ARN" + } + }, + "TAGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TAGS" + } + }, + "TAG_KEYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TAG_KEYS" + } + } } }, "com.amazonaws.wafregional#ParameterExceptionParameter": { @@ -7762,26 +8755,32 @@ } }, "com.amazonaws.wafregional#ParameterExceptionReason": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INVALID_OPTION", - "name": "INVALID_OPTION" - }, - { - "value": "ILLEGAL_COMBINATION", - "name": "ILLEGAL_COMBINATION" - }, - { - "value": "ILLEGAL_ARGUMENT", - "name": "ILLEGAL_ARGUMENT" - }, - { - "value": "INVALID_TAG_KEY", - "name": "INVALID_TAG_KEY" + "type": "enum", + "members": { + "INVALID_OPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_OPTION" } - ] + }, + "ILLEGAL_COMBINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ILLEGAL_COMBINATION" + } + }, + "ILLEGAL_ARGUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ILLEGAL_ARGUMENT" + } + }, + "INVALID_TAG_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_TAG_KEY" + } + } } }, "com.amazonaws.wafregional#PolicyString": { @@ -7791,7 +8790,7 @@ "min": 1, "max": 395000 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#PopulationSize": { @@ -7801,30 +8800,38 @@ } }, "com.amazonaws.wafregional#PositionalConstraint": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EXACTLY", - "name": "EXACTLY" - }, - { - "value": "STARTS_WITH", - "name": "STARTS_WITH" - }, - { - "value": "ENDS_WITH", - "name": "ENDS_WITH" - }, - { - "value": "CONTAINS", - "name": "CONTAINS" - }, - { - "value": "CONTAINS_WORD", - "name": "CONTAINS_WORD" + "type": "enum", + "members": { + "EXACTLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXACTLY" } - ] + }, + "STARTS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STARTS_WITH" + } + }, + "ENDS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENDS_WITH" + } + }, + "CONTAINS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTAINS" + } + }, + "CONTAINS_WORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTAINS_WORD" + } + } } }, "com.amazonaws.wafregional#Predicate": { @@ -7857,38 +8864,50 @@ } }, "com.amazonaws.wafregional#PredicateType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IPMatch", - "name": "IP_MATCH" - }, - { - "value": "ByteMatch", - "name": "BYTE_MATCH" - }, - { - "value": "SqlInjectionMatch", - "name": "SQL_INJECTION_MATCH" - }, - { - "value": "GeoMatch", - "name": "GEO_MATCH" - }, - { - "value": "SizeConstraint", - "name": "SIZE_CONSTRAINT" - }, - { - "value": "XssMatch", - "name": "XSS_MATCH" - }, - { - "value": "RegexMatch", - "name": "REGEX_MATCH" + "type": "enum", + "members": { + "IP_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPMatch" } - ] + }, + "BYTE_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ByteMatch" + } + }, + "SQL_INJECTION_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SqlInjectionMatch" + } + }, + "GEO_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GeoMatch" + } + }, + "SIZE_CONSTRAINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SizeConstraint" + } + }, + "XSS_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "XssMatch" + } + }, + "REGEX_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RegexMatch" + } + } } }, "com.amazonaws.wafregional#Predicates": { @@ -7933,6 +8952,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#PutLoggingConfigurationResponse": { @@ -7944,6 +8966,9 @@ "smithy.api#documentation": "

The LoggingConfiguration that you submitted in the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#PutPermissionPolicy": { @@ -7989,11 +9014,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#PutPermissionPolicyResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.wafregional#RateBasedRule": { "type": "structure", @@ -8045,14 +9076,14 @@ } }, "com.amazonaws.wafregional#RateKey": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IP", - "name": "IP" + "type": "enum", + "members": { + "IP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IP" } - ] + } } }, "com.amazonaws.wafregional#RateLimit": { @@ -8311,7 +9342,7 @@ "min": 1, "max": 1224 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#ResourceArns": { @@ -8327,7 +9358,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#ResourceName": { @@ -8337,22 +9368,24 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#ResourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "APPLICATION_LOAD_BALANCER", - "name": "APPLICATION_LOAD_BALANCER" - }, - { - "value": "API_GATEWAY", - "name": "API_GATEWAY" + "type": "enum", + "members": { + "APPLICATION_LOAD_BALANCER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "APPLICATION_LOAD_BALANCER" } - ] + }, + "API_GATEWAY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "API_GATEWAY" + } + } } }, "com.amazonaws.wafregional#Rule": { @@ -8543,7 +9576,7 @@ "min": 3, "max": 63 }, - "smithy.api#pattern": "^aws-waf-migration-[0-9A-Za-z\\.\\-_]*" + "smithy.api#pattern": "^aws-waf-migration-[0-9A-Za-z\\.\\-_]*$" } }, "com.amazonaws.wafregional#S3ObjectUrl": { @@ -8953,7 +9986,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.wafregional#TagKeyList": { @@ -9030,11 +10063,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.wafregional#TagValue": { "type": "string", @@ -9047,34 +10086,44 @@ } }, "com.amazonaws.wafregional#TextTransformation": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "COMPRESS_WHITE_SPACE", - "name": "COMPRESS_WHITE_SPACE" - }, - { - "value": "HTML_ENTITY_DECODE", - "name": "HTML_ENTITY_DECODE" - }, - { - "value": "LOWERCASE", - "name": "LOWERCASE" - }, - { - "value": "CMD_LINE", - "name": "CMD_LINE" - }, - { - "value": "URL_DECODE", - "name": "URL_DECODE" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" } - ] + }, + "COMPRESS_WHITE_SPACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPRESS_WHITE_SPACE" + } + }, + "HTML_ENTITY_DECODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HTML_ENTITY_DECODE" + } + }, + "LOWERCASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOWERCASE" + } + }, + "CMD_LINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CMD_LINE" + } + }, + "URL_DECODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "URL_DECODE" + } + } } }, "com.amazonaws.wafregional#TimeWindow": { @@ -9154,11 +10203,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.wafregional#UpdateByteMatchSet": { "type": "operation", @@ -9195,7 +10250,34 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For each ByteMatchTuple object, \n\t\t\tyou specify the following values:

\n\t\t
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change a ByteMatchSetUpdate object, \n\t\t\t\tyou delete the existing object and add a new one.

    \n
  • \n
  • \n

    The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header.

    \n
  • \n
  • \n

    The bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to look for. For more information, including how you specify \n\t\t\t\tthe values for the AWS WAF API and the AWS CLI or SDKs, see TargetString in the ByteMatchTuple data type.

    \n
  • \n
  • \n

    Where to look, such as at the beginning or the end of a query string.

    \n
  • \n
  • \n

    Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string.

    \n
  • \n
\n\t\t

For example, you can add a ByteMatchSetUpdate object that matches web requests in which User-Agent headers contain \n\t\t\tthe string BadBot. You can then configure AWS WAF to block those requests.

\t\t\n\t\t

To create and configure a ByteMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Create a ByteMatchSet. For more information, see CreateByteMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateByteMatchSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateByteMatchSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For each ByteMatchTuple object, \n\t\t\tyou specify the following values:

\n\t\t
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change a ByteMatchSetUpdate object, \n\t\t\t\tyou delete the existing object and add a new one.

    \n
  • \n
  • \n

    The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header.

    \n
  • \n
  • \n

    The bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to look for. For more information, including how you specify \n\t\t\t\tthe values for the AWS WAF API and the AWS CLI or SDKs, see TargetString in the ByteMatchTuple data type.

    \n
  • \n
  • \n

    Where to look, such as at the beginning or the end of a query string.

    \n
  • \n
  • \n

    Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string.

    \n
  • \n
\n\t\t

For example, you can add a ByteMatchSetUpdate object that matches web requests in which User-Agent headers contain \n\t\t\tthe string BadBot. You can then configure AWS WAF to block those requests.

\t\t\n\t\t

To create and configure a ByteMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Create a ByteMatchSet. For more information, see CreateByteMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateByteMatchSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateByteMatchSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a byte match set", + "documentation": "The following example deletes a ByteMatchTuple object (filters) in an byte match set with the ID exampleIDs3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "ByteMatchSetId": "exampleIDs3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "ByteMatchTuple": { + "FieldToMatch": { + "Data": "referer", + "Type": "HEADER" + }, + "PositionalConstraint": "CONTAINS", + "TargetString": "badrefer1", + "TextTransformation": "NONE" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#UpdateByteMatchSetRequest": { @@ -9222,6 +10304,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateByteMatchSetResponse": { @@ -9233,6 +10318,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateByteMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateGeoMatchSet": { @@ -9300,6 +10388,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateGeoMatchSetResponse": { @@ -9311,6 +10402,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateGeoMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateIPSet": { @@ -9351,7 +10445,29 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n

Inserts or deletes IPSetDescriptor objects in an\n IPSet. For each IPSetDescriptor object, you specify the following\n values:

\n
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change an\n IPSetDescriptor object, you delete the existing object and add a new\n one.

    \n
  • \n
  • \n

    The IP address version, IPv4 or IPv6.

    \n
  • \n
  • \n

    The IP address in CIDR notation, for example, 192.0.2.0/24 (for\n the range of IP addresses from 192.0.2.0 to 192.0.2.255) or\n 192.0.2.44/32 (for the individual IP address\n 192.0.2.44).

    \n
  • \n
\n

AWS WAF supports IPv4 address ranges: /8 and any range between /16 through /32. AWS\n WAF supports IPv6 address ranges: /24, /32, /48, /56, /64, and /128. For more\n information about CIDR notation, see the Wikipedia entry Classless\n Inter-Domain Routing.

\n

IPv6 addresses can be represented using any of the following formats:

\n
    \n
  • \n

    1111:0000:0000:0000:0000:0000:0000:0111/128

    \n
  • \n
  • \n

    1111:0:0:0:0:0:0:0111/128

    \n
  • \n
  • \n

    1111::0111/128

    \n
  • \n
  • \n

    1111::111/128

    \n
  • \n
\n

You use an IPSet to specify which web requests you want to allow or\n block based on the IP addresses that the requests originated from. For example, if you're\n receiving a lot of requests from one or a small number of IP addresses and you want to\n block the requests, you can create an IPSet that specifies those IP addresses,\n and then configure AWS WAF to block the requests.

\n

To create and configure an IPSet, perform the following steps:

\n
    \n
  1. \n

    Submit a CreateIPSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide\n in the ChangeToken parameter of an UpdateIPSet\n request.

    \n
  4. \n
  5. \n

    Submit an UpdateIPSet request to specify the IP addresses that you\n want AWS WAF to watch for.

    \n
  6. \n
\n

When you update an IPSet, you specify the IP addresses that you want to\n add and/or the IP addresses that you want to delete. If you want to change an IP address,\n you delete the existing IP address and add the new one.

\n

You can insert a maximum of 1000 addresses in a single\n request.

\n

For more information about how to use the AWS WAF API to allow or block HTTP\n requests, see the AWS WAF\n Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n

Inserts or deletes IPSetDescriptor objects in an\n IPSet. For each IPSetDescriptor object, you specify the following\n values:

\n
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change an\n IPSetDescriptor object, you delete the existing object and add a new\n one.

    \n
  • \n
  • \n

    The IP address version, IPv4 or IPv6.

    \n
  • \n
  • \n

    The IP address in CIDR notation, for example, 192.0.2.0/24 (for\n the range of IP addresses from 192.0.2.0 to 192.0.2.255) or\n 192.0.2.44/32 (for the individual IP address\n 192.0.2.44).

    \n
  • \n
\n

AWS WAF supports IPv4 address ranges: /8 and any range between /16 through /32. AWS\n WAF supports IPv6 address ranges: /24, /32, /48, /56, /64, and /128. For more\n information about CIDR notation, see the Wikipedia entry Classless\n Inter-Domain Routing.

\n

IPv6 addresses can be represented using any of the following formats:

\n
    \n
  • \n

    1111:0000:0000:0000:0000:0000:0000:0111/128

    \n
  • \n
  • \n

    1111:0:0:0:0:0:0:0111/128

    \n
  • \n
  • \n

    1111::0111/128

    \n
  • \n
  • \n

    1111::111/128

    \n
  • \n
\n

You use an IPSet to specify which web requests you want to allow or\n block based on the IP addresses that the requests originated from. For example, if you're\n receiving a lot of requests from one or a small number of IP addresses and you want to\n block the requests, you can create an IPSet that specifies those IP addresses,\n and then configure AWS WAF to block the requests.

\n

To create and configure an IPSet, perform the following steps:

\n
    \n
  1. \n

    Submit a CreateIPSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide\n in the ChangeToken parameter of an UpdateIPSet\n request.

    \n
  4. \n
  5. \n

    Submit an UpdateIPSet request to specify the IP addresses that you\n want AWS WAF to watch for.

    \n
  6. \n
\n

When you update an IPSet, you specify the IP addresses that you want to\n add and/or the IP addresses that you want to delete. If you want to change an IP address,\n you delete the existing IP address and add the new one.

\n

You can insert a maximum of 1000 addresses in a single\n request.

\n

For more information about how to use the AWS WAF API to allow or block HTTP\n requests, see the AWS WAF\n Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update an IP set", + "documentation": "The following example deletes an IPSetDescriptor object in an IP match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "IPSetDescriptor": { + "Type": "IPV4", + "Value": "192.0.2.44/32" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#UpdateIPSetRequest": { @@ -9378,6 +10494,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateIPSetResponse": { @@ -9389,6 +10508,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateIPSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateRateBasedRule": { @@ -9464,6 +10586,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateRateBasedRuleResponse": { @@ -9475,6 +10600,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the\n UpdateRateBasedRule request. You can also use this value to query the\n status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateRegexMatchSet": { @@ -9539,6 +10667,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateRegexMatchSetResponse": { @@ -9550,6 +10681,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateRegexMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateRegexPatternSet": { @@ -9614,6 +10748,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateRegexPatternSetResponse": { @@ -9625,6 +10762,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateRegexPatternSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateRule": { @@ -9665,7 +10805,30 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes Predicate objects in a Rule. Each\n Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests\n that you want to allow, block, or count. If you add more than one predicate to a\n Rule, a request must match all of the specifications to be allowed,\n blocked, or counted. For example, suppose\n that\n you add the following to a Rule:

\t\t\n\t\t
    \n
  • \n

    A ByteMatchSet that matches the value BadBot in the User-Agent header

    \n
  • \n
  • \n

    An IPSet that matches the IP address 192.0.2.44\n

    \n
  • \n
\t\t\n\t\t

You then add the Rule to a WebACL and specify that you want to block requests that satisfy the Rule. \n\t\t\tFor a request to be blocked, the User-Agent header in the request must contain the value BadBot \n\t\t\t and the request must originate from the IP address 192.0.2.44.

\t\t\n\t\t

To create and configure a Rule, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in the Rule.

    \n
  2. \n
  3. \n

    Create the Rule. See CreateRule.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateRule request.

    \n
  6. \n
  7. \n

    Submit an UpdateRule request to add predicates to the Rule.

    \n
  8. \n
  9. \n

    Create and update a WebACL that contains the Rule. See CreateWebACL.

    \n
  10. \n
\n\t\t

If you want to replace one ByteMatchSet or IPSet with another, you delete the existing one and \n\t\t\tadd the new one.

\t\t\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes Predicate objects in a Rule. Each\n Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests\n that you want to allow, block, or count. If you add more than one predicate to a\n Rule, a request must match all of the specifications to be allowed,\n blocked, or counted. For example, suppose\n that\n you add the following to a Rule:

\t\t\n\t\t
    \n
  • \n

    A ByteMatchSet that matches the value BadBot in the User-Agent header

    \n
  • \n
  • \n

    An IPSet that matches the IP address 192.0.2.44\n

    \n
  • \n
\t\t\n\t\t

You then add the Rule to a WebACL and specify that you want to block requests that satisfy the Rule. \n\t\t\tFor a request to be blocked, the User-Agent header in the request must contain the value BadBot \n\t\t\t and the request must originate from the IP address 192.0.2.44.

\t\t\n\t\t

To create and configure a Rule, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in the Rule.

    \n
  2. \n
  3. \n

    Create the Rule. See CreateRule.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateRule request.

    \n
  6. \n
  7. \n

    Submit an UpdateRule request to add predicates to the Rule.

    \n
  8. \n
  9. \n

    Create and update a WebACL that contains the Rule. See CreateWebACL.

    \n
  10. \n
\n\t\t

If you want to replace one ByteMatchSet or IPSet with another, you delete the existing one and \n\t\t\tadd the new one.

\t\t\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a rule", + "documentation": "The following example deletes a Predicate object in a rule with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "RuleId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "Predicate": { + "DataId": "MyByteMatchSetID", + "Negated": false, + "Type": "ByteMatch" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#UpdateRuleGroup": { @@ -9727,6 +10890,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateRuleGroupResponse": { @@ -9738,6 +10904,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateRuleGroup request. You can also use this value \n to query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateRuleRequest": { @@ -9764,6 +10933,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateRuleResponse": { @@ -9775,6 +10947,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateRule request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateSizeConstraintSet": { @@ -9815,7 +10990,33 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. For each SizeConstraint object, \n\t\t\tyou specify the following values:

\n\t\t
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change a SizeConstraintSetUpdate object, \n\t\t\t\tyou delete the existing object and add a new one.

    \n
  • \n
  • \n

    The part of a web request that you want AWS WAF to evaluate, such as the length of a query string or the length of the \n\t\t\t\tUser-Agent header.

    \n
  • \n
  • \n

    Whether to perform any transformations on the request, such as converting it to lowercase, before checking its length. \n\t\t\t\tNote that transformations of the request body are not supported because the AWS resource forwards only the first 8192 bytes \n\t\t\t\tof your request to AWS WAF.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
  • \n

    A ComparisonOperator used for evaluating the selected part of the request against the specified Size, such as \n\t\t\t\tequals, greater than, less than, and so on.

    \n
  • \n
  • \n

    The length, in bytes, that you want AWS WAF to watch for in selected part of the request. The length is computed after applying the transformation.

    \n
  • \n
\n\t\t

For example, you can add a SizeConstraintSetUpdate object that matches web requests in which the length of the \n\t\t\tUser-Agent header is greater than 100 bytes. You can then configure AWS WAF to block those requests.

\n\t\t \t

To create and configure a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. For each SizeConstraint object, \n\t\t\tyou specify the following values:

\n\t\t
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change a SizeConstraintSetUpdate object, \n\t\t\t\tyou delete the existing object and add a new one.

    \n
  • \n
  • \n

    The part of a web request that you want AWS WAF to evaluate, such as the length of a query string or the length of the \n\t\t\t\tUser-Agent header.

    \n
  • \n
  • \n

    Whether to perform any transformations on the request, such as converting it to lowercase, before checking its length. \n\t\t\t\tNote that transformations of the request body are not supported because the AWS resource forwards only the first 8192 bytes \n\t\t\t\tof your request to AWS WAF.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
  • \n

    A ComparisonOperator used for evaluating the selected part of the request against the specified Size, such as \n\t\t\t\tequals, greater than, less than, and so on.

    \n
  • \n
  • \n

    The length, in bytes, that you want AWS WAF to watch for in selected part of the request. The length is computed after applying the transformation.

    \n
  • \n
\n\t\t

For example, you can add a SizeConstraintSetUpdate object that matches web requests in which the length of the \n\t\t\tUser-Agent header is greater than 100 bytes. You can then configure AWS WAF to block those requests.

\n\t\t \t

To create and configure a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a size constraint set", + "documentation": "The following example deletes a SizeConstraint object (filters) in a size constraint set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "SizeConstraint": { + "ComparisonOperator": "GT", + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "Size": 0, + "TextTransformation": "NONE" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#UpdateSizeConstraintSetRequest": { @@ -9842,6 +11043,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateSizeConstraintSetResponse": { @@ -9853,6 +11057,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateSizeConstraintSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateSqlInjectionMatchSet": { @@ -9890,7 +11097,31 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. \n\t\t\tFor each SqlInjectionMatchTuple object, you specify the following values:

\n\t\t
    \n
  • \n

    \n Action: Whether to insert the object into or delete the object from the array. To change a \n\t\t\t\tSqlInjectionMatchTuple, you delete the existing object and add a new one.

    \n
  • \n
  • \n

    \n FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, \n\t\t\t\tthe name of the header or parameter.

    \n
  • \n
  • \n

    \n TextTransformation: Which text transformation, if any, to perform on the web request before \n\t\t\t\tinspecting the request for snippets of malicious SQL code.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
\n\t\t

You use SqlInjectionMatchSet objects to specify which CloudFront\n requests that\n you want to allow, block, or count. For example, if you're receiving\n requests that contain snippets of SQL code in the query string and you want to block the\n requests, you can create a SqlInjectionMatchSet with the applicable settings,\n and then configure AWS WAF to block the requests.

\n\t\t

To create and configure a SqlInjectionMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Submit a CreateSqlInjectionMatchSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests that you want AWS WAF to \n\t\t\t\tinspect for snippets of SQL code.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. \n\t\t\tFor each SqlInjectionMatchTuple object, you specify the following values:

\n\t\t
    \n
  • \n

    \n Action: Whether to insert the object into or delete the object from the array. To change a \n\t\t\t\tSqlInjectionMatchTuple, you delete the existing object and add a new one.

    \n
  • \n
  • \n

    \n FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, \n\t\t\t\tthe name of the header or parameter.

    \n
  • \n
  • \n

    \n TextTransformation: Which text transformation, if any, to perform on the web request before \n\t\t\t\tinspecting the request for snippets of malicious SQL code.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
\n\t\t

You use SqlInjectionMatchSet objects to specify which CloudFront\n requests that\n you want to allow, block, or count. For example, if you're receiving\n requests that contain snippets of SQL code in the query string and you want to block the\n requests, you can create a SqlInjectionMatchSet with the applicable settings,\n and then configure AWS WAF to block the requests.

\n\t\t

To create and configure a SqlInjectionMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Submit a CreateSqlInjectionMatchSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests that you want AWS WAF to \n\t\t\t\tinspect for snippets of SQL code.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a SQL injection match set", + "documentation": "The following example deletes a SqlInjectionMatchTuple object (filters) in a SQL injection match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "SqlInjectionMatchTuple": { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#UpdateSqlInjectionMatchSetRequest": { @@ -9919,7 +11150,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to update a SqlInjectionMatchSet.

" + "smithy.api#documentation": "

A request to update a SqlInjectionMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateSqlInjectionMatchSetResponse": { @@ -9933,7 +11165,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to an UpdateSqlInjectionMatchSets request.

" + "smithy.api#documentation": "

The response to an UpdateSqlInjectionMatchSets request.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateWebACL": { @@ -9977,7 +11210,35 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies \n\t\t\tweb requests that you want to allow, block, or count. When you update a WebACL, you specify the following values:

\n\t\t
    \n
  • \n

    A default action for the WebACL, either ALLOW or BLOCK. \n\t\t\t\tAWS WAF performs the default action if a request doesn't match the criteria in any of the Rules in a WebACL.

    \n
  • \n
  • \n

    The Rules that you want to add\n or\n delete. If you want to replace one Rule with another, you delete the\n existing Rule and add the new one.

    \n
  • \n
  • \n

    For each Rule, whether you want AWS WAF to allow requests, block requests, or count requests that match \n\t\t\t\tthe conditions in the Rule.

    \n
  • \n
  • \n

    The order in which you want AWS WAF to evaluate the Rules in a\n WebACL. If you add more than one Rule to a\n WebACL, AWS WAF evaluates each request against the Rules\n in order based on the value of Priority. (The Rule that has\n the lowest value for Priority is evaluated first.) When a web request\n matches all\n the\n predicates (such as ByteMatchSets and IPSets) in a\n Rule, AWS WAF immediately takes the corresponding action, allow or\n block, and doesn't evaluate the request against the remaining Rules in\n the WebACL, if any.

    \n
  • \n
\n\t\t\n\t\t

To create and configure a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in Rules. \n\t\t\t\tFor more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, \n\t\t\t\tCreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Create and update the Rules that you want to include in the WebACL. For more information, see \n\t\t\t\tCreateRule and UpdateRule.

    \n
  4. \n
  5. \n

    Create a WebACL. See CreateWebACL.

    \n
  6. \n
  7. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateWebACL request.

    \n
  8. \n
  9. \n

    Submit an UpdateWebACL request to specify the Rules\n that you want to include in the WebACL, to specify the default action,\n and to associate the WebACL with a CloudFront distribution.

    \n

    The ActivatedRule can be a rule group. If you specify a rule group\n as your\n ActivatedRule\n ,\n you can exclude specific rules from that rule group.

    \n

    If you already have a rule group associated with a web ACL and want to submit\n an UpdateWebACL request to exclude certain rules from that rule group,\n you must first remove the rule group from the web ACL, the re-insert it again,\n specifying the excluded rules.\n For details,\n see\n ActivatedRule$ExcludedRules\n .\n

    \n
  10. \n
\n

Be aware that if you try to add a RATE_BASED rule to a web ACL without setting the rule type when first creating the rule, the UpdateWebACL request will fail because the request tries to add a REGULAR rule (the default rule type) with the specified ID, which does not exist. \t\t

\t\t\t\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies \n\t\t\tweb requests that you want to allow, block, or count. When you update a WebACL, you specify the following values:

\n\t\t
    \n
  • \n

    A default action for the WebACL, either ALLOW or BLOCK. \n\t\t\t\tAWS WAF performs the default action if a request doesn't match the criteria in any of the Rules in a WebACL.

    \n
  • \n
  • \n

    The Rules that you want to add\n or\n delete. If you want to replace one Rule with another, you delete the\n existing Rule and add the new one.

    \n
  • \n
  • \n

    For each Rule, whether you want AWS WAF to allow requests, block requests, or count requests that match \n\t\t\t\tthe conditions in the Rule.

    \n
  • \n
  • \n

    The order in which you want AWS WAF to evaluate the Rules in a\n WebACL. If you add more than one Rule to a\n WebACL, AWS WAF evaluates each request against the Rules\n in order based on the value of Priority. (The Rule that has\n the lowest value for Priority is evaluated first.) When a web request\n matches all\n the\n predicates (such as ByteMatchSets and IPSets) in a\n Rule, AWS WAF immediately takes the corresponding action, allow or\n block, and doesn't evaluate the request against the remaining Rules in\n the WebACL, if any.

    \n
  • \n
\n\t\t\n\t\t

To create and configure a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in Rules. \n\t\t\t\tFor more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, \n\t\t\t\tCreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Create and update the Rules that you want to include in the WebACL. For more information, see \n\t\t\t\tCreateRule and UpdateRule.

    \n
  4. \n
  5. \n

    Create a WebACL. See CreateWebACL.

    \n
  6. \n
  7. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateWebACL request.

    \n
  8. \n
  9. \n

    Submit an UpdateWebACL request to specify the Rules\n that you want to include in the WebACL, to specify the default action,\n and to associate the WebACL with a CloudFront distribution.

    \n

    The ActivatedRule can be a rule group. If you specify a rule group\n as your\n ActivatedRule\n ,\n you can exclude specific rules from that rule group.

    \n

    If you already have a rule group associated with a web ACL and want to submit\n an UpdateWebACL request to exclude certain rules from that rule group,\n you must first remove the rule group from the web ACL, the re-insert it again,\n specifying the excluded rules.\n For details,\n see\n ActivatedRule$ExcludedRules\n .\n

    \n
  10. \n
\n

Be aware that if you try to add a RATE_BASED rule to a web ACL without setting the rule type when first creating the rule, the UpdateWebACL request will fail because the request tries to add a REGULAR rule (the default rule type) with the specified ID, which does not exist. \t\t

\t\t\t\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a Web ACL", + "documentation": "The following example deletes an ActivatedRule object in a WebACL with the ID webacl-1472061481310.", + "input": { + "WebACLId": "webacl-1472061481310", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "ActivatedRule": { + "Action": { + "Type": "ALLOW" + }, + "Priority": 1, + "RuleId": "WAFRule-1-Example" + } + } + ], + "DefaultAction": { + "Type": "ALLOW" + } + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#UpdateWebACLRequest": { @@ -10009,6 +11270,9 @@ "smithy.api#documentation": "

A default action for the web ACL, either ALLOW or BLOCK. AWS WAF performs the default\n action if a request doesn't match the criteria in any of the rules in a web ACL.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateWebACLResponse": { @@ -10020,6 +11284,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateWebACL request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.wafregional#UpdateXssMatchSet": { @@ -10057,7 +11324,31 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. \n\t\t\tFor each XssMatchTuple object, you specify the following values:

\n\t\t
    \n
  • \n

    \n Action: Whether to insert the object into or delete the object from the\n array. To change an\n XssMatchTuple, you delete the existing object and add a new\n one.

    \n
  • \n
  • \n

    \n FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, \n\t\t\t\tthe name of the header or parameter.

    \n
  • \n
  • \n

    \n TextTransformation: Which text transformation, if any, to perform on the web request before \n\t\t\t\tinspecting the request for cross-site scripting attacks.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
\n\t\t

You use XssMatchSet objects to specify which CloudFront requests\n that\n you want to allow, block, or count. For example, if you're receiving\n requests that contain cross-site scripting attacks in the request body and you want to\n block the requests, you can create an XssMatchSet with the applicable\n settings, and then configure AWS WAF to block the requests.

\t\t\n\t\t

To create and configure an XssMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Submit a CreateXssMatchSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateXssMatchSet request to specify the parts of web requests that you want AWS WAF to \n\t\t\t\tinspect for cross-site scripting attacks.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. \n\t\t\tFor each XssMatchTuple object, you specify the following values:

\n\t\t
    \n
  • \n

    \n Action: Whether to insert the object into or delete the object from the\n array. To change an\n XssMatchTuple, you delete the existing object and add a new\n one.

    \n
  • \n
  • \n

    \n FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, \n\t\t\t\tthe name of the header or parameter.

    \n
  • \n
  • \n

    \n TextTransformation: Which text transformation, if any, to perform on the web request before \n\t\t\t\tinspecting the request for cross-site scripting attacks.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
\n\t\t

You use XssMatchSet objects to specify which CloudFront requests\n that\n you want to allow, block, or count. For example, if you're receiving\n requests that contain cross-site scripting attacks in the request body and you want to\n block the requests, you can create an XssMatchSet with the applicable\n settings, and then configure AWS WAF to block the requests.

\t\t\n\t\t

To create and configure an XssMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Submit a CreateXssMatchSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateXssMatchSet request to specify the parts of web requests that you want AWS WAF to \n\t\t\t\tinspect for cross-site scripting attacks.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update an XSS match set", + "documentation": "The following example deletes an XssMatchTuple object (filters) in an XssMatchSet with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "XssMatchTuple": { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.wafregional#UpdateXssMatchSetRequest": { @@ -10086,7 +11377,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to update an XssMatchSet.

" + "smithy.api#documentation": "

A request to update an XssMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.wafregional#UpdateXssMatchSetResponse": { @@ -10100,7 +11392,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to an UpdateXssMatchSets request.

" + "smithy.api#documentation": "

The response to an UpdateXssMatchSets request.

", + "smithy.api#output": {} } }, "com.amazonaws.wafregional#WAFBadRequestException": { @@ -10367,22 +11660,26 @@ } }, "com.amazonaws.wafregional#WafActionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BLOCK", - "name": "BLOCK" - }, - { - "value": "ALLOW", - "name": "ALLOW" - }, - { - "value": "COUNT", - "name": "COUNT" + "type": "enum", + "members": { + "BLOCK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BLOCK" } - ] + }, + "ALLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALLOW" + } + }, + "COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COUNT" + } + } } }, "com.amazonaws.wafregional#WafOverrideAction": { @@ -10401,37 +11698,43 @@ } }, "com.amazonaws.wafregional#WafOverrideActionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "COUNT", - "name": "COUNT" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" } - ] + }, + "COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COUNT" + } + } } }, "com.amazonaws.wafregional#WafRuleType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "REGULAR", - "name": "REGULAR" - }, - { - "value": "RATE_BASED", - "name": "RATE_BASED" - }, - { - "value": "GROUP", - "name": "GROUP" + "type": "enum", + "members": { + "REGULAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REGULAR" } - ] + }, + "RATE_BASED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RATE_BASED" + } + }, + "GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GROUP" + } + } } }, "com.amazonaws.wafregional#WebACL": { diff --git a/codegen/sdk-codegen/aws-models/waf.json b/codegen/sdk-codegen/aws-models/waf.json index c988f927bec..90819c4361d 100644 --- a/codegen/sdk-codegen/aws-models/waf.json +++ b/codegen/sdk-codegen/aws-models/waf.json @@ -342,52 +342,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -395,238 +399,168 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "stringEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + false + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] } ], - "type": "tree", - "rules": [ + "endpoint": { + "url": "https://waf.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "waf", + "signingRegion": "us-east-1" + } + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ { - "conditions": [ + "fn": "stringEquals", + "argv": [ { - "fn": "stringEquals", + "fn": "getAttr", "argv": [ { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] + "ref": "PartitionResult" }, - "aws" + "name" ] + }, + "aws" + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + false + ] + } + ], + "endpoint": { + "url": "https://waf-fips.amazonaws.com", + "properties": { + "authSchemes": [ + { + "name": "sigv4", + "signingName": "waf", + "signingRegion": "us-east-1" } - ], - "type": "tree", - "rules": [ + ] + }, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://waf-fips.{Region}.api.aws", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ] + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ { - "ref": "UseFIPS" + "ref": "PartitionResult" }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://waf-fips.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "waf", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - } + "supportsFIPS" ] - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" } ] }, { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ { - "ref": "UseDualStack" + "ref": "PartitionResult" }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://waf.{Region}.api.aws", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "supportsDualStack" ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], "endpoint": { - "url": "https://waf.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "waf", - "signingRegion": "us-east-1" - } - ] - }, + "url": "https://waf-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, "headers": {} }, "type": "endpoint" @@ -634,282 +568,133 @@ ] }, { - "conditions": [ + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] + "ref": "UseFIPS" }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://waf-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://waf-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://waf-fips.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "waf", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://waf-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ] - } - ] + "ref": "UseDualStack" }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } + true ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://waf.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "ref": "Region" - }, - "aws-global" - ] - } - ], - "endpoint": { - "url": "https://waf.amazonaws.com", - "properties": { - "authSchemes": [ - { - "name": "sigv4", - "signingName": "waf", - "signingRegion": "us-east-1" - } - ] - }, - "headers": {} - }, - "type": "endpoint" - }, { "conditions": [], "endpoint": { - "url": "https://waf.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://waf.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://waf.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -933,8 +718,8 @@ }, "params": { "Region": "aws-global", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -955,8 +740,8 @@ }, "params": { "Region": "aws-global", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -968,8 +753,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -990,8 +775,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1003,8 +788,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1025,8 +810,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1038,8 +823,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1051,8 +836,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1064,8 +849,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1077,8 +862,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1090,8 +875,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1103,8 +888,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1116,8 +901,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1129,8 +914,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1142,8 +938,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1155,8 +962,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -1168,8 +986,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -1181,8 +1010,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1194,8 +1023,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1207,8 +1036,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1219,8 +1048,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1231,10 +1060,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1431,18 +1266,20 @@ } }, "com.amazonaws.waf#ChangeAction": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INSERT", - "name": "INSERT" - }, - { - "value": "DELETE", - "name": "DELETE" + "type": "enum", + "members": { + "INSERT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INSERT" } - ] + }, + "DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETE" + } + } } }, "com.amazonaws.waf#ChangeToken": { @@ -1452,57 +1289,71 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#ChangeTokenStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PROVISIONED", - "name": "PROVISIONED" - }, - { - "value": "PENDING", - "name": "PENDING" - }, - { - "value": "INSYNC", - "name": "INSYNC" + "type": "enum", + "members": { + "PROVISIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROVISIONED" } - ] + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "INSYNC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INSYNC" + } + } } }, "com.amazonaws.waf#ComparisonOperator": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EQ", - "name": "EQ" - }, - { - "value": "NE", - "name": "NE" - }, - { - "value": "LE", - "name": "LE" - }, - { - "value": "LT", - "name": "LT" - }, - { - "value": "GE", - "name": "GE" - }, - { - "value": "GT", - "name": "GT" + "type": "enum", + "members": { + "EQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EQ" } - ] + }, + "NE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NE" + } + }, + "LE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LE" + } + }, + "LT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LT" + } + }, + "GE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GE" + } + }, + "GT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GT" + } + } } }, "com.amazonaws.waf#Country": { @@ -1557,6 +1408,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateByteMatchSetResponse": { @@ -1574,6 +1428,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateByteMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateGeoMatchSet": { @@ -1625,6 +1482,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateGeoMatchSetResponse": { @@ -1642,6 +1502,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateGeoMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateIPSet": { @@ -1673,7 +1536,30 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates an IPSet, which you use to specify which web requests\n that\n you want to allow or block based on the IP addresses that the requests\n originate from. For example, if you're receiving a lot of requests from one or more\n individual IP addresses or one or more ranges of IP addresses and you want to block the\n requests, you can create an IPSet that contains those IP addresses and then\n configure AWS WAF to block the requests.

\n\t\t

To create and configure an IPSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateIPSet request.

    \n
  2. \n
  3. \n

    Submit a CreateIPSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateIPSet request to specify the IP addresses that you want AWS WAF to watch for.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates an IPSet, which you use to specify which web requests\n that\n you want to allow or block based on the IP addresses that the requests\n originate from. For example, if you're receiving a lot of requests from one or more\n individual IP addresses or one or more ranges of IP addresses and you want to block the\n requests, you can create an IPSet that contains those IP addresses and then\n configure AWS WAF to block the requests.

\n\t\t

To create and configure an IPSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateIPSet request.

    \n
  2. \n
  3. \n

    Submit a CreateIPSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateIPSet request to specify the IP addresses that you want AWS WAF to watch for.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create an IP set", + "documentation": "The following example creates an IP match set named MyIPSetFriendlyName.", + "input": { + "Name": "MyIPSetFriendlyName", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "IPSet": { + "IPSetDescriptors": [ + { + "Type": "IPV4", + "Value": "192.0.2.44/32" + } + ], + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "Name": "MyIPSetFriendlyName" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#CreateIPSetRequest": { @@ -1693,6 +1579,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateIPSetResponse": { @@ -1710,6 +1599,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateIPSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateRateBasedRule": { @@ -1795,6 +1687,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateRateBasedRuleResponse": { @@ -1812,6 +1707,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the\n CreateRateBasedRule request. You can also use this value to query the\n status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateRegexMatchSet": { @@ -1857,7 +1755,10 @@ "smithy.api#required": {} } } - } + }, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.waf#CreateRegexMatchSetResponse": { "type": "structure", @@ -1874,6 +1775,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateRegexMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateRegexPatternSet": { @@ -1919,6 +1823,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateRegexPatternSetResponse": { @@ -1936,6 +1843,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateRegexPatternSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateRule": { @@ -1973,7 +1883,33 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a Rule, which contains the IPSet objects,\n ByteMatchSet objects, and other predicates that identify the requests that\n you want to block. If you add more than one predicate to a Rule, a request\n must match all of the specifications to be allowed or blocked. For example, suppose\n that\n you add the following to a Rule:

\n\t\t
    \n
  • \n

    An IPSet that matches the IP address 192.0.2.44/32\n

    \n
  • \n
  • \n

    A ByteMatchSet that matches BadBot in the User-Agent header

    \n
  • \n
\n\t\t

You then add the Rule to a WebACL and specify that you want to blocks requests that satisfy the Rule. \n\t\t\tFor a request to be blocked, it must come from the IP address 192.0.2.44 and the User-Agent header in the request \n\t\t\tmust contain the value BadBot.

\n\t\t

To create and configure a Rule, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in the Rule. For more information, see \n\t\t\t\tCreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateRule request.

    \n
  4. \n
  5. \n

    Submit a CreateRule request.

    \n
  6. \n
  7. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateRule request.

    \n
  8. \n
  9. \n

    Submit an UpdateRule request to specify the predicates that you want to include in the Rule.

    \n
  10. \n
  11. \n

    Create and update a WebACL that contains the Rule. For more information, see CreateWebACL.

    \n
  12. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a Rule, which contains the IPSet objects,\n ByteMatchSet objects, and other predicates that identify the requests that\n you want to block. If you add more than one predicate to a Rule, a request\n must match all of the specifications to be allowed or blocked. For example, suppose\n that\n you add the following to a Rule:

\n\t\t
    \n
  • \n

    An IPSet that matches the IP address 192.0.2.44/32\n

    \n
  • \n
  • \n

    A ByteMatchSet that matches BadBot in the User-Agent header

    \n
  • \n
\n\t\t

You then add the Rule to a WebACL and specify that you want to blocks requests that satisfy the Rule. \n\t\t\tFor a request to be blocked, it must come from the IP address 192.0.2.44 and the User-Agent header in the request \n\t\t\tmust contain the value BadBot.

\n\t\t

To create and configure a Rule, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in the Rule. For more information, see \n\t\t\t\tCreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateRule request.

    \n
  4. \n
  5. \n

    Submit a CreateRule request.

    \n
  6. \n
  7. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateRule request.

    \n
  8. \n
  9. \n

    Submit an UpdateRule request to specify the predicates that you want to include in the Rule.

    \n
  10. \n
  11. \n

    Create and update a WebACL that contains the Rule. For more information, see CreateWebACL.

    \n
  12. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create a rule", + "documentation": "The following example creates a rule named WAFByteHeaderRule.", + "input": { + "Name": "WAFByteHeaderRule", + "MetricName": "WAFByteHeaderRule", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "Rule": { + "MetricName": "WAFByteHeaderRule", + "Name": "WAFByteHeaderRule", + "Predicates": [ + { + "DataId": "MyByteMatchSetID", + "Negated": false, + "Type": "ByteMatch" + } + ], + "RuleId": "WAFRule-1-Example" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#CreateRuleGroup": { @@ -2041,6 +1977,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateRuleGroupResponse": { @@ -2058,6 +1997,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateRuleGroup request. You can also use this value \n to query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateRuleRequest": { @@ -2090,6 +2032,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateRuleResponse": { @@ -2107,6 +2052,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateRule request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateSizeConstraintSet": { @@ -2138,7 +2086,34 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify the part of a \n\t\t\tweb request that you want AWS WAF to check for length, such as the length of the User-Agent header or the length of the query string. \n\t\t\tFor example, you can create a SizeConstraintSet that matches any requests that have a query string that is longer than 100 bytes. \n\t\t\tYou can then configure AWS WAF to reject those requests.

\n\t\t

To create and configure a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateSizeConstraintSet request.

    \n
  2. \n
  3. \n

    Submit a CreateSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSizeConstraintSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify the part of a \n\t\t\tweb request that you want AWS WAF to check for length, such as the length of the User-Agent header or the length of the query string. \n\t\t\tFor example, you can create a SizeConstraintSet that matches any requests that have a query string that is longer than 100 bytes. \n\t\t\tYou can then configure AWS WAF to reject those requests.

\n\t\t

To create and configure a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateSizeConstraintSet request.

    \n
  2. \n
  3. \n

    Submit a CreateSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSizeConstraintSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create a size constraint", + "documentation": "The following example creates size constraint set named MySampleSizeConstraintSet.", + "input": { + "Name": "MySampleSizeConstraintSet", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "SizeConstraintSet": { + "Name": "MySampleSizeConstraintSet", + "SizeConstraints": [ + { + "ComparisonOperator": "GT", + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "Size": 0, + "TextTransformation": "NONE" + } + ], + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#CreateSizeConstraintSetRequest": { @@ -2158,6 +2133,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateSizeConstraintSetResponse": { @@ -2175,6 +2153,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateSizeConstraintSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateSqlInjectionMatchSet": { @@ -2206,7 +2187,32 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests that contain snippets of SQL code in a \n\t\t\tspecified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

\n\t\t

To create and configure a SqlInjectionMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateSqlInjectionMatchSet request.

    \n
  2. \n
  3. \n

    Submit a CreateSqlInjectionMatchSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSqlInjectionMatchSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests in which you want to \n\t\t\t\tallow, block, or count malicious SQL code.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests that contain snippets of SQL code in a \n\t\t\tspecified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

\n\t\t

To create and configure a SqlInjectionMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateSqlInjectionMatchSet request.

    \n
  2. \n
  3. \n

    Submit a CreateSqlInjectionMatchSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSqlInjectionMatchSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests in which you want to \n\t\t\t\tallow, block, or count malicious SQL code.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create a SQL injection match set", + "documentation": "The following example creates a SQL injection match set named MySQLInjectionMatchSet.", + "input": { + "Name": "MySQLInjectionMatchSet", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "SqlInjectionMatchSet": { + "Name": "MySQLInjectionMatchSet", + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "SqlInjectionMatchTuples": [ + { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + ] + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#CreateSqlInjectionMatchSetRequest": { @@ -2228,7 +2234,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to create a SqlInjectionMatchSet.

" + "smithy.api#documentation": "

A request to create a SqlInjectionMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateSqlInjectionMatchSetResponse": { @@ -2248,7 +2255,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a CreateSqlInjectionMatchSet request.

" + "smithy.api#documentation": "

The response to a CreateSqlInjectionMatchSet request.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateWebACL": { @@ -2289,7 +2297,41 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a WebACL, which contains the Rules that identify the CloudFront web requests that you want to allow, block, or count. \n\t\t\tAWS WAF evaluates Rules in order based on the value of Priority for each Rule.

\t\t\t\n\t\t

You also specify a default action, either ALLOW or BLOCK. If a web request doesn't match \n\t\t\tany of the Rules in a WebACL, AWS WAF responds to the request with the default action.

\t\t\t\n\t\t

To create and configure a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the ByteMatchSet objects and other predicates that you want to include in Rules. \n\t\t\t\tFor more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, \n\t\t\t\tCreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Create and update the Rules that you want to include in the WebACL. For more information, see \n\t\t\t\tCreateRule and UpdateRule.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateWebACL request.

    \n
  6. \n
  7. \n

    Submit a CreateWebACL request.

    \n
  8. \n
  9. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateWebACL request.

    \n
  10. \n
  11. \n

    Submit an UpdateWebACL request to specify the Rules that you want to include in the WebACL, \n\t\t\t\tto specify the default action, and to associate the WebACL with a CloudFront distribution.

    \n
  12. \n
\n\t\t

For more information about how to use the AWS WAF API, see the AWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates a WebACL, which contains the Rules that identify the CloudFront web requests that you want to allow, block, or count. \n\t\t\tAWS WAF evaluates Rules in order based on the value of Priority for each Rule.

\t\t\t\n\t\t

You also specify a default action, either ALLOW or BLOCK. If a web request doesn't match \n\t\t\tany of the Rules in a WebACL, AWS WAF responds to the request with the default action.

\t\t\t\n\t\t

To create and configure a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the ByteMatchSet objects and other predicates that you want to include in Rules. \n\t\t\t\tFor more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, \n\t\t\t\tCreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Create and update the Rules that you want to include in the WebACL. For more information, see \n\t\t\t\tCreateRule and UpdateRule.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateWebACL request.

    \n
  6. \n
  7. \n

    Submit a CreateWebACL request.

    \n
  8. \n
  9. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateWebACL request.

    \n
  10. \n
  11. \n

    Submit an UpdateWebACL request to specify the Rules that you want to include in the WebACL, \n\t\t\t\tto specify the default action, and to associate the WebACL with a CloudFront distribution.

    \n
  12. \n
\n\t\t

For more information about how to use the AWS WAF API, see the AWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create a web ACL", + "documentation": "The following example creates a web ACL named CreateExample.", + "input": { + "Name": "CreateExample", + "MetricName": "CreateExample", + "DefaultAction": { + "Type": "ALLOW" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "WebACL": { + "DefaultAction": { + "Type": "ALLOW" + }, + "MetricName": "CreateExample", + "Name": "CreateExample", + "Rules": [ + { + "Action": { + "Type": "ALLOW" + }, + "Priority": 1, + "RuleId": "WAFRule-1-Example" + } + ], + "WebACLId": "example-46da-4444-5555-example" + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#CreateWebACLMigrationStack": { @@ -2345,6 +2387,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateWebACLMigrationStackResponse": { @@ -2357,6 +2402,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateWebACLRequest": { @@ -2396,6 +2444,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateWebACLResponse": { @@ -2413,6 +2464,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the CreateWebACL request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#CreateXssMatchSet": { @@ -2444,7 +2498,32 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates an XssMatchSet, which you use to allow, block, or count requests that contain cross-site scripting attacks\n\t\t\tin the specified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

\n\t\t

To create and configure an XssMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateXssMatchSet request.

    \n
  2. \n
  3. \n

    Submit a CreateXssMatchSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateXssMatchSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateXssMatchSet request to specify the parts of web requests in which you want to \n\t\t\t\tallow, block, or count cross-site scripting attacks.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Creates an XssMatchSet, which you use to allow, block, or count requests that contain cross-site scripting attacks\n\t\t\tin the specified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

\n\t\t

To create and configure an XssMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tCreateXssMatchSet request.

    \n
  2. \n
  3. \n

    Submit a CreateXssMatchSet request.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateXssMatchSet request.

    \n
  6. \n
  7. \n

    Submit an UpdateXssMatchSet request to specify the parts of web requests in which you want to \n\t\t\t\tallow, block, or count cross-site scripting attacks.

    \n
  8. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To create an XSS match set", + "documentation": "The following example creates an XSS match set named MySampleXssMatchSet.", + "input": { + "Name": "MySampleXssMatchSet", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "XssMatchSet": { + "Name": "MySampleXssMatchSet", + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "XssMatchTuples": [ + { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + ] + }, + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#CreateXssMatchSetRequest": { @@ -2466,7 +2545,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to create an XssMatchSet.

" + "smithy.api#documentation": "

A request to create an XssMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#CreateXssMatchSetResponse": { @@ -2486,7 +2566,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a CreateXssMatchSet request.

" + "smithy.api#documentation": "

The response to a CreateXssMatchSet request.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteByteMatchSet": { @@ -2518,7 +2599,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's still used in any Rules \n\t\t\tor if it still includes any ByteMatchTuple objects (any filters).

\t\t\n\t\t

If you just want to remove a ByteMatchSet from a Rule, use UpdateRule.

\t\t\n\t\t

To permanently delete a ByteMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the ByteMatchSet to remove filters, if any. For more information, see UpdateByteMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteByteMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteByteMatchSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's still used in any Rules \n\t\t\tor if it still includes any ByteMatchTuple objects (any filters).

\t\t\n\t\t

If you just want to remove a ByteMatchSet from a Rule, use UpdateRule.

\t\t\n\t\t

To permanently delete a ByteMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the ByteMatchSet to remove filters, if any. For more information, see UpdateByteMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteByteMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteByteMatchSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a byte match set", + "documentation": "The following example deletes a byte match set with the ID exampleIDs3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "ByteMatchSetId": "exampleIDs3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#DeleteByteMatchSetRequest": { @@ -2538,6 +2632,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteByteMatchSetResponse": { @@ -2549,6 +2646,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteByteMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteGeoMatchSet": { @@ -2600,6 +2700,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteGeoMatchSetResponse": { @@ -2611,6 +2714,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteGeoMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteIPSet": { @@ -2642,7 +2748,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes an IPSet. You can't delete an IPSet if it's still used in any Rules or \n\t\t\tif it still includes any IP addresses.

\n\t\t

If you just want to remove an IPSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete an IPSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the IPSet to remove IP address ranges, if any. For more information, see UpdateIPSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteIPSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteIPSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes an IPSet. You can't delete an IPSet if it's still used in any Rules or \n\t\t\tif it still includes any IP addresses.

\n\t\t

If you just want to remove an IPSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete an IPSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the IPSet to remove IP address ranges, if any. For more information, see UpdateIPSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteIPSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteIPSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete an IP set", + "documentation": "The following example deletes an IP match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#DeleteIPSetRequest": { @@ -2662,6 +2781,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteIPSetResponse": { @@ -2673,6 +2795,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteIPSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteLoggingConfiguration": { @@ -2708,11 +2833,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteLoggingConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.waf#DeletePermissionPolicy": { "type": "operation", @@ -2747,11 +2878,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeletePermissionPolicyResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.waf#DeleteRateBasedRule": { "type": "operation", @@ -2808,6 +2945,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteRateBasedRuleResponse": { @@ -2819,6 +2959,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the\n DeleteRateBasedRule request. You can also use this value to query the\n status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteRegexMatchSet": { @@ -2870,6 +3013,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteRegexMatchSetResponse": { @@ -2881,6 +3027,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteRegexMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteRegexPatternSet": { @@ -2932,6 +3081,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteRegexPatternSetResponse": { @@ -2943,6 +3095,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteRegexPatternSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteRule": { @@ -2980,7 +3135,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a Rule. You can't delete a Rule if it's still used in any WebACL \n\t\t\tobjects or if it still includes any predicates, such as ByteMatchSet objects.

\n\t\t

If you just want to remove a Rule from a WebACL, use UpdateWebACL.

\n\t\t

To permanently delete a Rule from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the Rule to remove predicates, if any. For more information, see UpdateRule.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteRule request.

    \n
  4. \n
  5. \n

    Submit a DeleteRule request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a Rule. You can't delete a Rule if it's still used in any WebACL \n\t\t\tobjects or if it still includes any predicates, such as ByteMatchSet objects.

\n\t\t

If you just want to remove a Rule from a WebACL, use UpdateWebACL.

\n\t\t

To permanently delete a Rule from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the Rule to remove predicates, if any. For more information, see UpdateRule.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteRule request.

    \n
  4. \n
  5. \n

    Submit a DeleteRule request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a rule", + "documentation": "The following example deletes a rule with the ID WAFRule-1-Example.", + "input": { + "RuleId": "WAFRule-1-Example", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#DeleteRuleGroup": { @@ -3038,6 +3206,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteRuleGroupResponse": { @@ -3049,6 +3220,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteRuleGroup request. You can also use this value \n to query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteRuleRequest": { @@ -3068,6 +3242,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteRuleResponse": { @@ -3079,6 +3256,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteRule request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteSizeConstraintSet": { @@ -3110,7 +3290,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet if it's still used in any Rules \n\t\t\tor if it still includes any SizeConstraint objects (any filters).

\t\t\n\t\t

If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule.

\t\t\n\t\t

To permanently delete a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the SizeConstraintSet to remove filters, if any. For more information, see UpdateSizeConstraintSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteSizeConstraintSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet if it's still used in any Rules \n\t\t\tor if it still includes any SizeConstraint objects (any filters).

\t\t\n\t\t

If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule.

\t\t\n\t\t

To permanently delete a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the SizeConstraintSet to remove filters, if any. For more information, see UpdateSizeConstraintSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteSizeConstraintSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a size constraint set", + "documentation": "The following example deletes a size constraint set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#DeleteSizeConstraintSetRequest": { @@ -3130,6 +3323,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteSizeConstraintSetResponse": { @@ -3141,6 +3337,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteSizeConstraintSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteSqlInjectionMatchSet": { @@ -3172,7 +3371,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet if it's \n\t\t\tstill used in any Rules or if it still contains any SqlInjectionMatchTuple objects.

\n\t\t

If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the SqlInjectionMatchSet to remove filters, if any. For more information, see \n\t\t\t\tUpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteSqlInjectionMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteSqlInjectionMatchSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet if it's \n\t\t\tstill used in any Rules or if it still contains any SqlInjectionMatchTuple objects.

\n\t\t

If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the SqlInjectionMatchSet to remove filters, if any. For more information, see \n\t\t\t\tUpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteSqlInjectionMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteSqlInjectionMatchSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a SQL injection match set", + "documentation": "The following example deletes a SQL injection match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#DeleteSqlInjectionMatchSetRequest": { @@ -3194,7 +3406,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to delete a SqlInjectionMatchSet from AWS WAF.

" + "smithy.api#documentation": "

A request to delete a SqlInjectionMatchSet from AWS WAF.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteSqlInjectionMatchSetResponse": { @@ -3208,7 +3421,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a request to delete a SqlInjectionMatchSet from AWS WAF.

" + "smithy.api#documentation": "

The response to a request to delete a SqlInjectionMatchSet from AWS WAF.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteWebACL": { @@ -3246,7 +3460,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a WebACL. You can't delete a WebACL if it still contains any Rules.

\n\t\t

To delete a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteWebACL request.

    \n
  4. \n
  5. \n

    Submit a DeleteWebACL request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes a WebACL. You can't delete a WebACL if it still contains any Rules.

\n\t\t

To delete a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteWebACL request.

    \n
  4. \n
  5. \n

    Submit a DeleteWebACL request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete a web ACL", + "documentation": "The following example deletes a web ACL with the ID example-46da-4444-5555-example.", + "input": { + "WebACLId": "example-46da-4444-5555-example", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#DeleteWebACLRequest": { @@ -3266,6 +3493,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteWebACLResponse": { @@ -3277,6 +3507,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the DeleteWebACL request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#DeleteXssMatchSet": { @@ -3308,7 +3541,20 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's \n\t\t\tstill used in any Rules or if it still contains any XssMatchTuple objects.

\n\t\t

If you just want to remove an XssMatchSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete an XssMatchSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the XssMatchSet to remove filters, if any. For more information, see \n\t\t\t\tUpdateXssMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteXssMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteXssMatchSet request.

    \n
  6. \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's \n\t\t\tstill used in any Rules or if it still contains any XssMatchTuple objects.

\n\t\t

If you just want to remove an XssMatchSet from a Rule, use UpdateRule.

\n\t\t

To permanently delete an XssMatchSet from AWS WAF, perform the following steps:

\n\t\t
    \n
  1. \n

    Update the XssMatchSet to remove filters, if any. For more information, see \n\t\t\t\tUpdateXssMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a \n\t\t\t\tDeleteXssMatchSet request.

    \n
  4. \n
  5. \n

    Submit a DeleteXssMatchSet request.

    \n
  6. \n
", + "smithy.api#examples": [ + { + "title": "To delete an XSS match set", + "documentation": "The following example deletes an XSS match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#DeleteXssMatchSetRequest": { @@ -3330,7 +3576,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to delete an XssMatchSet from AWS WAF.

" + "smithy.api#documentation": "

A request to delete an XssMatchSet from AWS WAF.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#DeleteXssMatchSetResponse": { @@ -3344,7 +3591,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a request to delete an XssMatchSet from AWS WAF.

" + "smithy.api#documentation": "

The response to a request to delete an XssMatchSet from AWS WAF.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#ErrorReason": { @@ -3415,1017 +3663,1513 @@ } }, "com.amazonaws.waf#GeoMatchConstraintType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "Country", - "name": "Country" + "type": "enum", + "members": { + "Country": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Country" } - ] + } } }, "com.amazonaws.waf#GeoMatchConstraintValue": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "AF", - "name": "AF" - }, - { - "value": "AX", - "name": "AX" - }, - { - "value": "AL", - "name": "AL" - }, - { - "value": "DZ", - "name": "DZ" - }, - { - "value": "AS", - "name": "AS" - }, - { - "value": "AD", - "name": "AD" - }, - { - "value": "AO", - "name": "AO" - }, - { - "value": "AI", - "name": "AI" - }, - { - "value": "AQ", - "name": "AQ" - }, - { - "value": "AG", - "name": "AG" - }, - { - "value": "AR", - "name": "AR" - }, - { - "value": "AM", - "name": "AM" - }, - { - "value": "AW", - "name": "AW" - }, - { - "value": "AU", - "name": "AU" - }, - { - "value": "AT", - "name": "AT" - }, - { - "value": "AZ", - "name": "AZ" - }, - { - "value": "BS", - "name": "BS" - }, - { - "value": "BH", - "name": "BH" - }, - { - "value": "BD", - "name": "BD" - }, - { - "value": "BB", - "name": "BB" - }, - { - "value": "BY", - "name": "BY" - }, - { - "value": "BE", - "name": "BE" - }, - { - "value": "BZ", - "name": "BZ" - }, - { - "value": "BJ", - "name": "BJ" - }, - { - "value": "BM", - "name": "BM" - }, - { - "value": "BT", - "name": "BT" - }, - { - "value": "BO", - "name": "BO" - }, - { - "value": "BQ", - "name": "BQ" - }, - { - "value": "BA", - "name": "BA" - }, - { - "value": "BW", - "name": "BW" - }, - { - "value": "BV", - "name": "BV" - }, - { - "value": "BR", - "name": "BR" - }, - { - "value": "IO", - "name": "IO" - }, - { - "value": "BN", - "name": "BN" - }, - { - "value": "BG", - "name": "BG" - }, - { - "value": "BF", - "name": "BF" - }, - { - "value": "BI", - "name": "BI" - }, - { - "value": "KH", - "name": "KH" - }, - { - "value": "CM", - "name": "CM" - }, - { - "value": "CA", - "name": "CA" - }, - { - "value": "CV", - "name": "CV" - }, - { - "value": "KY", - "name": "KY" - }, - { - "value": "CF", - "name": "CF" - }, - { - "value": "TD", - "name": "TD" - }, - { - "value": "CL", - "name": "CL" - }, - { - "value": "CN", - "name": "CN" - }, - { - "value": "CX", - "name": "CX" - }, - { - "value": "CC", - "name": "CC" - }, - { - "value": "CO", - "name": "CO" - }, - { - "value": "KM", - "name": "KM" - }, - { - "value": "CG", - "name": "CG" - }, - { - "value": "CD", - "name": "CD" - }, - { - "value": "CK", - "name": "CK" - }, - { - "value": "CR", - "name": "CR" - }, - { - "value": "CI", - "name": "CI" - }, - { - "value": "HR", - "name": "HR" - }, - { - "value": "CU", - "name": "CU" - }, - { - "value": "CW", - "name": "CW" - }, - { - "value": "CY", - "name": "CY" - }, - { - "value": "CZ", - "name": "CZ" - }, - { - "value": "DK", - "name": "DK" - }, - { - "value": "DJ", - "name": "DJ" - }, - { - "value": "DM", - "name": "DM" - }, - { - "value": "DO", - "name": "DO" - }, - { - "value": "EC", - "name": "EC" - }, - { - "value": "EG", - "name": "EG" - }, - { - "value": "SV", - "name": "SV" - }, - { - "value": "GQ", - "name": "GQ" - }, - { - "value": "ER", - "name": "ER" - }, - { - "value": "EE", - "name": "EE" - }, - { - "value": "ET", - "name": "ET" - }, - { - "value": "FK", - "name": "FK" - }, - { - "value": "FO", - "name": "FO" - }, - { - "value": "FJ", - "name": "FJ" - }, - { - "value": "FI", - "name": "FI" - }, - { - "value": "FR", - "name": "FR" - }, - { - "value": "GF", - "name": "GF" - }, - { - "value": "PF", - "name": "PF" - }, - { - "value": "TF", - "name": "TF" - }, - { - "value": "GA", - "name": "GA" - }, - { - "value": "GM", - "name": "GM" - }, - { - "value": "GE", - "name": "GE" - }, - { - "value": "DE", - "name": "DE" - }, - { - "value": "GH", - "name": "GH" - }, - { - "value": "GI", - "name": "GI" - }, - { - "value": "GR", - "name": "GR" - }, - { - "value": "GL", - "name": "GL" - }, - { - "value": "GD", - "name": "GD" - }, - { - "value": "GP", - "name": "GP" - }, - { - "value": "GU", - "name": "GU" - }, - { - "value": "GT", - "name": "GT" - }, - { - "value": "GG", - "name": "GG" - }, - { - "value": "GN", - "name": "GN" - }, - { - "value": "GW", - "name": "GW" - }, - { - "value": "GY", - "name": "GY" - }, - { - "value": "HT", - "name": "HT" - }, - { - "value": "HM", - "name": "HM" - }, - { - "value": "VA", - "name": "VA" - }, - { - "value": "HN", - "name": "HN" - }, - { - "value": "HK", - "name": "HK" - }, - { - "value": "HU", - "name": "HU" - }, - { - "value": "IS", - "name": "IS" - }, - { - "value": "IN", - "name": "IN" - }, - { - "value": "ID", - "name": "ID" - }, - { - "value": "IR", - "name": "IR" - }, - { - "value": "IQ", - "name": "IQ" - }, - { - "value": "IE", - "name": "IE" - }, - { - "value": "IM", - "name": "IM" - }, - { - "value": "IL", - "name": "IL" - }, - { - "value": "IT", - "name": "IT" - }, - { - "value": "JM", - "name": "JM" - }, - { - "value": "JP", - "name": "JP" - }, - { - "value": "JE", - "name": "JE" - }, - { - "value": "JO", - "name": "JO" - }, - { - "value": "KZ", - "name": "KZ" - }, - { - "value": "KE", - "name": "KE" - }, - { - "value": "KI", - "name": "KI" - }, - { - "value": "KP", - "name": "KP" - }, - { - "value": "KR", - "name": "KR" - }, - { - "value": "KW", - "name": "KW" - }, - { - "value": "KG", - "name": "KG" - }, - { - "value": "LA", - "name": "LA" - }, - { - "value": "LV", - "name": "LV" - }, - { - "value": "LB", - "name": "LB" - }, - { - "value": "LS", - "name": "LS" - }, - { - "value": "LR", - "name": "LR" - }, - { - "value": "LY", - "name": "LY" - }, - { - "value": "LI", - "name": "LI" - }, - { - "value": "LT", - "name": "LT" - }, - { - "value": "LU", - "name": "LU" - }, - { - "value": "MO", - "name": "MO" - }, - { - "value": "MK", - "name": "MK" - }, - { - "value": "MG", - "name": "MG" - }, - { - "value": "MW", - "name": "MW" - }, - { - "value": "MY", - "name": "MY" - }, - { - "value": "MV", - "name": "MV" - }, - { - "value": "ML", - "name": "ML" - }, - { - "value": "MT", - "name": "MT" - }, - { - "value": "MH", - "name": "MH" - }, - { - "value": "MQ", - "name": "MQ" - }, - { - "value": "MR", - "name": "MR" - }, - { - "value": "MU", - "name": "MU" - }, - { - "value": "YT", - "name": "YT" - }, - { - "value": "MX", - "name": "MX" - }, - { - "value": "FM", - "name": "FM" - }, - { - "value": "MD", - "name": "MD" - }, - { - "value": "MC", - "name": "MC" - }, - { - "value": "MN", - "name": "MN" - }, - { - "value": "ME", - "name": "ME" - }, - { - "value": "MS", - "name": "MS" - }, - { - "value": "MA", - "name": "MA" - }, - { - "value": "MZ", - "name": "MZ" - }, - { - "value": "MM", - "name": "MM" - }, - { - "value": "NA", - "name": "NA" - }, - { - "value": "NR", - "name": "NR" - }, - { - "value": "NP", - "name": "NP" - }, - { - "value": "NL", - "name": "NL" - }, - { - "value": "NC", - "name": "NC" - }, - { - "value": "NZ", - "name": "NZ" - }, - { - "value": "NI", - "name": "NI" - }, - { - "value": "NE", - "name": "NE" - }, - { - "value": "NG", - "name": "NG" - }, - { - "value": "NU", - "name": "NU" - }, - { - "value": "NF", - "name": "NF" - }, - { - "value": "MP", - "name": "MP" - }, - { - "value": "NO", - "name": "NO" - }, - { - "value": "OM", - "name": "OM" - }, - { - "value": "PK", - "name": "PK" - }, - { - "value": "PW", - "name": "PW" - }, - { - "value": "PS", - "name": "PS" - }, - { - "value": "PA", - "name": "PA" - }, - { - "value": "PG", - "name": "PG" - }, - { - "value": "PY", - "name": "PY" - }, - { - "value": "PE", - "name": "PE" - }, - { - "value": "PH", - "name": "PH" - }, - { - "value": "PN", - "name": "PN" - }, - { - "value": "PL", - "name": "PL" - }, - { - "value": "PT", - "name": "PT" - }, - { - "value": "PR", - "name": "PR" - }, - { - "value": "QA", - "name": "QA" - }, - { - "value": "RE", - "name": "RE" - }, - { - "value": "RO", - "name": "RO" - }, - { - "value": "RU", - "name": "RU" - }, - { - "value": "RW", - "name": "RW" - }, - { - "value": "BL", - "name": "BL" - }, - { - "value": "SH", - "name": "SH" - }, - { - "value": "KN", - "name": "KN" - }, - { - "value": "LC", - "name": "LC" - }, - { - "value": "MF", - "name": "MF" - }, - { - "value": "PM", - "name": "PM" - }, - { - "value": "VC", - "name": "VC" - }, - { - "value": "WS", - "name": "WS" - }, - { - "value": "SM", - "name": "SM" - }, - { - "value": "ST", - "name": "ST" - }, - { - "value": "SA", - "name": "SA" - }, - { - "value": "SN", - "name": "SN" - }, - { - "value": "RS", - "name": "RS" - }, - { - "value": "SC", - "name": "SC" - }, - { - "value": "SL", - "name": "SL" - }, - { - "value": "SG", - "name": "SG" - }, - { - "value": "SX", - "name": "SX" - }, - { - "value": "SK", - "name": "SK" - }, - { - "value": "SI", - "name": "SI" - }, - { - "value": "SB", - "name": "SB" - }, - { - "value": "SO", - "name": "SO" - }, - { - "value": "ZA", - "name": "ZA" - }, - { - "value": "GS", - "name": "GS" - }, - { - "value": "SS", - "name": "SS" - }, - { - "value": "ES", - "name": "ES" - }, - { - "value": "LK", - "name": "LK" - }, - { - "value": "SD", - "name": "SD" - }, - { - "value": "SR", - "name": "SR" - }, - { - "value": "SJ", - "name": "SJ" - }, - { - "value": "SZ", - "name": "SZ" - }, - { - "value": "SE", - "name": "SE" - }, - { - "value": "CH", - "name": "CH" - }, - { - "value": "SY", - "name": "SY" - }, - { - "value": "TW", - "name": "TW" - }, - { - "value": "TJ", - "name": "TJ" - }, - { - "value": "TZ", - "name": "TZ" - }, - { - "value": "TH", - "name": "TH" - }, - { - "value": "TL", - "name": "TL" - }, - { - "value": "TG", - "name": "TG" - }, - { - "value": "TK", - "name": "TK" - }, - { - "value": "TO", - "name": "TO" - }, - { - "value": "TT", - "name": "TT" - }, - { - "value": "TN", - "name": "TN" - }, - { - "value": "TR", - "name": "TR" - }, - { - "value": "TM", - "name": "TM" - }, - { - "value": "TC", - "name": "TC" - }, - { - "value": "TV", - "name": "TV" - }, - { - "value": "UG", - "name": "UG" - }, - { - "value": "UA", - "name": "UA" - }, - { - "value": "AE", - "name": "AE" - }, - { - "value": "GB", - "name": "GB" - }, - { - "value": "US", - "name": "US" - }, - { - "value": "UM", - "name": "UM" - }, - { - "value": "UY", - "name": "UY" - }, - { - "value": "UZ", - "name": "UZ" - }, - { - "value": "VU", - "name": "VU" - }, - { - "value": "VE", - "name": "VE" - }, - { - "value": "VN", - "name": "VN" - }, - { - "value": "VG", - "name": "VG" - }, - { - "value": "VI", - "name": "VI" - }, - { - "value": "WF", - "name": "WF" - }, - { - "value": "EH", - "name": "EH" - }, - { - "value": "YE", - "name": "YE" - }, - { - "value": "ZM", - "name": "ZM" - }, - { - "value": "ZW", - "name": "ZW" + "type": "enum", + "members": { + "AF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AF" + } + }, + "AX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AX" + } + }, + "AL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AL" + } + }, + "DZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DZ" + } + }, + "AS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AS" + } + }, + "AD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AD" + } + }, + "AO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AO" + } + }, + "AI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AI" + } + }, + "AQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AQ" + } + }, + "AG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AG" + } + }, + "AR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AR" + } + }, + "AM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AM" + } + }, + "AW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AW" + } + }, + "AU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AU" + } + }, + "AT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AT" + } + }, + "AZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AZ" + } + }, + "BS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BS" + } + }, + "BH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BH" + } + }, + "BD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BD" + } + }, + "BB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BB" + } + }, + "BY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BY" + } + }, + "BE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BE" + } + }, + "BZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BZ" + } + }, + "BJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BJ" + } + }, + "BM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BM" + } + }, + "BT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BT" + } + }, + "BO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BO" + } + }, + "BQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BQ" + } + }, + "BA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BA" + } + }, + "BW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BW" + } + }, + "BV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BV" + } + }, + "BR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BR" + } + }, + "IO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IO" + } + }, + "BN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BN" + } + }, + "BG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BG" + } + }, + "BF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BF" + } + }, + "BI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BI" + } + }, + "KH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KH" + } + }, + "CM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CM" + } + }, + "CA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CA" + } + }, + "CV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CV" + } + }, + "KY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KY" + } + }, + "CF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CF" + } + }, + "TD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TD" + } + }, + "CL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CL" + } + }, + "CN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CN" + } + }, + "CX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CX" + } + }, + "CC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CC" + } + }, + "CO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CO" + } + }, + "KM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KM" + } + }, + "CG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CG" + } + }, + "CD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CD" + } + }, + "CK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CK" + } + }, + "CR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CR" + } + }, + "CI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CI" + } + }, + "HR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HR" + } + }, + "CU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CU" + } + }, + "CW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CW" + } + }, + "CY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CY" + } + }, + "CZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CZ" + } + }, + "DK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DK" + } + }, + "DJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DJ" + } + }, + "DM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DM" + } + }, + "DO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DO" + } + }, + "EC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EC" + } + }, + "EG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EG" + } + }, + "SV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SV" + } + }, + "GQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GQ" + } + }, + "ER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ER" + } + }, + "EE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EE" + } + }, + "ET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ET" + } + }, + "FK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FK" + } + }, + "FO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FO" + } + }, + "FJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FJ" + } + }, + "FI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FI" + } + }, + "FR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FR" + } + }, + "GF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GF" + } + }, + "PF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PF" + } + }, + "TF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TF" + } + }, + "GA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GA" + } + }, + "GM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GM" + } + }, + "GE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GE" + } + }, + "DE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DE" + } + }, + "GH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GH" + } + }, + "GI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GI" + } + }, + "GR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GR" + } + }, + "GL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GL" + } + }, + "GD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GD" + } + }, + "GP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GP" + } + }, + "GU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GU" + } + }, + "GT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GT" + } + }, + "GG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GG" + } + }, + "GN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GN" + } + }, + "GW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GW" + } + }, + "GY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GY" + } + }, + "HT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HT" + } + }, + "HM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HM" + } + }, + "VA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VA" + } + }, + "HN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HN" + } + }, + "HK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HK" + } + }, + "HU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HU" + } + }, + "IS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IS" + } + }, + "IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IN" + } + }, + "ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ID" + } + }, + "IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IR" + } + }, + "IQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IQ" + } + }, + "IE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IE" + } + }, + "IM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IM" + } + }, + "IL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IL" + } + }, + "IT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IT" + } + }, + "JM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JM" + } + }, + "JP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JP" + } + }, + "JE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JE" + } + }, + "JO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "JO" + } + }, + "KZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KZ" + } + }, + "KE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KE" + } + }, + "KI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KI" + } + }, + "KP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KP" + } + }, + "KR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KR" + } + }, + "KW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KW" + } + }, + "KG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KG" + } + }, + "LA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LA" + } + }, + "LV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LV" + } + }, + "LB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LB" + } + }, + "LS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LS" + } + }, + "LR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LR" + } + }, + "LY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LY" + } + }, + "LI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LI" + } + }, + "LT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LT" + } + }, + "LU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LU" + } + }, + "MO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MO" + } + }, + "MK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MK" + } + }, + "MG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MG" + } + }, + "MW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MW" + } + }, + "MY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MY" + } + }, + "MV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MV" + } + }, + "ML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ML" + } + }, + "MT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MT" + } + }, + "MH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MH" + } + }, + "MQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MQ" + } + }, + "MR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MR" + } + }, + "MU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MU" + } + }, + "YT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "YT" + } + }, + "MX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MX" + } + }, + "FM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FM" + } + }, + "MD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MD" + } + }, + "MC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MC" + } + }, + "MN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MN" + } + }, + "ME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ME" + } + }, + "MS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MS" + } + }, + "MA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MA" + } + }, + "MZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MZ" + } + }, + "MM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MM" + } + }, + "NA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NA" + } + }, + "NR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NR" + } + }, + "NP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NP" + } + }, + "NL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NL" + } + }, + "NC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NC" + } + }, + "NZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NZ" + } + }, + "NI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NI" + } + }, + "NE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NE" + } + }, + "NG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NG" + } + }, + "NU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NU" + } + }, + "NF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NF" + } + }, + "MP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MP" + } + }, + "NO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NO" + } + }, + "OM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "OM" + } + }, + "PK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PK" + } + }, + "PW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PW" + } + }, + "PS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PS" + } + }, + "PA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PA" + } + }, + "PG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PG" + } + }, + "PY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PY" + } + }, + "PE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PE" + } + }, + "PH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PH" + } + }, + "PN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PN" + } + }, + "PL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PL" + } + }, + "PT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PT" + } + }, + "PR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PR" + } + }, + "QA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QA" + } + }, + "RE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RE" + } + }, + "RO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RO" + } + }, + "RU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RU" + } + }, + "RW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RW" + } + }, + "BL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BL" + } + }, + "SH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SH" + } + }, + "KN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KN" + } + }, + "LC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LC" + } + }, + "MF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MF" + } + }, + "PM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PM" + } + }, + "VC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VC" + } + }, + "WS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WS" + } + }, + "SM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SM" + } + }, + "ST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ST" + } + }, + "SA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SA" + } + }, + "SN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SN" + } + }, + "RS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RS" + } + }, + "SC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SC" + } + }, + "SL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SL" + } + }, + "SG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SG" + } + }, + "SX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SX" + } + }, + "SK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SK" + } + }, + "SI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SI" + } + }, + "SB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SB" + } + }, + "SO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SO" + } + }, + "ZA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZA" + } + }, + "GS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GS" + } + }, + "SS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SS" + } + }, + "ES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ES" + } + }, + "LK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LK" + } + }, + "SD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SD" + } + }, + "SR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SR" + } + }, + "SJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SJ" + } + }, + "SZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SZ" + } + }, + "SE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SE" + } + }, + "CH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CH" + } + }, + "SY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SY" + } + }, + "TW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TW" + } + }, + "TJ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TJ" + } + }, + "TZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TZ" + } + }, + "TH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TH" + } + }, + "TL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TL" + } + }, + "TG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TG" + } + }, + "TK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TK" + } + }, + "TO": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TO" + } + }, + "TT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TT" } - ] + }, + "TN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TN" + } + }, + "TR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TR" + } + }, + "TM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TM" + } + }, + "TC": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TC" + } + }, + "TV": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TV" + } + }, + "UG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UG" + } + }, + "UA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UA" + } + }, + "AE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AE" + } + }, + "GB": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GB" + } + }, + "US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "US" + } + }, + "UM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UM" + } + }, + "UY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UY" + } + }, + "UZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UZ" + } + }, + "VU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VU" + } + }, + "VE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VE" + } + }, + "VN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VN" + } + }, + "VG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VG" + } + }, + "VI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VI" + } + }, + "WF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WF" + } + }, + "EH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EH" + } + }, + "YE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "YE" + } + }, + "ZM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZM" + } + }, + "ZW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ZW" + } + } } }, "com.amazonaws.waf#GeoMatchConstraints": { @@ -4543,7 +5287,33 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the ByteMatchSet specified by ByteMatchSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the ByteMatchSet specified by ByteMatchSetId.

", + "smithy.api#examples": [ + { + "title": "To get a byte match set", + "documentation": "The following example returns the details of a byte match set with the ID exampleIDs3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "ByteMatchSetId": "exampleIDs3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "ByteMatchSet": { + "ByteMatchSetId": "exampleIDs3t-46da-4fdb-b8d5-abc321j569j5", + "ByteMatchTuples": [ + { + "FieldToMatch": { + "Data": "referer", + "Type": "HEADER" + }, + "PositionalConstraint": "CONTAINS", + "TargetString": "badrefer1", + "TextTransformation": "NONE" + } + ], + "Name": "ByteMatchNameExample" + } + } + } + ] } }, "com.amazonaws.waf#GetByteMatchSetRequest": { @@ -4556,6 +5326,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetByteMatchSetResponse": { @@ -4567,6 +5340,9 @@ "smithy.api#documentation": "

Information about the ByteMatchSet that you specified in the GetByteMatchSet request. For more information, see the \n\t\t\tfollowing topics:

\n\t\t
    \n
  • \n

    \n ByteMatchSet: Contains ByteMatchSetId, ByteMatchTuples, and Name\n

    \n
  • \n
  • \n

    \n ByteMatchTuples: Contains an array of ByteMatchTuple objects. Each ByteMatchTuple \n\t\t\t\tobject contains FieldToMatch, PositionalConstraint, TargetString, \n\t\t\t\tand TextTransformation\n

    \n
  • \n
  • \n

    \n FieldToMatch: Contains Data and Type\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetChangeToken": { @@ -4583,12 +5359,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

When you want to create, update, or delete AWS WAF objects, get a change token and include the change token in the create, update, or delete request. Change tokens ensure that your application doesn't submit conflicting requests to AWS WAF.

\n\t\t

Each create, update, or delete request must use a unique change token. If your application submits a GetChangeToken request \n\t\t\tand then submits a second GetChangeToken request before submitting a create, update, or delete request, the second \n\t\t\tGetChangeToken request returns the same value as the first GetChangeToken request.

\n\t\t

When you use a change token in a create, update, or delete request, the status of the change token changes to PENDING, \n\t\t\twhich indicates that AWS WAF is propagating the change to all AWS WAF servers. Use GetChangeTokenStatus to determine the \n\t\t\tstatus of your change token.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

When you want to create, update, or delete AWS WAF objects, get a change token and include the change token in the create, update, or delete request. Change tokens ensure that your application doesn't submit conflicting requests to AWS WAF.

\n\t\t

Each create, update, or delete request must use a unique change token. If your application submits a GetChangeToken request \n\t\t\tand then submits a second GetChangeToken request before submitting a create, update, or delete request, the second \n\t\t\tGetChangeToken request returns the same value as the first GetChangeToken request.

\n\t\t

When you use a change token in a create, update, or delete request, the status of the change token changes to PENDING, \n\t\t\twhich indicates that AWS WAF is propagating the change to all AWS WAF servers. Use GetChangeTokenStatus to determine the \n\t\t\tstatus of your change token.

", + "smithy.api#examples": [ + { + "title": "To get a change token", + "documentation": "The following example returns a change token to use for a create, update or delete operation.", + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#GetChangeTokenRequest": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#input": {} + } }, "com.amazonaws.waf#GetChangeTokenResponse": { "type": "structure", @@ -4599,6 +5387,9 @@ "smithy.api#documentation": "

The ChangeToken that you used in the request. Use this value in a GetChangeTokenStatus request \n\t\t\tto get the current status of the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetChangeTokenStatus": { @@ -4618,7 +5409,19 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the status of a ChangeToken that you got by calling GetChangeToken. ChangeTokenStatus is \n\t\t\tone of the following values:

\n\t\t
    \n
  • \n

    \n PROVISIONED: You requested the change token by calling GetChangeToken, but you haven't used it yet \n\t\t\t\tin a call to create, update, or delete an AWS WAF object.

    \n
  • \n
  • \n

    \n PENDING: AWS WAF is propagating the create, update, or delete request to all AWS WAF servers.

    \n
  • \n
  • \n

    \n INSYNC: Propagation is complete.

    \n
  • \n
" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the status of a ChangeToken that you got by calling GetChangeToken. ChangeTokenStatus is \n\t\t\tone of the following values:

\n\t\t
    \n
  • \n

    \n PROVISIONED: You requested the change token by calling GetChangeToken, but you haven't used it yet \n\t\t\t\tin a call to create, update, or delete an AWS WAF object.

    \n
  • \n
  • \n

    \n PENDING: AWS WAF is propagating the create, update, or delete request to all AWS WAF servers.

    \n
  • \n
  • \n

    \n INSYNC: Propagation is complete.

    \n
  • \n
", + "smithy.api#examples": [ + { + "title": "To get the change token status", + "documentation": "The following example returns the status of a change token with the ID abcd12f2-46da-4fdb-b8d5-fbd4c466928f.", + "input": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + }, + "output": { + "ChangeTokenStatus": "PENDING" + } + } + ] } }, "com.amazonaws.waf#GetChangeTokenStatusRequest": { @@ -4631,6 +5434,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetChangeTokenStatusResponse": { @@ -4642,6 +5448,9 @@ "smithy.api#documentation": "

The status of the change token.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetGeoMatchSet": { @@ -4677,6 +5486,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetGeoMatchSetResponse": { @@ -4688,6 +5500,9 @@ "smithy.api#documentation": "

Information about the GeoMatchSet that you specified in the GetGeoMatchSet request. This includes the Type, which for a GeoMatchContraint is always Country, as well as the Value, which is the identifier for a specific country.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetIPSet": { @@ -4710,7 +5525,28 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the IPSet that is specified by IPSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the IPSet that is specified by IPSetId.

", + "smithy.api#examples": [ + { + "title": "To get an IP set", + "documentation": "The following example returns the details of an IP match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "IPSet": { + "IPSetDescriptors": [ + { + "Type": "IPV4", + "Value": "192.0.2.44/32" + } + ], + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "Name": "MyIPSetFriendlyName" + } + } + } + ] } }, "com.amazonaws.waf#GetIPSetRequest": { @@ -4723,6 +5559,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetIPSetResponse": { @@ -4734,6 +5573,9 @@ "smithy.api#documentation": "

Information about the IPSet that you specified in the GetIPSet request. For more information, see the \n\t\t\tfollowing topics:

\n\t\t
    \n
  • \n

    \n IPSet: Contains IPSetDescriptors, IPSetId, and Name\n

    \n
  • \n
  • \n

    \n IPSetDescriptors: Contains an array of IPSetDescriptor objects. Each IPSetDescriptor \n\t\t\t\tobject contains Type and Value\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetLoggingConfiguration": { @@ -4766,6 +5608,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetLoggingConfigurationResponse": { @@ -4777,6 +5622,9 @@ "smithy.api#documentation": "

The LoggingConfiguration for the specified web ACL.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetPermissionPolicy": { @@ -4809,6 +5657,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetPermissionPolicyResponse": { @@ -4820,6 +5671,9 @@ "smithy.api#documentation": "

The IAM policy attached to the specified RuleGroup.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetRateBasedRule": { @@ -4887,6 +5741,9 @@ "smithy.api#documentation": "

A null value and not currently used. Do not include this in your request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetRateBasedRuleManagedKeysResponse": { @@ -4904,6 +5761,9 @@ "smithy.api#documentation": "

A null value and not currently used.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetRateBasedRuleRequest": { @@ -4916,6 +5776,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetRateBasedRuleResponse": { @@ -4927,6 +5790,9 @@ "smithy.api#documentation": "

Information about the RateBasedRule that you specified in the\n GetRateBasedRule request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetRegexMatchSet": { @@ -4962,6 +5828,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetRegexMatchSetResponse": { @@ -4973,6 +5842,9 @@ "smithy.api#documentation": "

Information about the RegexMatchSet that you specified in the GetRegexMatchSet request. For more information, see RegexMatchTuple.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetRegexPatternSet": { @@ -5008,6 +5880,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetRegexPatternSetResponse": { @@ -5019,6 +5894,9 @@ "smithy.api#documentation": "

Information about the RegexPatternSet that you specified in the GetRegexPatternSet request, including the identifier of the pattern set and the regular expression patterns you want AWS WAF to search for.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetRule": { @@ -5041,7 +5919,30 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the Rule that is specified by the RuleId that you included in the GetRule request.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the Rule that is specified by the RuleId that you included in the GetRule request.

", + "smithy.api#examples": [ + { + "title": "To get a rule", + "documentation": "The following example returns the details of a rule with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "RuleId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "Rule": { + "MetricName": "WAFByteHeaderRule", + "Name": "WAFByteHeaderRule", + "Predicates": [ + { + "DataId": "MyByteMatchSetID", + "Negated": false, + "Type": "ByteMatch" + } + ], + "RuleId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + } + } + ] } }, "com.amazonaws.waf#GetRuleGroup": { @@ -5074,6 +5975,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetRuleGroupResponse": { @@ -5085,6 +5989,9 @@ "smithy.api#documentation": "

Information about the RuleGroup that you specified in the GetRuleGroup request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetRuleRequest": { @@ -5097,6 +6004,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetRuleResponse": { @@ -5108,6 +6018,9 @@ "smithy.api#documentation": "

Information about the Rule that you specified in the GetRule request. \n\t\t\tFor more information, see the following topics:

\n\t\t
    \n
  • \n

    \n Rule: Contains MetricName, Name, an array of Predicate objects, \n\t\t\t\tand RuleId\n

    \n
  • \n
  • \n

    \n Predicate: Each Predicate object contains DataId, Negated, and \n\t\t\t\tType\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetSampledRequests": { @@ -5172,6 +6085,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetSampledRequestsResponse": { @@ -5196,6 +6112,9 @@ "smithy.api#documentation": "

Usually, TimeWindow is the time range that you specified in the GetSampledRequests request. However, \n\t\t\tif your AWS resource received more than 5,000 requests during the time range that you specified in the request, \n\t\t\tGetSampledRequests returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetSizeConstraintSet": { @@ -5218,7 +6137,32 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the SizeConstraintSet specified by SizeConstraintSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the SizeConstraintSet specified by SizeConstraintSetId.

", + "smithy.api#examples": [ + { + "title": "To get a size constraint set", + "documentation": "The following example returns the details of a size constraint match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "SizeConstraintSet": { + "Name": "MySampleSizeConstraintSet", + "SizeConstraints": [ + { + "ComparisonOperator": "GT", + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "Size": 0, + "TextTransformation": "NONE" + } + ], + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + } + } + ] } }, "com.amazonaws.waf#GetSizeConstraintSetRequest": { @@ -5231,6 +6175,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetSizeConstraintSetResponse": { @@ -5242,6 +6189,9 @@ "smithy.api#documentation": "

Information about the SizeConstraintSet that you specified in the GetSizeConstraintSet request. For more information, see the \n\t\t\tfollowing topics:

\n\t\t
    \n
  • \n

    \n SizeConstraintSet: Contains SizeConstraintSetId, SizeConstraints, and Name\n

    \n
  • \n
  • \n

    \n SizeConstraints: Contains an array of SizeConstraint objects. Each SizeConstraint \n\t\t\t\tobject contains FieldToMatch, TextTransformation, ComparisonOperator, \n\t\t\t\tand Size\n

    \n
  • \n
  • \n

    \n FieldToMatch: Contains Data and Type\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetSqlInjectionMatchSet": { @@ -5264,7 +6214,30 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId.

", + "smithy.api#examples": [ + { + "title": "To get a SQL injection match set", + "documentation": "The following example returns the details of a SQL injection match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "SqlInjectionMatchSet": { + "Name": "MySQLInjectionMatchSet", + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "SqlInjectionMatchTuples": [ + { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + ] + } + } + } + ] } }, "com.amazonaws.waf#GetSqlInjectionMatchSetRequest": { @@ -5279,7 +6252,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get a SqlInjectionMatchSet.

" + "smithy.api#documentation": "

A request to get a SqlInjectionMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#GetSqlInjectionMatchSetResponse": { @@ -5293,7 +6267,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a GetSqlInjectionMatchSet request.

" + "smithy.api#documentation": "

The response to a GetSqlInjectionMatchSet request.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#GetWebACL": { @@ -5316,7 +6291,35 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the WebACL that is specified by WebACLId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the WebACL that is specified by WebACLId.

", + "smithy.api#examples": [ + { + "title": "To get a web ACL", + "documentation": "The following example returns the details of a web ACL with the ID createwebacl-1472061481310.", + "input": { + "WebACLId": "createwebacl-1472061481310" + }, + "output": { + "WebACL": { + "DefaultAction": { + "Type": "ALLOW" + }, + "MetricName": "CreateExample", + "Name": "CreateExample", + "Rules": [ + { + "Action": { + "Type": "ALLOW" + }, + "Priority": 1, + "RuleId": "WAFRule-1-Example" + } + ], + "WebACLId": "createwebacl-1472061481310" + } + } + } + ] } }, "com.amazonaws.waf#GetWebACLRequest": { @@ -5329,6 +6332,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#GetWebACLResponse": { @@ -5340,6 +6346,9 @@ "smithy.api#documentation": "

Information about the WebACL that you specified in the GetWebACL request. \n\t\t\tFor more information, see the following topics:

\n\t\t
    \n
  • \n

    \n WebACL: Contains DefaultAction, MetricName, Name, an array of \n\t\t\t\tRule objects, and WebACLId\n

    \n
  • \n
  • \n

    \n DefaultAction (Data type is WafAction): Contains Type\n

    \n
  • \n
  • \n

    \n Rules: Contains an array of ActivatedRule objects, which contain Action, \n\t\t\t\tPriority, and RuleId\n

    \n
  • \n
  • \n

    \n Action: Contains Type\n

    \n
  • \n
" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#GetXssMatchSet": { @@ -5362,7 +6371,30 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the XssMatchSet that is specified by XssMatchSetId.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns the XssMatchSet that is specified by XssMatchSetId.

", + "smithy.api#examples": [ + { + "title": "To get an XSS match set", + "documentation": "The following example returns the details of an XSS match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + }, + "output": { + "XssMatchSet": { + "Name": "MySampleXssMatchSet", + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "XssMatchTuples": [ + { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + ] + } + } + } + ] } }, "com.amazonaws.waf#GetXssMatchSetRequest": { @@ -5377,7 +6409,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to get an XssMatchSet.

" + "smithy.api#documentation": "

A request to get an XssMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#GetXssMatchSetResponse": { @@ -5391,7 +6424,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a GetXssMatchSet request.

" + "smithy.api#documentation": "

The response to a GetXssMatchSet request.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#HTTPHeader": { @@ -5527,18 +6561,20 @@ } }, "com.amazonaws.waf#IPSetDescriptorType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IPV4", - "name": "IPV4" - }, - { - "value": "IPV6", - "name": "IPV6" + "type": "enum", + "members": { + "IPV4": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPV4" } - ] + }, + "IPV6": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPV6" + } + } } }, "com.amazonaws.waf#IPSetDescriptorValue": { @@ -5548,7 +6584,7 @@ "min": 1, "max": 50 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#IPSetDescriptors": { @@ -5669,6 +6705,9 @@ "smithy.api#documentation": "

Specifies the number of ActivatedRules that you want AWS WAF to return for this request. If you have more ActivatedRules than the number that you specify for Limit, the response includes a \n NextMarker value that you can use to get another batch of ActivatedRules.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListActivatedRulesInRuleGroupResponse": { @@ -5686,6 +6725,9 @@ "smithy.api#documentation": "

An array of ActivatedRules objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListByteMatchSets": { @@ -5724,6 +6766,9 @@ "smithy.api#documentation": "

Specifies the number of ByteMatchSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tByteMatchSets objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of ByteMatchSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListByteMatchSetsResponse": { @@ -5741,6 +6786,9 @@ "smithy.api#documentation": "

An array of ByteMatchSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListGeoMatchSets": { @@ -5779,6 +6827,9 @@ "smithy.api#documentation": "

Specifies the number of GeoMatchSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tGeoMatchSet objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of GeoMatchSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListGeoMatchSetsResponse": { @@ -5796,6 +6847,9 @@ "smithy.api#documentation": "

An array of GeoMatchSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListIPSets": { @@ -5815,7 +6869,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of IPSetSummary objects in the response.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of IPSetSummary objects in the response.

", + "smithy.api#examples": [ + { + "title": "To list IP sets", + "documentation": "The following example returns an array of up to 100 IP match sets.", + "input": { + "Limit": 100 + }, + "output": { + "IPSets": [ + { + "IPSetId": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Name": "MyIPSetFriendlyName" + } + ] + } + } + ] } }, "com.amazonaws.waf#ListIPSetsRequest": { @@ -5834,6 +6905,9 @@ "smithy.api#documentation": "

Specifies the number of IPSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tIPSet objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of IPSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListIPSetsResponse": { @@ -5851,6 +6925,9 @@ "smithy.api#documentation": "

An array of IPSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListLoggingConfigurations": { @@ -5892,6 +6969,9 @@ "smithy.api#documentation": "

Specifies the number of LoggingConfigurations that you want AWS WAF to return for this request. If you have more LoggingConfigurations than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of LoggingConfigurations.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListLoggingConfigurationsResponse": { @@ -5909,6 +6989,9 @@ "smithy.api#documentation": "

If you have more LoggingConfigurations than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more LoggingConfigurations, submit another ListLoggingConfigurations request, and specify the NextMarker value from the response in the NextMarker value in the next request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListRateBasedRules": { @@ -5947,6 +7030,9 @@ "smithy.api#documentation": "

Specifies the number of Rules that you want AWS WAF to return for this\n request. If you have more Rules than the number that you specify for\n Limit, the response includes a NextMarker value that you can\n use to get another batch of Rules.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListRateBasedRulesResponse": { @@ -5964,6 +7050,9 @@ "smithy.api#documentation": "

An array of RuleSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListRegexMatchSets": { @@ -6002,6 +7091,9 @@ "smithy.api#documentation": "

Specifies the number of RegexMatchSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tRegexMatchSet objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of RegexMatchSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListRegexMatchSetsResponse": { @@ -6019,6 +7111,9 @@ "smithy.api#documentation": "

An array of RegexMatchSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListRegexPatternSets": { @@ -6057,6 +7152,9 @@ "smithy.api#documentation": "

Specifies the number of RegexPatternSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tRegexPatternSet objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of RegexPatternSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListRegexPatternSetsResponse": { @@ -6074,6 +7172,9 @@ "smithy.api#documentation": "

An array of RegexPatternSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListRuleGroups": { @@ -6109,6 +7210,9 @@ "smithy.api#documentation": "

Specifies the number of RuleGroups that you want AWS WAF to return for this request. If you have more RuleGroups than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of RuleGroups.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListRuleGroupsResponse": { @@ -6126,6 +7230,9 @@ "smithy.api#documentation": "

An array of RuleGroup objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListRules": { @@ -6145,7 +7252,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of RuleSummary objects.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of RuleSummary objects.

", + "smithy.api#examples": [ + { + "title": "To list rules", + "documentation": "The following example returns an array of up to 100 rules.", + "input": { + "Limit": 100 + }, + "output": { + "Rules": [ + { + "Name": "WAFByteHeaderRule", + "RuleId": "WAFRule-1-Example" + } + ] + } + } + ] } }, "com.amazonaws.waf#ListRulesRequest": { @@ -6164,6 +7288,9 @@ "smithy.api#documentation": "

Specifies the number of Rules that you want AWS WAF to return for this request. If you have more \t\t\tRules than the number that you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of Rules.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListRulesResponse": { @@ -6181,6 +7308,9 @@ "smithy.api#documentation": "

An array of RuleSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListSizeConstraintSets": { @@ -6200,7 +7330,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of SizeConstraintSetSummary objects.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of SizeConstraintSetSummary objects.

", + "smithy.api#examples": [ + { + "title": "To list a size constraint sets", + "documentation": "The following example returns an array of up to 100 size contraint match sets.", + "input": { + "Limit": 100 + }, + "output": { + "SizeConstraintSets": [ + { + "Name": "MySampleSizeConstraintSet", + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + ] + } + } + ] } }, "com.amazonaws.waf#ListSizeConstraintSetsRequest": { @@ -6219,6 +7366,9 @@ "smithy.api#documentation": "

Specifies the number of SizeConstraintSet objects that you want AWS WAF to return for this request. If you have more \n\t\t\tSizeConstraintSets objects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of SizeConstraintSet objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListSizeConstraintSetsResponse": { @@ -6236,6 +7386,9 @@ "smithy.api#documentation": "

An array of SizeConstraintSetSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListSqlInjectionMatchSets": { @@ -6255,7 +7408,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of SqlInjectionMatchSet objects.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of SqlInjectionMatchSet objects.

", + "smithy.api#examples": [ + { + "title": "To list SQL injection match sets", + "documentation": "The following example returns an array of up to 100 SQL injection match sets.", + "input": { + "Limit": 100 + }, + "output": { + "SqlInjectionMatchSets": [ + { + "Name": "MySQLInjectionMatchSet", + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + ] + } + } + ] } }, "com.amazonaws.waf#ListSqlInjectionMatchSetsRequest": { @@ -6276,7 +7446,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to list the SqlInjectionMatchSet objects created by the current AWS account.

" + "smithy.api#documentation": "

A request to list the SqlInjectionMatchSet objects created by the current AWS account.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#ListSqlInjectionMatchSetsResponse": { @@ -6296,7 +7467,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a ListSqlInjectionMatchSets request.

" + "smithy.api#documentation": "

The response to a ListSqlInjectionMatchSets request.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#ListSubscribedRuleGroups": { @@ -6335,6 +7507,9 @@ "smithy.api#documentation": "

Specifies the number of subscribed rule groups that you want AWS WAF to return for this request. If you have more \n\t\t\tobjects than the number you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListSubscribedRuleGroupsResponse": { @@ -6352,6 +7527,9 @@ "smithy.api#documentation": "

An array of RuleGroup objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListTagsForResource": { @@ -6409,6 +7587,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListTagsForResourceResponse": { @@ -6426,6 +7607,9 @@ "smithy.api#documentation": "

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListWebACLs": { @@ -6445,7 +7629,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of WebACLSummary objects in the response.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of WebACLSummary objects in the response.

", + "smithy.api#examples": [ + { + "title": "To list Web ACLs", + "documentation": "The following example returns an array of up to 100 web ACLs.", + "input": { + "Limit": 100 + }, + "output": { + "WebACLs": [ + { + "Name": "WebACLexample", + "WebACLId": "webacl-1472061481310" + } + ] + } + } + ] } }, "com.amazonaws.waf#ListWebACLsRequest": { @@ -6464,6 +7665,9 @@ "smithy.api#documentation": "

Specifies the number of WebACL objects that you want AWS WAF to return for this request. If you have more \n\t\t\tWebACL objects than the number that you specify for Limit, the response includes a \n\t\t\tNextMarker value that you can use to get another batch of WebACL objects.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#ListWebACLsResponse": { @@ -6481,6 +7685,9 @@ "smithy.api#documentation": "

An array of WebACLSummary objects.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#ListXssMatchSets": { @@ -6500,7 +7707,24 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of XssMatchSet objects.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Returns an array of XssMatchSet objects.

", + "smithy.api#examples": [ + { + "title": "To list XSS match sets", + "documentation": "The following example returns an array of up to 100 XSS match sets.", + "input": { + "Limit": 100 + }, + "output": { + "XssMatchSets": [ + { + "Name": "MySampleXssMatchSet", + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5" + } + ] + } + } + ] } }, "com.amazonaws.waf#ListXssMatchSetsRequest": { @@ -6521,7 +7745,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to list the XssMatchSet objects created by the current AWS account.

" + "smithy.api#documentation": "

A request to list the XssMatchSet objects created by the current AWS account.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#ListXssMatchSetsResponse": { @@ -6541,7 +7766,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to a ListXssMatchSets request.

" + "smithy.api#documentation": "

The response to a ListXssMatchSets request.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#LogDestinationConfigs": { @@ -6606,42 +7832,54 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#MatchFieldType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "URI", - "name": "URI" - }, - { - "value": "QUERY_STRING", - "name": "QUERY_STRING" - }, - { - "value": "HEADER", - "name": "HEADER" - }, - { - "value": "METHOD", - "name": "METHOD" - }, - { - "value": "BODY", - "name": "BODY" - }, - { - "value": "SINGLE_QUERY_ARG", - "name": "SINGLE_QUERY_ARG" - }, - { - "value": "ALL_QUERY_ARGS", - "name": "ALL_QUERY_ARGS" + "type": "enum", + "members": { + "URI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "URI" } - ] + }, + "QUERY_STRING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QUERY_STRING" + } + }, + "HEADER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HEADER" + } + }, + "METHOD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "METHOD" + } + }, + "BODY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BODY" + } + }, + "SINGLE_QUERY_ARG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SINGLE_QUERY_ARG" + } + }, + "ALL_QUERY_ARGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL_QUERY_ARGS" + } + } } }, "com.amazonaws.waf#MetricName": { @@ -6651,42 +7889,54 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#MigrationErrorType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ENTITY_NOT_SUPPORTED", - "name": "ENTITY_NOT_SUPPORTED" - }, - { - "value": "ENTITY_NOT_FOUND", - "name": "ENTITY_NOT_FOUND" - }, - { - "value": "S3_BUCKET_NO_PERMISSION", - "name": "S3_BUCKET_NO_PERMISSION" - }, - { - "value": "S3_BUCKET_NOT_ACCESSIBLE", - "name": "S3_BUCKET_NOT_ACCESSIBLE" - }, - { - "value": "S3_BUCKET_NOT_FOUND", - "name": "S3_BUCKET_NOT_FOUND" - }, - { - "value": "S3_BUCKET_INVALID_REGION", - "name": "S3_BUCKET_INVALID_REGION" - }, - { - "value": "S3_INTERNAL_ERROR", - "name": "S3_INTERNAL_ERROR" + "type": "enum", + "members": { + "ENTITY_NOT_SUPPORTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENTITY_NOT_SUPPORTED" } - ] + }, + "ENTITY_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENTITY_NOT_FOUND" + } + }, + "S3_BUCKET_NO_PERMISSION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_BUCKET_NO_PERMISSION" + } + }, + "S3_BUCKET_NOT_ACCESSIBLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_BUCKET_NOT_ACCESSIBLE" + } + }, + "S3_BUCKET_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_BUCKET_NOT_FOUND" + } + }, + "S3_BUCKET_INVALID_REGION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_BUCKET_INVALID_REGION" + } + }, + "S3_INTERNAL_ERROR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "S3_INTERNAL_ERROR" + } + } } }, "com.amazonaws.waf#Negated": { @@ -6699,7 +7949,7 @@ "min": 1, "max": 1224 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#PaginationLimit": { @@ -6713,82 +7963,116 @@ } }, "com.amazonaws.waf#ParameterExceptionField": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CHANGE_ACTION", - "name": "CHANGE_ACTION" - }, - { - "value": "WAF_ACTION", - "name": "WAF_ACTION" - }, - { - "value": "WAF_OVERRIDE_ACTION", - "name": "WAF_OVERRIDE_ACTION" - }, - { - "value": "PREDICATE_TYPE", - "name": "PREDICATE_TYPE" - }, - { - "value": "IPSET_TYPE", - "name": "IPSET_TYPE" - }, - { - "value": "BYTE_MATCH_FIELD_TYPE", - "name": "BYTE_MATCH_FIELD_TYPE" - }, - { - "value": "SQL_INJECTION_MATCH_FIELD_TYPE", - "name": "SQL_INJECTION_MATCH_FIELD_TYPE" - }, - { - "value": "BYTE_MATCH_TEXT_TRANSFORMATION", - "name": "BYTE_MATCH_TEXT_TRANSFORMATION" - }, - { - "value": "BYTE_MATCH_POSITIONAL_CONSTRAINT", - "name": "BYTE_MATCH_POSITIONAL_CONSTRAINT" - }, - { - "value": "SIZE_CONSTRAINT_COMPARISON_OPERATOR", - "name": "SIZE_CONSTRAINT_COMPARISON_OPERATOR" - }, - { - "value": "GEO_MATCH_LOCATION_TYPE", - "name": "GEO_MATCH_LOCATION_TYPE" - }, - { - "value": "GEO_MATCH_LOCATION_VALUE", - "name": "GEO_MATCH_LOCATION_VALUE" - }, - { - "value": "RATE_KEY", - "name": "RATE_KEY" - }, - { - "value": "RULE_TYPE", - "name": "RULE_TYPE" - }, - { - "value": "NEXT_MARKER", - "name": "NEXT_MARKER" - }, - { - "value": "RESOURCE_ARN", - "name": "RESOURCE_ARN" - }, - { - "value": "TAGS", - "name": "TAGS" - }, - { - "value": "TAG_KEYS", - "name": "TAG_KEYS" + "type": "enum", + "members": { + "CHANGE_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CHANGE_ACTION" } - ] + }, + "WAF_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WAF_ACTION" + } + }, + "WAF_OVERRIDE_ACTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "WAF_OVERRIDE_ACTION" + } + }, + "PREDICATE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PREDICATE_TYPE" + } + }, + "IPSET_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPSET_TYPE" + } + }, + "BYTE_MATCH_FIELD_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BYTE_MATCH_FIELD_TYPE" + } + }, + "SQL_INJECTION_MATCH_FIELD_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SQL_INJECTION_MATCH_FIELD_TYPE" + } + }, + "BYTE_MATCH_TEXT_TRANSFORMATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BYTE_MATCH_TEXT_TRANSFORMATION" + } + }, + "BYTE_MATCH_POSITIONAL_CONSTRAINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BYTE_MATCH_POSITIONAL_CONSTRAINT" + } + }, + "SIZE_CONSTRAINT_COMPARISON_OPERATOR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIZE_CONSTRAINT_COMPARISON_OPERATOR" + } + }, + "GEO_MATCH_LOCATION_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GEO_MATCH_LOCATION_TYPE" + } + }, + "GEO_MATCH_LOCATION_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GEO_MATCH_LOCATION_VALUE" + } + }, + "RATE_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RATE_KEY" + } + }, + "RULE_TYPE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RULE_TYPE" + } + }, + "NEXT_MARKER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NEXT_MARKER" + } + }, + "RESOURCE_ARN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESOURCE_ARN" + } + }, + "TAGS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TAGS" + } + }, + "TAG_KEYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TAG_KEYS" + } + } } }, "com.amazonaws.waf#ParameterExceptionParameter": { @@ -6800,26 +8084,32 @@ } }, "com.amazonaws.waf#ParameterExceptionReason": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INVALID_OPTION", - "name": "INVALID_OPTION" - }, - { - "value": "ILLEGAL_COMBINATION", - "name": "ILLEGAL_COMBINATION" - }, - { - "value": "ILLEGAL_ARGUMENT", - "name": "ILLEGAL_ARGUMENT" - }, - { - "value": "INVALID_TAG_KEY", - "name": "INVALID_TAG_KEY" + "type": "enum", + "members": { + "INVALID_OPTION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_OPTION" } - ] + }, + "ILLEGAL_COMBINATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ILLEGAL_COMBINATION" + } + }, + "ILLEGAL_ARGUMENT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ILLEGAL_ARGUMENT" + } + }, + "INVALID_TAG_KEY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_TAG_KEY" + } + } } }, "com.amazonaws.waf#PolicyString": { @@ -6829,7 +8119,7 @@ "min": 1, "max": 395000 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#PopulationSize": { @@ -6839,30 +8129,38 @@ } }, "com.amazonaws.waf#PositionalConstraint": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EXACTLY", - "name": "EXACTLY" - }, - { - "value": "STARTS_WITH", - "name": "STARTS_WITH" - }, - { - "value": "ENDS_WITH", - "name": "ENDS_WITH" - }, - { - "value": "CONTAINS", - "name": "CONTAINS" - }, - { - "value": "CONTAINS_WORD", - "name": "CONTAINS_WORD" + "type": "enum", + "members": { + "EXACTLY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXACTLY" + } + }, + "STARTS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STARTS_WITH" } - ] + }, + "ENDS_WITH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENDS_WITH" + } + }, + "CONTAINS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTAINS" + } + }, + "CONTAINS_WORD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTAINS_WORD" + } + } } }, "com.amazonaws.waf#Predicate": { @@ -6895,38 +8193,50 @@ } }, "com.amazonaws.waf#PredicateType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IPMatch", - "name": "IP_MATCH" - }, - { - "value": "ByteMatch", - "name": "BYTE_MATCH" - }, - { - "value": "SqlInjectionMatch", - "name": "SQL_INJECTION_MATCH" - }, - { - "value": "GeoMatch", - "name": "GEO_MATCH" - }, - { - "value": "SizeConstraint", - "name": "SIZE_CONSTRAINT" - }, - { - "value": "XssMatch", - "name": "XSS_MATCH" - }, - { - "value": "RegexMatch", - "name": "REGEX_MATCH" + "type": "enum", + "members": { + "IP_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IPMatch" } - ] + }, + "BYTE_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ByteMatch" + } + }, + "SQL_INJECTION_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SqlInjectionMatch" + } + }, + "GEO_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GeoMatch" + } + }, + "SIZE_CONSTRAINT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SizeConstraint" + } + }, + "XSS_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "XssMatch" + } + }, + "REGEX_MATCH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RegexMatch" + } + } } }, "com.amazonaws.waf#Predicates": { @@ -6971,6 +8281,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#PutLoggingConfigurationResponse": { @@ -6982,6 +8295,9 @@ "smithy.api#documentation": "

The LoggingConfiguration that you submitted in the request.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#PutPermissionPolicy": { @@ -7027,11 +8343,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#PutPermissionPolicyResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.waf#RateBasedRule": { "type": "structure", @@ -7083,14 +8405,14 @@ } }, "com.amazonaws.waf#RateKey": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "IP", - "name": "IP" + "type": "enum", + "members": { + "IP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IP" } - ] + } } }, "com.amazonaws.waf#RateLimit": { @@ -7349,7 +8671,7 @@ "min": 1, "max": 1224 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#ResourceId": { @@ -7359,7 +8681,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#ResourceName": { @@ -7369,7 +8691,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#Rule": { @@ -7560,7 +8882,7 @@ "min": 3, "max": 63 }, - "smithy.api#pattern": "^aws-waf-migration-[0-9A-Za-z\\.\\-_]*" + "smithy.api#pattern": "^aws-waf-migration-[0-9A-Za-z\\.\\-_]*$" } }, "com.amazonaws.waf#S3ObjectUrl": { @@ -7970,7 +9292,7 @@ "min": 1, "max": 128 }, - "smithy.api#pattern": ".*\\S.*" + "smithy.api#pattern": "\\S" } }, "com.amazonaws.waf#TagKeyList": { @@ -8047,11 +9369,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.waf#TagValue": { "type": "string", @@ -8064,34 +9392,44 @@ } }, "com.amazonaws.waf#TextTransformation": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "COMPRESS_WHITE_SPACE", - "name": "COMPRESS_WHITE_SPACE" - }, - { - "value": "HTML_ENTITY_DECODE", - "name": "HTML_ENTITY_DECODE" - }, - { - "value": "LOWERCASE", - "name": "LOWERCASE" - }, - { - "value": "CMD_LINE", - "name": "CMD_LINE" - }, - { - "value": "URL_DECODE", - "name": "URL_DECODE" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" } - ] + }, + "COMPRESS_WHITE_SPACE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPRESS_WHITE_SPACE" + } + }, + "HTML_ENTITY_DECODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HTML_ENTITY_DECODE" + } + }, + "LOWERCASE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOWERCASE" + } + }, + "CMD_LINE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CMD_LINE" + } + }, + "URL_DECODE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "URL_DECODE" + } + } } }, "com.amazonaws.waf#TimeWindow": { @@ -8171,11 +9509,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.waf#UpdateByteMatchSet": { "type": "operation", @@ -8212,7 +9556,34 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For each ByteMatchTuple object, \n\t\t\tyou specify the following values:

\n\t\t
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change a ByteMatchSetUpdate object, \n\t\t\t\tyou delete the existing object and add a new one.

    \n
  • \n
  • \n

    The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header.

    \n
  • \n
  • \n

    The bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to look for. For more information, including how you specify \n\t\t\t\tthe values for the AWS WAF API and the AWS CLI or SDKs, see TargetString in the ByteMatchTuple data type.

    \n
  • \n
  • \n

    Where to look, such as at the beginning or the end of a query string.

    \n
  • \n
  • \n

    Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string.

    \n
  • \n
\n\t\t

For example, you can add a ByteMatchSetUpdate object that matches web requests in which User-Agent headers contain \n\t\t\tthe string BadBot. You can then configure AWS WAF to block those requests.

\t\t\n\t\t

To create and configure a ByteMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Create a ByteMatchSet. For more information, see CreateByteMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateByteMatchSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateByteMatchSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For each ByteMatchTuple object, \n\t\t\tyou specify the following values:

\n\t\t
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change a ByteMatchSetUpdate object, \n\t\t\t\tyou delete the existing object and add a new one.

    \n
  • \n
  • \n

    The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header.

    \n
  • \n
  • \n

    The bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to look for. For more information, including how you specify \n\t\t\t\tthe values for the AWS WAF API and the AWS CLI or SDKs, see TargetString in the ByteMatchTuple data type.

    \n
  • \n
  • \n

    Where to look, such as at the beginning or the end of a query string.

    \n
  • \n
  • \n

    Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string.

    \n
  • \n
\n\t\t

For example, you can add a ByteMatchSetUpdate object that matches web requests in which User-Agent headers contain \n\t\t\tthe string BadBot. You can then configure AWS WAF to block those requests.

\t\t\n\t\t

To create and configure a ByteMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Create a ByteMatchSet. For more information, see CreateByteMatchSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateByteMatchSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateByteMatchSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a byte match set", + "documentation": "The following example deletes a ByteMatchTuple object (filters) in an byte match set with the ID exampleIDs3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "ByteMatchSetId": "exampleIDs3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "ByteMatchTuple": { + "FieldToMatch": { + "Data": "referer", + "Type": "HEADER" + }, + "PositionalConstraint": "CONTAINS", + "TargetString": "badrefer1", + "TextTransformation": "NONE" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#UpdateByteMatchSetRequest": { @@ -8239,6 +9610,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateByteMatchSetResponse": { @@ -8250,6 +9624,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateByteMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateGeoMatchSet": { @@ -8317,6 +9694,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateGeoMatchSetResponse": { @@ -8328,6 +9708,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateGeoMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateIPSet": { @@ -8368,7 +9751,29 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n

Inserts or deletes IPSetDescriptor objects in an\n IPSet. For each IPSetDescriptor object, you specify the following\n values:

\n
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change an\n IPSetDescriptor object, you delete the existing object and add a new\n one.

    \n
  • \n
  • \n

    The IP address version, IPv4 or IPv6.

    \n
  • \n
  • \n

    The IP address in CIDR notation, for example, 192.0.2.0/24 (for\n the range of IP addresses from 192.0.2.0 to 192.0.2.255) or\n 192.0.2.44/32 (for the individual IP address\n 192.0.2.44).

    \n
  • \n
\n

AWS WAF supports IPv4 address ranges: /8 and any range between /16 through /32. AWS\n WAF supports IPv6 address ranges: /24, /32, /48, /56, /64, and /128. For more\n information about CIDR notation, see the Wikipedia entry Classless\n Inter-Domain Routing.

\n

IPv6 addresses can be represented using any of the following formats:

\n
    \n
  • \n

    1111:0000:0000:0000:0000:0000:0000:0111/128

    \n
  • \n
  • \n

    1111:0:0:0:0:0:0:0111/128

    \n
  • \n
  • \n

    1111::0111/128

    \n
  • \n
  • \n

    1111::111/128

    \n
  • \n
\n

You use an IPSet to specify which web requests you want to allow or\n block based on the IP addresses that the requests originated from. For example, if you're\n receiving a lot of requests from one or a small number of IP addresses and you want to\n block the requests, you can create an IPSet that specifies those IP addresses,\n and then configure AWS WAF to block the requests.

\n

To create and configure an IPSet, perform the following steps:

\n
    \n
  1. \n

    Submit a CreateIPSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide\n in the ChangeToken parameter of an UpdateIPSet\n request.

    \n
  4. \n
  5. \n

    Submit an UpdateIPSet request to specify the IP addresses that you\n want AWS WAF to watch for.

    \n
  6. \n
\n

When you update an IPSet, you specify the IP addresses that you want to\n add and/or the IP addresses that you want to delete. If you want to change an IP address,\n you delete the existing IP address and add the new one.

\n

You can insert a maximum of 1000 addresses in a single\n request.

\n

For more information about how to use the AWS WAF API to allow or block HTTP\n requests, see the AWS WAF\n Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n

Inserts or deletes IPSetDescriptor objects in an\n IPSet. For each IPSetDescriptor object, you specify the following\n values:

\n
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change an\n IPSetDescriptor object, you delete the existing object and add a new\n one.

    \n
  • \n
  • \n

    The IP address version, IPv4 or IPv6.

    \n
  • \n
  • \n

    The IP address in CIDR notation, for example, 192.0.2.0/24 (for\n the range of IP addresses from 192.0.2.0 to 192.0.2.255) or\n 192.0.2.44/32 (for the individual IP address\n 192.0.2.44).

    \n
  • \n
\n

AWS WAF supports IPv4 address ranges: /8 and any range between /16 through /32. AWS\n WAF supports IPv6 address ranges: /24, /32, /48, /56, /64, and /128. For more\n information about CIDR notation, see the Wikipedia entry Classless\n Inter-Domain Routing.

\n

IPv6 addresses can be represented using any of the following formats:

\n
    \n
  • \n

    1111:0000:0000:0000:0000:0000:0000:0111/128

    \n
  • \n
  • \n

    1111:0:0:0:0:0:0:0111/128

    \n
  • \n
  • \n

    1111::0111/128

    \n
  • \n
  • \n

    1111::111/128

    \n
  • \n
\n

You use an IPSet to specify which web requests you want to allow or\n block based on the IP addresses that the requests originated from. For example, if you're\n receiving a lot of requests from one or a small number of IP addresses and you want to\n block the requests, you can create an IPSet that specifies those IP addresses,\n and then configure AWS WAF to block the requests.

\n

To create and configure an IPSet, perform the following steps:

\n
    \n
  1. \n

    Submit a CreateIPSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide\n in the ChangeToken parameter of an UpdateIPSet\n request.

    \n
  4. \n
  5. \n

    Submit an UpdateIPSet request to specify the IP addresses that you\n want AWS WAF to watch for.

    \n
  6. \n
\n

When you update an IPSet, you specify the IP addresses that you want to\n add and/or the IP addresses that you want to delete. If you want to change an IP address,\n you delete the existing IP address and add the new one.

\n

You can insert a maximum of 1000 addresses in a single\n request.

\n

For more information about how to use the AWS WAF API to allow or block HTTP\n requests, see the AWS WAF\n Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update an IP set", + "documentation": "The following example deletes an IPSetDescriptor object in an IP match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "IPSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "IPSetDescriptor": { + "Type": "IPV4", + "Value": "192.0.2.44/32" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#UpdateIPSetRequest": { @@ -8395,6 +9800,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateIPSetResponse": { @@ -8406,6 +9814,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateIPSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateRateBasedRule": { @@ -8481,6 +9892,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateRateBasedRuleResponse": { @@ -8492,6 +9906,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the\n UpdateRateBasedRule request. You can also use this value to query the\n status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateRegexMatchSet": { @@ -8556,6 +9973,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateRegexMatchSetResponse": { @@ -8567,6 +9987,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateRegexMatchSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateRegexPatternSet": { @@ -8631,6 +10054,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateRegexPatternSetResponse": { @@ -8642,6 +10068,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateRegexPatternSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateRule": { @@ -8682,7 +10111,30 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes Predicate objects in a Rule. Each\n Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests\n that you want to allow, block, or count. If you add more than one predicate to a\n Rule, a request must match all of the specifications to be allowed,\n blocked, or counted. For example, suppose\n that\n you add the following to a Rule:

\t\t\n\t\t
    \n
  • \n

    A ByteMatchSet that matches the value BadBot in the User-Agent header

    \n
  • \n
  • \n

    An IPSet that matches the IP address 192.0.2.44\n

    \n
  • \n
\t\t\n\t\t

You then add the Rule to a WebACL and specify that you want to block requests that satisfy the Rule. \n\t\t\tFor a request to be blocked, the User-Agent header in the request must contain the value BadBot \n\t\t\t and the request must originate from the IP address 192.0.2.44.

\t\t\n\t\t

To create and configure a Rule, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in the Rule.

    \n
  2. \n
  3. \n

    Create the Rule. See CreateRule.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateRule request.

    \n
  6. \n
  7. \n

    Submit an UpdateRule request to add predicates to the Rule.

    \n
  8. \n
  9. \n

    Create and update a WebACL that contains the Rule. See CreateWebACL.

    \n
  10. \n
\n\t\t

If you want to replace one ByteMatchSet or IPSet with another, you delete the existing one and \n\t\t\tadd the new one.

\t\t\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes Predicate objects in a Rule. Each\n Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests\n that you want to allow, block, or count. If you add more than one predicate to a\n Rule, a request must match all of the specifications to be allowed,\n blocked, or counted. For example, suppose\n that\n you add the following to a Rule:

\t\t\n\t\t
    \n
  • \n

    A ByteMatchSet that matches the value BadBot in the User-Agent header

    \n
  • \n
  • \n

    An IPSet that matches the IP address 192.0.2.44\n

    \n
  • \n
\t\t\n\t\t

You then add the Rule to a WebACL and specify that you want to block requests that satisfy the Rule. \n\t\t\tFor a request to be blocked, the User-Agent header in the request must contain the value BadBot \n\t\t\t and the request must originate from the IP address 192.0.2.44.

\t\t\n\t\t

To create and configure a Rule, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in the Rule.

    \n
  2. \n
  3. \n

    Create the Rule. See CreateRule.

    \n
  4. \n
  5. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateRule request.

    \n
  6. \n
  7. \n

    Submit an UpdateRule request to add predicates to the Rule.

    \n
  8. \n
  9. \n

    Create and update a WebACL that contains the Rule. See CreateWebACL.

    \n
  10. \n
\n\t\t

If you want to replace one ByteMatchSet or IPSet with another, you delete the existing one and \n\t\t\tadd the new one.

\t\t\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a rule", + "documentation": "The following example deletes a Predicate object in a rule with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "RuleId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "Predicate": { + "DataId": "MyByteMatchSetID", + "Negated": false, + "Type": "ByteMatch" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#UpdateRuleGroup": { @@ -8744,6 +10196,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateRuleGroupResponse": { @@ -8755,6 +10210,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateRuleGroup request. You can also use this value \n to query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateRuleRequest": { @@ -8781,6 +10239,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateRuleResponse": { @@ -8792,6 +10253,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateRule request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateSizeConstraintSet": { @@ -8832,7 +10296,33 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. For each SizeConstraint object, \n\t\t\tyou specify the following values:

\n\t\t
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change a SizeConstraintSetUpdate object, \n\t\t\t\tyou delete the existing object and add a new one.

    \n
  • \n
  • \n

    The part of a web request that you want AWS WAF to evaluate, such as the length of a query string or the length of the \n\t\t\t\tUser-Agent header.

    \n
  • \n
  • \n

    Whether to perform any transformations on the request, such as converting it to lowercase, before checking its length. \n\t\t\t\tNote that transformations of the request body are not supported because the AWS resource forwards only the first 8192 bytes \n\t\t\t\tof your request to AWS WAF.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
  • \n

    A ComparisonOperator used for evaluating the selected part of the request against the specified Size, such as \n\t\t\t\tequals, greater than, less than, and so on.

    \n
  • \n
  • \n

    The length, in bytes, that you want AWS WAF to watch for in selected part of the request. The length is computed after applying the transformation.

    \n
  • \n
\n\t\t

For example, you can add a SizeConstraintSetUpdate object that matches web requests in which the length of the \n\t\t\tUser-Agent header is greater than 100 bytes. You can then configure AWS WAF to block those requests.

\n\t\t \t

To create and configure a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. For each SizeConstraint object, \n\t\t\tyou specify the following values:

\n\t\t
    \n
  • \n

    Whether to insert or delete the object from the array. If you want to change a SizeConstraintSetUpdate object, \n\t\t\t\tyou delete the existing object and add a new one.

    \n
  • \n
  • \n

    The part of a web request that you want AWS WAF to evaluate, such as the length of a query string or the length of the \n\t\t\t\tUser-Agent header.

    \n
  • \n
  • \n

    Whether to perform any transformations on the request, such as converting it to lowercase, before checking its length. \n\t\t\t\tNote that transformations of the request body are not supported because the AWS resource forwards only the first 8192 bytes \n\t\t\t\tof your request to AWS WAF.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
  • \n

    A ComparisonOperator used for evaluating the selected part of the request against the specified Size, such as \n\t\t\t\tequals, greater than, less than, and so on.

    \n
  • \n
  • \n

    The length, in bytes, that you want AWS WAF to watch for in selected part of the request. The length is computed after applying the transformation.

    \n
  • \n
\n\t\t

For example, you can add a SizeConstraintSetUpdate object that matches web requests in which the length of the \n\t\t\tUser-Agent header is greater than 100 bytes. You can then configure AWS WAF to block those requests.

\n\t\t \t

To create and configure a SizeConstraintSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateSizeConstraintSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect \n\t\t\t\t(for example, the header or the URI) and the value that you want AWS WAF to watch for.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a size constraint set", + "documentation": "The following example deletes a SizeConstraint object (filters) in a size constraint set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SizeConstraintSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "SizeConstraint": { + "ComparisonOperator": "GT", + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "Size": 0, + "TextTransformation": "NONE" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#UpdateSizeConstraintSetRequest": { @@ -8859,6 +10349,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateSizeConstraintSetResponse": { @@ -8870,6 +10363,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateSizeConstraintSet request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateSqlInjectionMatchSet": { @@ -8907,7 +10403,31 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. \n\t\t\tFor each SqlInjectionMatchTuple object, you specify the following values:

\n\t\t
    \n
  • \n

    \n Action: Whether to insert the object into or delete the object from the array. To change a \n\t\t\t\tSqlInjectionMatchTuple, you delete the existing object and add a new one.

    \n
  • \n
  • \n

    \n FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, \n\t\t\t\tthe name of the header or parameter.

    \n
  • \n
  • \n

    \n TextTransformation: Which text transformation, if any, to perform on the web request before \n\t\t\t\tinspecting the request for snippets of malicious SQL code.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
\n\t\t

You use SqlInjectionMatchSet objects to specify which CloudFront\n requests that\n you want to allow, block, or count. For example, if you're receiving\n requests that contain snippets of SQL code in the query string and you want to block the\n requests, you can create a SqlInjectionMatchSet with the applicable settings,\n and then configure AWS WAF to block the requests.

\n\t\t

To create and configure a SqlInjectionMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Submit a CreateSqlInjectionMatchSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests that you want AWS WAF to \n\t\t\t\tinspect for snippets of SQL code.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. \n\t\t\tFor each SqlInjectionMatchTuple object, you specify the following values:

\n\t\t
    \n
  • \n

    \n Action: Whether to insert the object into or delete the object from the array. To change a \n\t\t\t\tSqlInjectionMatchTuple, you delete the existing object and add a new one.

    \n
  • \n
  • \n

    \n FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, \n\t\t\t\tthe name of the header or parameter.

    \n
  • \n
  • \n

    \n TextTransformation: Which text transformation, if any, to perform on the web request before \n\t\t\t\tinspecting the request for snippets of malicious SQL code.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
\n\t\t

You use SqlInjectionMatchSet objects to specify which CloudFront\n requests that\n you want to allow, block, or count. For example, if you're receiving\n requests that contain snippets of SQL code in the query string and you want to block the\n requests, you can create a SqlInjectionMatchSet with the applicable settings,\n and then configure AWS WAF to block the requests.

\n\t\t

To create and configure a SqlInjectionMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Submit a CreateSqlInjectionMatchSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests that you want AWS WAF to \n\t\t\t\tinspect for snippets of SQL code.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a SQL injection match set", + "documentation": "The following example deletes a SqlInjectionMatchTuple object (filters) in a SQL injection match set with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "SqlInjectionMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "SqlInjectionMatchTuple": { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#UpdateSqlInjectionMatchSetRequest": { @@ -8936,7 +10456,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to update a SqlInjectionMatchSet.

" + "smithy.api#documentation": "

A request to update a SqlInjectionMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateSqlInjectionMatchSetResponse": { @@ -8950,7 +10471,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to an UpdateSqlInjectionMatchSets request.

" + "smithy.api#documentation": "

The response to an UpdateSqlInjectionMatchSets request.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateWebACL": { @@ -8994,7 +10516,35 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies \n\t\t\tweb requests that you want to allow, block, or count. When you update a WebACL, you specify the following values:

\n\t\t
    \n
  • \n

    A default action for the WebACL, either ALLOW or BLOCK. \n\t\t\t\tAWS WAF performs the default action if a request doesn't match the criteria in any of the Rules in a WebACL.

    \n
  • \n
  • \n

    The Rules that you want to add\n or\n delete. If you want to replace one Rule with another, you delete the\n existing Rule and add the new one.

    \n
  • \n
  • \n

    For each Rule, whether you want AWS WAF to allow requests, block requests, or count requests that match \n\t\t\t\tthe conditions in the Rule.

    \n
  • \n
  • \n

    The order in which you want AWS WAF to evaluate the Rules in a\n WebACL. If you add more than one Rule to a\n WebACL, AWS WAF evaluates each request against the Rules\n in order based on the value of Priority. (The Rule that has\n the lowest value for Priority is evaluated first.) When a web request\n matches all\n the\n predicates (such as ByteMatchSets and IPSets) in a\n Rule, AWS WAF immediately takes the corresponding action, allow or\n block, and doesn't evaluate the request against the remaining Rules in\n the WebACL, if any.

    \n
  • \n
\n\t\t\n\t\t

To create and configure a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in Rules. \n\t\t\t\tFor more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, \n\t\t\t\tCreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Create and update the Rules that you want to include in the WebACL. For more information, see \n\t\t\t\tCreateRule and UpdateRule.

    \n
  4. \n
  5. \n

    Create a WebACL. See CreateWebACL.

    \n
  6. \n
  7. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateWebACL request.

    \n
  8. \n
  9. \n

    Submit an UpdateWebACL request to specify the Rules\n that you want to include in the WebACL, to specify the default action,\n and to associate the WebACL with a CloudFront distribution.

    \n

    The ActivatedRule can be a rule group. If you specify a rule group\n as your\n ActivatedRule\n ,\n you can exclude specific rules from that rule group.

    \n

    If you already have a rule group associated with a web ACL and want to submit\n an UpdateWebACL request to exclude certain rules from that rule group,\n you must first remove the rule group from the web ACL, the re-insert it again,\n specifying the excluded rules.\n For details,\n see\n ActivatedRule$ExcludedRules\n .\n

    \n
  10. \n
\n

Be aware that if you try to add a RATE_BASED rule to a web ACL without setting the rule type when first creating the rule, the UpdateWebACL request will fail because the request tries to add a REGULAR rule (the default rule type) with the specified ID, which does not exist. \t\t

\t\t\t\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies \n\t\t\tweb requests that you want to allow, block, or count. When you update a WebACL, you specify the following values:

\n\t\t
    \n
  • \n

    A default action for the WebACL, either ALLOW or BLOCK. \n\t\t\t\tAWS WAF performs the default action if a request doesn't match the criteria in any of the Rules in a WebACL.

    \n
  • \n
  • \n

    The Rules that you want to add\n or\n delete. If you want to replace one Rule with another, you delete the\n existing Rule and add the new one.

    \n
  • \n
  • \n

    For each Rule, whether you want AWS WAF to allow requests, block requests, or count requests that match \n\t\t\t\tthe conditions in the Rule.

    \n
  • \n
  • \n

    The order in which you want AWS WAF to evaluate the Rules in a\n WebACL. If you add more than one Rule to a\n WebACL, AWS WAF evaluates each request against the Rules\n in order based on the value of Priority. (The Rule that has\n the lowest value for Priority is evaluated first.) When a web request\n matches all\n the\n predicates (such as ByteMatchSets and IPSets) in a\n Rule, AWS WAF immediately takes the corresponding action, allow or\n block, and doesn't evaluate the request against the remaining Rules in\n the WebACL, if any.

    \n
  • \n
\n\t\t\n\t\t

To create and configure a WebACL, perform the following steps:

\n\t\t
    \n
  1. \n

    Create and update the predicates that you want to include in Rules. \n\t\t\t\tFor more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, \n\t\t\t\tCreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    \n
  2. \n
  3. \n

    Create and update the Rules that you want to include in the WebACL. For more information, see \n\t\t\t\tCreateRule and UpdateRule.

    \n
  4. \n
  5. \n

    Create a WebACL. See CreateWebACL.

    \n
  6. \n
  7. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateWebACL request.

    \n
  8. \n
  9. \n

    Submit an UpdateWebACL request to specify the Rules\n that you want to include in the WebACL, to specify the default action,\n and to associate the WebACL with a CloudFront distribution.

    \n

    The ActivatedRule can be a rule group. If you specify a rule group\n as your\n ActivatedRule\n ,\n you can exclude specific rules from that rule group.

    \n

    If you already have a rule group associated with a web ACL and want to submit\n an UpdateWebACL request to exclude certain rules from that rule group,\n you must first remove the rule group from the web ACL, the re-insert it again,\n specifying the excluded rules.\n For details,\n see\n ActivatedRule$ExcludedRules\n .\n

    \n
  10. \n
\n

Be aware that if you try to add a RATE_BASED rule to a web ACL without setting the rule type when first creating the rule, the UpdateWebACL request will fail because the request tries to add a REGULAR rule (the default rule type) with the specified ID, which does not exist. \t\t

\t\t\t\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update a Web ACL", + "documentation": "The following example deletes an ActivatedRule object in a WebACL with the ID webacl-1472061481310.", + "input": { + "WebACLId": "webacl-1472061481310", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "ActivatedRule": { + "Action": { + "Type": "ALLOW" + }, + "Priority": 1, + "RuleId": "WAFRule-1-Example" + } + } + ], + "DefaultAction": { + "Type": "ALLOW" + } + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#UpdateWebACLRequest": { @@ -9026,6 +10576,9 @@ "smithy.api#documentation": "

A default action for the web ACL, either ALLOW or BLOCK. AWS WAF performs the default\n action if a request doesn't match the criteria in any of the rules in a web ACL.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateWebACLResponse": { @@ -9037,6 +10590,9 @@ "smithy.api#documentation": "

The ChangeToken that you used to submit the UpdateWebACL request. You can also use this value \n\t\t\tto query the status of the request. For more information, see GetChangeTokenStatus.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.waf#UpdateXssMatchSet": { @@ -9074,7 +10630,31 @@ } ], "traits": { - "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. \n\t\t\tFor each XssMatchTuple object, you specify the following values:

\n\t\t
    \n
  • \n

    \n Action: Whether to insert the object into or delete the object from the\n array. To change an\n XssMatchTuple, you delete the existing object and add a new\n one.

    \n
  • \n
  • \n

    \n FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, \n\t\t\t\tthe name of the header or parameter.

    \n
  • \n
  • \n

    \n TextTransformation: Which text transformation, if any, to perform on the web request before \n\t\t\t\tinspecting the request for cross-site scripting attacks.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
\n\t\t

You use XssMatchSet objects to specify which CloudFront requests\n that\n you want to allow, block, or count. For example, if you're receiving\n requests that contain cross-site scripting attacks in the request body and you want to\n block the requests, you can create an XssMatchSet with the applicable\n settings, and then configure AWS WAF to block the requests.

\t\t\n\t\t

To create and configure an XssMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Submit a CreateXssMatchSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateXssMatchSet request to specify the parts of web requests that you want AWS WAF to \n\t\t\t\tinspect for cross-site scripting attacks.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

" + "smithy.api#documentation": "\n

This is AWS WAF Classic documentation. For\n more information, see AWS\n WAF Classic in the developer guide.

\n

\n For the latest version of AWS\n WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

\n
\n\t\t

Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. \n\t\t\tFor each XssMatchTuple object, you specify the following values:

\n\t\t
    \n
  • \n

    \n Action: Whether to insert the object into or delete the object from the\n array. To change an\n XssMatchTuple, you delete the existing object and add a new\n one.

    \n
  • \n
  • \n

    \n FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, \n\t\t\t\tthe name of the header or parameter.

    \n
  • \n
  • \n

    \n TextTransformation: Which text transformation, if any, to perform on the web request before \n\t\t\t\tinspecting the request for cross-site scripting attacks.

    \n\t\t\t\t

    You can only specify a single type of TextTransformation.

    \n
  • \n
\n\t\t

You use XssMatchSet objects to specify which CloudFront requests\n that\n you want to allow, block, or count. For example, if you're receiving\n requests that contain cross-site scripting attacks in the request body and you want to\n block the requests, you can create an XssMatchSet with the applicable\n settings, and then configure AWS WAF to block the requests.

\t\t\n\t\t

To create and configure an XssMatchSet, perform the following steps:

\n\t\t
    \n
  1. \n

    Submit a CreateXssMatchSet request.

    \n
  2. \n
  3. \n

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an \n\t\t\t\tUpdateIPSet request.

    \n
  4. \n
  5. \n

    Submit an UpdateXssMatchSet request to specify the parts of web requests that you want AWS WAF to \n\t\t\t\tinspect for cross-site scripting attacks.

    \n
  6. \n
\n\t\t

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the \n\t\t\tAWS WAF Developer Guide.

", + "smithy.api#examples": [ + { + "title": "To update an XSS match set", + "documentation": "The following example deletes an XssMatchTuple object (filters) in an XssMatchSet with the ID example1ds3t-46da-4fdb-b8d5-abc321j569j5.", + "input": { + "XssMatchSetId": "example1ds3t-46da-4fdb-b8d5-abc321j569j5", + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f", + "Updates": [ + { + "Action": "DELETE", + "XssMatchTuple": { + "FieldToMatch": { + "Type": "QUERY_STRING" + }, + "TextTransformation": "URL_DECODE" + } + } + ] + }, + "output": { + "ChangeToken": "abcd12f2-46da-4fdb-b8d5-fbd4c466928f" + } + } + ] } }, "com.amazonaws.waf#UpdateXssMatchSetRequest": { @@ -9103,7 +10683,8 @@ } }, "traits": { - "smithy.api#documentation": "

A request to update an XssMatchSet.

" + "smithy.api#documentation": "

A request to update an XssMatchSet.

", + "smithy.api#input": {} } }, "com.amazonaws.waf#UpdateXssMatchSetResponse": { @@ -9117,7 +10698,8 @@ } }, "traits": { - "smithy.api#documentation": "

The response to an UpdateXssMatchSets request.

" + "smithy.api#documentation": "

The response to an UpdateXssMatchSets request.

", + "smithy.api#output": {} } }, "com.amazonaws.waf#WAFBadRequestException": { @@ -9372,22 +10954,26 @@ } }, "com.amazonaws.waf#WafActionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "BLOCK", - "name": "BLOCK" - }, - { - "value": "ALLOW", - "name": "ALLOW" - }, - { - "value": "COUNT", - "name": "COUNT" + "type": "enum", + "members": { + "BLOCK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "BLOCK" } - ] + }, + "ALLOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALLOW" + } + }, + "COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COUNT" + } + } } }, "com.amazonaws.waf#WafOverrideAction": { @@ -9406,37 +10992,43 @@ } }, "com.amazonaws.waf#WafOverrideActionType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "NONE", - "name": "NONE" - }, - { - "value": "COUNT", - "name": "COUNT" + "type": "enum", + "members": { + "NONE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "NONE" } - ] + }, + "COUNT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COUNT" + } + } } }, "com.amazonaws.waf#WafRuleType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "REGULAR", - "name": "REGULAR" - }, - { - "value": "RATE_BASED", - "name": "RATE_BASED" - }, - { - "value": "GROUP", - "name": "GROUP" + "type": "enum", + "members": { + "REGULAR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "REGULAR" } - ] + }, + "RATE_BASED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RATE_BASED" + } + }, + "GROUP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "GROUP" + } + } } }, "com.amazonaws.waf#WebACL": { diff --git a/codegen/sdk-codegen/aws-models/wellarchitected.json b/codegen/sdk-codegen/aws-models/wellarchitected.json index 1f09035ce50..abee59b05c2 100644 --- a/codegen/sdk-codegen/aws-models/wellarchitected.json +++ b/codegen/sdk-codegen/aws-models/wellarchitected.json @@ -8146,52 +8146,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -8199,13 +8203,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -8215,224 +8228,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://wellarchitected-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://wellarchitected-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://wellarchitected-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://wellarchitected-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://wellarchitected.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://wellarchitected.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://wellarchitected.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://wellarchitected.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/wisdom.json b/codegen/sdk-codegen/aws-models/wisdom.json index 75e64a99513..3bff84f6530 100644 --- a/codegen/sdk-codegen/aws-models/wisdom.json +++ b/codegen/sdk-codegen/aws-models/wisdom.json @@ -4196,52 +4196,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -4249,13 +4253,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -4265,224 +4278,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://wisdom-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://wisdom-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://wisdom-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://wisdom-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://wisdom.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://wisdom.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://wisdom.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://wisdom.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, diff --git a/codegen/sdk-codegen/aws-models/workdocs.json b/codegen/sdk-codegen/aws-models/workdocs.json index 2a788b5401c..9edfcd76869 100644 --- a/codegen/sdk-codegen/aws-models/workdocs.json +++ b/codegen/sdk-codegen/aws-models/workdocs.json @@ -243,52 +243,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -296,13 +300,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -312,224 +325,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://workdocs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://workdocs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://workdocs-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://workdocs-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://workdocs.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://workdocs.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://workdocs.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://workdocs.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -543,9 +507,9 @@ } }, "params": { + "Region": "ap-northeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-northeast-1" + "UseDualStack": false } }, { @@ -556,9 +520,9 @@ } }, "params": { + "Region": "ap-southeast-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-1" + "UseDualStack": false } }, { @@ -569,9 +533,9 @@ } }, "params": { + "Region": "ap-southeast-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "ap-southeast-2" + "UseDualStack": false } }, { @@ -582,9 +546,9 @@ } }, "params": { + "Region": "eu-west-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "eu-west-1" + "UseDualStack": false } }, { @@ -595,9 +559,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -608,9 +572,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-east-1" + "UseDualStack": false } }, { @@ -621,9 +585,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -634,9 +598,9 @@ } }, "params": { + "Region": "us-west-2", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-west-2" + "UseDualStack": false } }, { @@ -647,9 +611,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -660,9 +624,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-east-1" + "UseDualStack": true } }, { @@ -673,9 +637,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -686,9 +650,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -699,9 +663,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "cn-north-1" + "UseDualStack": true } }, { @@ -712,9 +676,9 @@ } }, "params": { + "Region": "cn-north-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "cn-north-1" + "UseDualStack": false } }, { @@ -725,9 +689,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -738,9 +702,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-gov-east-1" + "UseDualStack": false } }, { @@ -751,9 +715,9 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": true, - "Region": "us-gov-east-1" + "UseDualStack": true } }, { @@ -764,9 +728,20 @@ } }, "params": { + "Region": "us-gov-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-gov-east-1" + "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 } }, { @@ -777,9 +752,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -790,9 +776,20 @@ } }, "params": { + "Region": "us-iso-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-iso-east-1" + "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 } }, { @@ -803,9 +800,20 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": true, - "UseDualStack": false, - "Region": "us-isob-east-1" + "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 } }, { @@ -816,9 +824,9 @@ } }, "params": { + "Region": "us-isob-east-1", "UseFIPS": false, - "UseDualStack": false, - "Region": "us-isob-east-1" + "UseDualStack": false } }, { @@ -829,9 +837,9 @@ } }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -854,9 +862,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": true, "UseDualStack": false, - "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -866,11 +874,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { + "Region": "us-east-1", "UseFIPS": false, "UseDualStack": true, - "Region": "us-east-1", "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/worklink.json b/codegen/sdk-codegen/aws-models/worklink.json index da3538d2a3d..5ef9ccf2c6b 100644 --- a/codegen/sdk-codegen/aws-models/worklink.json +++ b/codegen/sdk-codegen/aws-models/worklink.json @@ -105,11 +105,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#AssociateDomainResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#AssociateWebsiteAuthorizationProvider": { "type": "operation", @@ -174,6 +180,9 @@ "smithy.api#documentation": "

The domain name of the authorization provider. This applies only to SAML-based\n authorization providers.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#AssociateWebsiteAuthorizationProviderResponse": { @@ -185,6 +194,9 @@ "smithy.api#documentation": "

A unique identifier for the authorization provider.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#AssociateWebsiteCertificateAuthority": { @@ -250,6 +262,9 @@ "smithy.api#documentation": "

The certificate name to display.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#AssociateWebsiteCertificateAuthorityResponse": { @@ -261,6 +276,9 @@ "smithy.api#documentation": "

A unique identifier for the CA.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#AuditStreamArn": { @@ -270,14 +288,14 @@ } }, "com.amazonaws.worklink#AuthorizationProviderType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SAML", - "name": "SAML" + "type": "enum", + "members": { + "SAML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SAML" } - ] + } } }, "com.amazonaws.worklink#Boolean": { @@ -380,6 +398,9 @@ "smithy.api#documentation": "

The tags to add to the resource. A tag is a key-value pair.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#CreateFleetResponse": { @@ -391,6 +412,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the fleet.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#DateTime": { @@ -443,11 +467,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DeleteFleetResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#DescribeAuditStreamConfiguration": { "type": "operation", @@ -496,6 +526,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DescribeAuditStreamConfigurationResponse": { @@ -507,6 +540,9 @@ "smithy.api#documentation": "

The ARN of the Amazon Kinesis data stream that will receive the audit events.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#DescribeCompanyNetworkConfiguration": { @@ -556,6 +592,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DescribeCompanyNetworkConfigurationResponse": { @@ -579,6 +618,9 @@ "smithy.api#documentation": "

The security groups associated with access to the provided subnets.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#DescribeDevice": { @@ -665,6 +707,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DescribeDevicePolicyConfigurationResponse": { @@ -676,6 +721,9 @@ "smithy.api#documentation": "

The certificate chain, including intermediate certificates and the root certificate authority certificate used to issue device certificates.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#DescribeDeviceRequest": { @@ -695,6 +743,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DescribeDeviceResponse": { @@ -754,6 +805,9 @@ "smithy.api#documentation": "

The user name associated with the device.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#DescribeDomain": { @@ -810,6 +864,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DescribeDomainResponse": { @@ -845,6 +902,9 @@ "smithy.api#documentation": "

The ARN of an issued ACM certificate that is valid for the domain being associated.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#DescribeFleetMetadata": { @@ -894,6 +954,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DescribeFleetMetadataResponse": { @@ -947,6 +1010,9 @@ "smithy.api#documentation": "

The tags attached to the resource. A tag is a key-value pair.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#DescribeIdentityProviderConfiguration": { @@ -996,6 +1062,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DescribeIdentityProviderConfigurationResponse": { @@ -1019,6 +1088,9 @@ "smithy.api#documentation": "

The SAML metadata document provided by the user’s identity provider.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#DescribeWebsiteCertificateAuthority": { @@ -1075,6 +1147,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DescribeWebsiteCertificateAuthorityResponse": { @@ -1098,6 +1173,9 @@ "smithy.api#documentation": "

The certificate name to display.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#DeviceManufacturer": { @@ -1146,18 +1224,20 @@ } }, "com.amazonaws.worklink#DeviceStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "SIGNED_OUT", - "name": "SIGNED_OUT" + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "SIGNED_OUT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIGNED_OUT" } - ] + } } }, "com.amazonaws.worklink#DeviceSummary": { @@ -1240,11 +1320,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DisassociateDomainResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#DisassociateWebsiteAuthorizationProvider": { "type": "operation", @@ -1303,11 +1389,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DisassociateWebsiteAuthorizationProviderResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#DisassociateWebsiteCertificateAuthority": { "type": "operation", @@ -1363,11 +1455,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#DisassociateWebsiteCertificateAuthorityResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#DisplayName": { "type": "string", @@ -1389,42 +1487,56 @@ } }, "com.amazonaws.worklink#DomainStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "PENDING_VALIDATION", - "name": "PENDING_VALIDATION" - }, - { - "value": "ASSOCIATING", - "name": "ASSOCIATING" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "INACTIVE", - "name": "INACTIVE" - }, - { - "value": "DISASSOCIATING", - "name": "DISASSOCIATING" - }, - { - "value": "DISASSOCIATED", - "name": "DISASSOCIATED" - }, - { - "value": "FAILED_TO_ASSOCIATE", - "name": "FAILED_TO_ASSOCIATE" - }, - { - "value": "FAILED_TO_DISASSOCIATE", - "name": "FAILED_TO_DISASSOCIATE" + "type": "enum", + "members": { + "PENDING_VALIDATION": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING_VALIDATION" } - ] + }, + "ASSOCIATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSOCIATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "INACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INACTIVE" + } + }, + "DISASSOCIATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISASSOCIATING" + } + }, + "DISASSOCIATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISASSOCIATED" + } + }, + "FAILED_TO_ASSOCIATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED_TO_ASSOCIATE" + } + }, + "FAILED_TO_DISASSOCIATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED_TO_DISASSOCIATE" + } + } } }, "com.amazonaws.worklink#DomainSummary": { @@ -1491,34 +1603,44 @@ } }, "com.amazonaws.worklink#FleetStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "CREATING", - "name": "CREATING" - }, - { - "value": "ACTIVE", - "name": "ACTIVE" - }, - { - "value": "DELETING", - "name": "DELETING" - }, - { - "value": "DELETED", - "name": "DELETED" - }, - { - "value": "FAILED_TO_CREATE", - "name": "FAILED_TO_CREATE" - }, - { - "value": "FAILED_TO_DELETE", - "name": "FAILED_TO_DELETE" + "type": "enum", + "members": { + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "DELETING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETING" + } + }, + "DELETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DELETED" + } + }, + "FAILED_TO_CREATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED_TO_CREATE" + } + }, + "FAILED_TO_DELETE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED_TO_DELETE" } - ] + } } }, "com.amazonaws.worklink#FleetSummary": { @@ -1593,14 +1715,14 @@ } }, "com.amazonaws.worklink#IdentityProviderType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SAML", - "name": "SAML" + "type": "enum", + "members": { + "SAML": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SAML" } - ] + } } }, "com.amazonaws.worklink#InternalServerErrorException": { @@ -1693,6 +1815,9 @@ "smithy.api#documentation": "

The maximum number of results to be included in the next page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#ListDevicesResponse": { @@ -1710,6 +1835,9 @@ "smithy.api#documentation": "

The pagination token used to retrieve the next page of results for this operation. If\n there are no more pages, this value is null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#ListDomains": { @@ -1776,6 +1904,9 @@ "smithy.api#documentation": "

The maximum number of results to be included in the next page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#ListDomainsResponse": { @@ -1793,6 +1924,9 @@ "smithy.api#documentation": "

The pagination token used to retrieve the next page of results for this operation. If\n there are no more pages, this value is null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#ListFleets": { @@ -1849,6 +1983,9 @@ "smithy.api#documentation": "

The maximum number of results to be included in the next page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#ListFleetsResponse": { @@ -1866,6 +2003,9 @@ "smithy.api#documentation": "

The pagination token used to retrieve the next page of results for this operation. If\n there are no more pages, this value is null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#ListTagsForResource": { @@ -1904,6 +2044,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#ListTagsForResourceResponse": { @@ -1915,6 +2058,9 @@ "smithy.api#documentation": "

The tags attached to the resource. A tag is a key-value pair.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#ListWebsiteAuthorizationProviders": { @@ -1981,6 +2127,9 @@ "smithy.api#documentation": "

The maximum number of results to be included in the next page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#ListWebsiteAuthorizationProvidersResponse": { @@ -1998,6 +2147,9 @@ "smithy.api#documentation": "

The pagination token to use to retrieve the next page of results for this operation. If this value is null, it retrieves the first page.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#ListWebsiteCertificateAuthorities": { @@ -2061,6 +2213,9 @@ "smithy.api#documentation": "

The pagination token used to retrieve the next page of results for this operation. If\n this value is null, it retrieves the first page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#ListWebsiteCertificateAuthoritiesResponse": { @@ -2078,6 +2233,9 @@ "smithy.api#documentation": "

The pagination token used to retrieve the next page of results for this operation. If\n there are no more pages, this value is null.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.worklink#MaxResults": { @@ -2178,11 +2336,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#RestoreDomainAccessResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#RevokeDomainAccess": { "type": "operation", @@ -2238,11 +2402,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#RevokeDomainAccessResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#SamlMetadata": { "type": "string", @@ -2325,11 +2495,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#SignOutUserResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#SubnetId": { "type": "string", @@ -2423,11 +2599,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#TagValue": { "type": "string", @@ -2508,11 +2690,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#UpdateAuditStreamConfiguration": { "type": "operation", @@ -2567,11 +2755,17 @@ "smithy.api#documentation": "

The ARN of the Amazon Kinesis data stream that receives the audit events.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#UpdateAuditStreamConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#UpdateCompanyNetworkConfiguration": { "type": "operation", @@ -2641,11 +2835,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#UpdateCompanyNetworkConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#UpdateDevicePolicyConfiguration": { "type": "operation", @@ -2700,11 +2900,17 @@ "smithy.api#documentation": "

The certificate chain, including intermediate certificates and the root certificate authority certificate used to issue device certificates.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#UpdateDevicePolicyConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#UpdateDomainMetadata": { "type": "operation", @@ -2766,11 +2972,17 @@ "smithy.api#documentation": "

The name to display.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#UpdateDomainMetadataResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#UpdateFleetMetadata": { "type": "operation", @@ -2831,11 +3043,17 @@ "smithy.api#documentation": "

The option to optimize for better performance by routing traffic through the closest\n AWS Region to users, which may be outside of your home Region.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#UpdateFleetMetadataResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#UpdateIdentityProviderConfiguration": { "type": "operation", @@ -2897,11 +3115,17 @@ "smithy.api#documentation": "

The SAML metadata document provided by the customer’s identity provider. The existing\n IdentityProviderSamlMetadata is unset if null is passed.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.worklink#UpdateIdentityProviderConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.worklink#Username": { "type": "string", @@ -3167,52 +3391,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -3220,13 +3448,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -3236,224 +3473,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://worklink-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://worklink-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://worklink-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://worklink-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://worklink.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://worklink.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://worklink.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://worklink.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -3468,8 +3656,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3481,8 +3669,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3494,8 +3682,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3507,8 +3695,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3520,8 +3708,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3533,8 +3721,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3546,8 +3734,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3559,8 +3747,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3572,8 +3760,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -3585,8 +3773,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -3598,8 +3786,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -3611,8 +3799,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3624,8 +3823,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3637,8 +3847,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -3650,8 +3871,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -3663,8 +3895,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -3676,8 +3908,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3689,8 +3921,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3701,8 +3933,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -3713,10 +3945,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/workmail.json b/codegen/sdk-codegen/aws-models/workmail.json index 5c68870cbea..ad8df41dce4 100644 --- a/codegen/sdk-codegen/aws-models/workmail.json +++ b/codegen/sdk-codegen/aws-models/workmail.json @@ -284,11 +284,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#AssociateDelegateToResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#AssociateMemberToGroup": { "type": "operation", @@ -353,11 +359,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#AssociateMemberToGroupResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#AssumeImpersonationRole": { "type": "operation", @@ -402,6 +414,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#AssumeImpersonationRoleResponse": { @@ -419,6 +434,9 @@ "smithy.api#documentation": "

The authentication token's validity, in seconds.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#AvailabilityConfiguration": { @@ -578,11 +596,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#CancelMailboxExportJobResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#CreateAlias": { "type": "operation", @@ -650,11 +674,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#CreateAliasResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#CreateAvailabilityConfiguration": { "type": "operation", @@ -722,11 +752,17 @@ "smithy.api#documentation": "

Lambda availability provider definition. The request must contain exactly one provider definition, either EwsProvider or LambdaProvider.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#CreateAvailabilityConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#CreateGroup": { "type": "operation", @@ -784,6 +820,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#CreateGroupResponse": { @@ -795,6 +834,9 @@ "smithy.api#documentation": "

The identifier of the group.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#CreateImpersonationRole": { @@ -873,6 +915,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#CreateImpersonationRoleResponse": { @@ -884,6 +929,9 @@ "smithy.api#documentation": "

The new impersonation role ID.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#CreateMobileDeviceAccessRule": { @@ -997,6 +1045,9 @@ "smithy.api#documentation": "

Device user agents that the rule will not match. All other device user agents will match.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#CreateMobileDeviceAccessRuleResponse": { @@ -1008,6 +1059,9 @@ "smithy.api#documentation": "

The identifier for the newly created mobile device access rule.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#CreateOrganization": { @@ -1082,6 +1136,9 @@ "smithy.api#documentation": "

When true, allows organization interoperability between WorkMail and\n Microsoft Exchange. If true, you must include a AD Connector directory ID in\n the request.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#CreateOrganizationResponse": { @@ -1093,6 +1150,9 @@ "smithy.api#documentation": "

The organization ID.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#CreateResource": { @@ -1155,6 +1215,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#CreateResourceResponse": { @@ -1166,6 +1229,9 @@ "smithy.api#documentation": "

The identifier of the new resource.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#CreateUser": { @@ -1241,6 +1307,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#CreateUserResponse": { @@ -1252,6 +1321,9 @@ "smithy.api#documentation": "

The identifier for the new user.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#Delegate": { @@ -1313,11 +1385,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteAccessControlRuleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteAlias": { "type": "operation", @@ -1373,11 +1451,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteAliasResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteAvailabilityConfiguration": { "type": "operation", @@ -1417,11 +1501,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteAvailabilityConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteEmailMonitoringConfiguration": { "type": "operation", @@ -1457,11 +1547,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteEmailMonitoringConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteGroup": { "type": "operation", @@ -1516,11 +1612,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteGroupResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteImpersonationRole": { "type": "operation", @@ -1562,11 +1664,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteImpersonationRoleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteMailboxPermissions": { "type": "operation", @@ -1622,11 +1730,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteMailboxPermissionsResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteMobileDeviceAccessOverride": { "type": "operation", @@ -1678,11 +1792,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteMobileDeviceAccessOverrideResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteMobileDeviceAccessRule": { "type": "operation", @@ -1724,11 +1844,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteMobileDeviceAccessRuleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteOrganization": { "type": "operation", @@ -1779,6 +1905,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteOrganizationResponse": { @@ -1796,6 +1925,9 @@ "smithy.api#documentation": "

The state of the organization.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#DeleteResource": { @@ -1842,11 +1974,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteRetentionPolicy": { "type": "operation", @@ -1889,11 +2027,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteRetentionPolicyResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeleteUser": { "type": "operation", @@ -1948,11 +2092,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeleteUserResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeregisterFromWorkMail": { "type": "operation", @@ -2001,11 +2151,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeregisterFromWorkMailResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DeregisterMailDomain": { "type": "operation", @@ -2054,11 +2210,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DeregisterMailDomainResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DescribeEmailMonitoringConfiguration": { "type": "operation", @@ -2097,6 +2259,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DescribeEmailMonitoringConfigurationResponse": { @@ -2114,6 +2279,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the CloudWatch Log group associated with the email monitoring configuration.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#DescribeGroup": { @@ -2160,6 +2328,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DescribeGroupResponse": { @@ -2201,6 +2372,9 @@ "smithy.api#documentation": "

The date and time when a user was deregistered from WorkMail, in UNIX epoch time\n format.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#DescribeInboundDmarcSettings": { @@ -2234,6 +2408,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DescribeInboundDmarcSettingsResponse": { @@ -2246,6 +2423,9 @@ "smithy.api#documentation": "

Lists the enforcement setting of the applied policy.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#DescribeMailboxExportJob": { @@ -2292,6 +2472,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DescribeMailboxExportJobResponse": { @@ -2370,6 +2553,9 @@ "smithy.api#documentation": "

The mailbox export job end timestamp.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#DescribeOrganization": { @@ -2403,6 +2589,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DescribeOrganizationResponse": { @@ -2462,6 +2651,9 @@ "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the organization.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#DescribeResource": { @@ -2508,6 +2700,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DescribeResourceResponse": { @@ -2561,6 +2756,9 @@ "smithy.api#documentation": "

The date and time when a resource was disabled from WorkMail, in UNIX epoch time\n format.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#DescribeUser": { @@ -2607,6 +2805,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DescribeUserResponse": { @@ -2660,6 +2861,9 @@ "smithy.api#documentation": "

The date and time at which the user was disabled for WorkMail usage, in UNIX epoch\n time format.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#Description": { @@ -2870,11 +3074,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DisassociateDelegateFromResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DisassociateMemberFromGroup": { "type": "operation", @@ -2939,11 +3149,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#DisassociateMemberFromGroupResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#DnsRecord": { "type": "structure", @@ -3309,6 +3525,9 @@ "smithy.api#documentation": "

The impersonation role ID.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#GetAccessControlEffectResponse": { @@ -3326,6 +3545,9 @@ "smithy.api#documentation": "

The rules that match the given parameters, resulting in an effect.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#GetDefaultRetentionPolicy": { @@ -3365,6 +3587,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#GetDefaultRetentionPolicyResponse": { @@ -3394,6 +3619,9 @@ "smithy.api#documentation": "

The retention policy folder configurations.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#GetImpersonationRole": { @@ -3478,6 +3706,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#GetImpersonationRoleEffectResponse": { @@ -3501,6 +3732,9 @@ "smithy.api#documentation": "

A list of the rules that match the input and produce the configured effect.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#GetImpersonationRoleRequest": { @@ -3520,6 +3754,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#GetImpersonationRoleResponse": { @@ -3567,6 +3804,9 @@ "smithy.api#documentation": "

The date when the impersonation role was last modified.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#GetMailDomain": { @@ -3613,6 +3853,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#GetMailDomainResponse": { @@ -3650,6 +3893,9 @@ "smithy.api#documentation": "

Indicates the status of a DKIM verification.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#GetMailboxDetails": { @@ -3693,6 +3939,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#GetMailboxDetailsResponse": { @@ -3711,6 +3960,9 @@ "smithy.api#documentation": "

The current mailbox size, in MB, for the specified user.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#GetMobileDeviceAccessEffect": { @@ -3770,6 +4022,9 @@ "smithy.api#documentation": "

Device user agent the simulated user will report.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#GetMobileDeviceAccessEffectResponse": { @@ -3787,6 +4042,9 @@ "smithy.api#documentation": "

A list of the rules which matched the simulated user input and produced the effect.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#GetMobileDeviceAccessOverride": { @@ -3842,6 +4100,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#GetMobileDeviceAccessOverrideResponse": { @@ -3883,6 +4144,9 @@ "smithy.api#documentation": "

The date the description was last modified.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#Group": { @@ -4367,6 +4631,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListAccessControlRulesResponse": { @@ -4378,6 +4645,9 @@ "smithy.api#documentation": "

The access control rules.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListAliases": { @@ -4444,6 +4714,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListAliasesResponse": { @@ -4461,6 +4734,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The value is \"null\" when there\n are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListAvailabilityConfigurations": { @@ -4511,6 +4787,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The first call does not require a token.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListAvailabilityConfigurationsResponse": { @@ -4528,6 +4807,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The value is null when there are no further results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListGroupMembers": { @@ -4594,6 +4876,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListGroupMembersResponse": { @@ -4611,6 +4896,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The first call does not\n contain any tokens.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListGroups": { @@ -4667,6 +4955,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListGroupsResponse": { @@ -4684,6 +4975,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The value is \"null\" when there\n are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListImpersonationRoles": { @@ -4736,6 +5030,9 @@ "smithy.api#documentation": "

The maximum number of results returned in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListImpersonationRolesResponse": { @@ -4753,6 +5050,9 @@ "smithy.api#documentation": "

The token to retrieve the next page of results. The value is null when\n there are no results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListMailDomains": { @@ -4806,6 +5106,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The first call does not require a token.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListMailDomainsResponse": { @@ -4823,6 +5126,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The value becomes null when there are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListMailboxExportJobs": { @@ -4876,6 +5182,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListMailboxExportJobsResponse": { @@ -4893,6 +5202,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListMailboxPermissions": { @@ -4956,6 +5268,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListMailboxPermissionsResponse": { @@ -4973,6 +5288,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The value is \"null\" when there\n are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListMobileDeviceAccessOverrides": { @@ -5040,6 +5358,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListMobileDeviceAccessOverridesResponse": { @@ -5057,6 +5378,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The value is “null” when there are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListMobileDeviceAccessRules": { @@ -5092,6 +5416,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListMobileDeviceAccessRulesResponse": { @@ -5103,6 +5430,9 @@ "smithy.api#documentation": "

The list of mobile device access rules that exist under the specified WorkMail organization.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListOrganizations": { @@ -5143,6 +5473,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListOrganizationsResponse": { @@ -5160,6 +5493,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. The value is \"null\" when there\n are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListResourceDelegates": { @@ -5226,6 +5562,9 @@ "smithy.api#documentation": "

The number of maximum results in a page.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListResourceDelegatesResponse": { @@ -5243,6 +5582,9 @@ "smithy.api#documentation": "

The token used to paginate through the delegates associated with a resource. While\n results are still available, it has an associated value. When the last page is reached, the\n token is empty.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListResources": { @@ -5296,6 +5638,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListResourcesResponse": { @@ -5313,6 +5658,9 @@ "smithy.api#documentation": "

The token used to paginate through all the organization's resources. While results\n are still available, it has an associated value. When the last page is reached, the token\n is empty.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListTagsForResource": { @@ -5342,6 +5690,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListTagsForResourceResponse": { @@ -5353,6 +5704,9 @@ "smithy.api#documentation": "

A list of tag key-value pairs.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#ListUsers": { @@ -5406,6 +5760,9 @@ "smithy.api#documentation": "

The maximum number of results to return in a single call.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ListUsersResponse": { @@ -5423,6 +5780,9 @@ "smithy.api#documentation": "

The token to use to retrieve the next page of results. This value is `null` when\n there are no more results to return.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#LogGroupArn": { @@ -6253,11 +6613,17 @@ "smithy.api#documentation": "

Impersonation role IDs to exclude from the rule.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#PutAccessControlRuleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#PutEmailMonitoringConfiguration": { "type": "operation", @@ -6310,11 +6676,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#PutEmailMonitoringConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#PutInboundDmarcSettings": { "type": "operation", @@ -6354,11 +6726,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#PutInboundDmarcSettingsResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#PutMailboxPermissions": { "type": "operation", @@ -6421,11 +6799,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#PutMailboxPermissionsResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#PutMobileDeviceAccessOverride": { "type": "operation", @@ -6493,11 +6877,17 @@ "smithy.api#documentation": "

A description of the override.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#PutMobileDeviceAccessOverrideResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#PutRetentionPolicy": { "type": "operation", @@ -6562,11 +6952,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#PutRetentionPolicyResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#RedactedEwsAvailabilityProvider": { "type": "structure", @@ -6642,11 +7038,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#RegisterMailDomainResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#RegisterToWorkMail": { "type": "operation", @@ -6720,11 +7122,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#RegisterToWorkMailResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#ReservedNameException": { "type": "structure", @@ -6804,11 +7212,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#ResetPasswordResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#Resource": { "type": "structure", @@ -7082,6 +7496,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#StartMailboxExportJobResponse": { @@ -7093,6 +7510,9 @@ "smithy.api#documentation": "

The job ID.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#String": { @@ -7199,11 +7619,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#TagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#TagValue": { "type": "string", @@ -7249,7 +7675,7 @@ } ], "traits": { - "smithy.api#documentation": "

Performs a test on an availability provider to ensure that access is allowed. For EWS, it verifies the provided credentials can be used to successfully log in. For Lambda, it verifies that the Lambda function can be invoked and that the resource access\n policy was configured to deny anonymous access. An anonymous invocation is one done without providing either a SourceArn or SourceAccount header.

\n \n

The request must contain either one provider definition (EwsProvider or\n LambdaProvider) or the DomainName parameter. If the\n DomainName parameter is provided, the configuration stored under the\n DomainName will be tested.

\n
" + "smithy.api#documentation": "

Performs a test on an availability provider to ensure that access is allowed. For EWS, it verifies the provided credentials can be used to successfully log in. For Lambda, it verifies that the Lambda function can be invoked and that the resource access\n policy was configured to deny anonymous access. An anonymous invocation is one done without providing either a SourceArn or SourceAccount header.

\n \n

The request must contain either one provider definition (EwsProvider or\n LambdaProvider) or the DomainName parameter. If the\n DomainName parameter is provided, the configuration stored under the\n DomainName will be tested.

\n
" } }, "com.amazonaws.workmail#TestAvailabilityConfigurationRequest": { @@ -7274,6 +7700,9 @@ "LambdaProvider": { "target": "com.amazonaws.workmail#LambdaAvailabilityProvider" } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#TestAvailabilityConfigurationResponse": { @@ -7292,6 +7721,9 @@ "smithy.api#documentation": "

String containing the reason for a failed test if TestPassed is false.

" } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmail#Timestamp": { @@ -7356,11 +7788,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#UntagResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#UpdateAvailabilityConfiguration": { "type": "operation", @@ -7418,11 +7856,17 @@ "smithy.api#documentation": "

The Lambda availability provider definition. The request must contain exactly one\n provider definition, either EwsProvider or LambdaProvider. The\n previously stored provider will be overridden by the one provided.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#UpdateAvailabilityConfigurationResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#UpdateDefaultMailDomain": { "type": "operation", @@ -7471,11 +7915,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#UpdateDefaultMailDomainResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#UpdateImpersonationRole": { "type": "operation", @@ -7556,11 +8006,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#UpdateImpersonationRoleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#UpdateMailboxQuota": { "type": "operation", @@ -7616,11 +8072,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#UpdateMailboxQuotaResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#UpdateMobileDeviceAccessRule": { "type": "operation", @@ -7733,11 +8195,17 @@ "smithy.api#documentation": "

User agents that the updated rule will not match. All other user agents will match.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#UpdateMobileDeviceAccessRuleResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#UpdatePrimaryEmailAddress": { "type": "operation", @@ -7811,11 +8279,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#UpdatePrimaryEmailAddressResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#UpdateResource": { "type": "operation", @@ -7891,11 +8365,17 @@ "smithy.api#documentation": "

The resource's booking options to be updated.

" } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmail#UpdateResourceResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmail#Url": { "type": "string", @@ -8352,52 +8832,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -8405,13 +8889,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -8421,224 +8914,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://workmail-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://workmail-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://workmail-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://workmail-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://workmail.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://workmail.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://workmail.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://workmail.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -8653,8 +9097,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8666,8 +9110,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8679,8 +9123,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8692,8 +9136,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -8705,8 +9149,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8718,8 +9162,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -8731,8 +9175,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -8744,8 +9188,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8757,8 +9201,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -8770,8 +9214,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8783,8 +9227,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -8796,8 +9240,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -8809,8 +9253,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -8822,8 +9266,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -8835,8 +9290,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -8848,8 +9314,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -8861,8 +9338,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -8874,8 +9362,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -8887,8 +9375,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -8900,8 +9388,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -8912,8 +9400,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -8924,10 +9412,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" diff --git a/codegen/sdk-codegen/aws-models/workmailmessageflow.json b/codegen/sdk-codegen/aws-models/workmailmessageflow.json index 431251c5259..b697ff1a761 100644 --- a/codegen/sdk-codegen/aws-models/workmailmessageflow.json +++ b/codegen/sdk-codegen/aws-models/workmailmessageflow.json @@ -62,6 +62,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmailmessageflow#GetRawMessageContentResponse": { @@ -75,6 +78,9 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#output": {} } }, "com.amazonaws.workmailmessageflow#GiraffeMessageInTransitService": { @@ -162,52 +168,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -215,13 +225,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -231,224 +250,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://workmailmessageflow-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://workmailmessageflow-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://workmailmessageflow-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://workmailmessageflow-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://workmailmessageflow.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://workmailmessageflow.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://workmailmessageflow.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://workmailmessageflow.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -463,8 +433,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -476,8 +446,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -489,8 +459,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -502,8 +472,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -515,8 +485,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -528,8 +498,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -541,8 +511,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -554,8 +524,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -567,8 +537,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -580,8 +550,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -593,8 +563,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -606,8 +576,19 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -619,8 +600,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -632,8 +624,19 @@ }, "params": { "Region": "us-iso-east-1", - "UseDualStack": false, - "UseFIPS": false + "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 } }, { @@ -645,8 +648,19 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": true + "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 } }, { @@ -658,8 +672,8 @@ }, "params": { "Region": "us-isob-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -671,8 +685,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -684,8 +698,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -696,8 +710,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -708,10 +722,16 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -777,7 +797,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates the raw content of an in-transit email message, in MIME format.

\n

This example describes how to update in-transit email message. For more information and examples for using this API, see \n \n Updating message content with AWS Lambda.

\n \n \n \n

Updates to an in-transit message only appear when you call PutRawMessageContent from an AWS Lambda function \n configured with a synchronous \n Run Lambda rule. If you call PutRawMessageContent on a delivered or sent message, the message remains unchanged,\n even though GetRawMessageContent returns an updated \n message.\n

\n
", + "smithy.api#documentation": "

Updates the raw content of an in-transit email message, in MIME format.

\n

This example describes how to update in-transit email message. For more information and examples for using this API, see \n \n Updating message content with AWS Lambda.

\n \n

Updates to an in-transit message only appear when you call PutRawMessageContent from an AWS Lambda function \n configured with a synchronous \n Run Lambda rule. If you call PutRawMessageContent on a delivered or sent message, the message remains unchanged,\n even though GetRawMessageContent returns an updated \n message.\n

\n
", "smithy.api#http": { "method": "POST", "uri": "/messages/{messageId}", @@ -803,11 +823,17 @@ "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#input": {} } }, "com.amazonaws.workmailmessageflow#PutRawMessageContentResponse": { "type": "structure", - "members": {} + "members": {}, + "traits": { + "smithy.api#output": {} + } }, "com.amazonaws.workmailmessageflow#RawMessageContent": { "type": "structure", @@ -881,7 +907,7 @@ "min": 1, "max": 120 }, - "smithy.api#pattern": "[a-z0-9\\-]*" + "smithy.api#pattern": "^[a-z0-9\\-]*$" } }, "com.amazonaws.workmailmessageflow#s3BucketIdType": { @@ -891,7 +917,7 @@ "min": 3, "max": 63 }, - "smithy.api#pattern": "^[a-z0-9][a-z0-9\\-]*" + "smithy.api#pattern": "^[a-z0-9][a-z0-9\\-]*$" } }, "com.amazonaws.workmailmessageflow#s3KeyIdType": { @@ -901,7 +927,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "[a-zA-Z0-9\\-/]*" + "smithy.api#pattern": "^[a-zA-Z0-9\\-/]*$" } }, "com.amazonaws.workmailmessageflow#s3VersionType": { @@ -911,7 +937,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": ".+" + "smithy.api#pattern": "^.+$" } } } diff --git a/service/accessanalyzer/endpoints.go b/service/accessanalyzer/endpoints.go index 6013c39fec3..5ad02e775fa 100644 --- a/service/accessanalyzer/endpoints.go +++ b/service/accessanalyzer/endpoints.go @@ -474,32 +474,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "us-gov-east-1" { - uriString := "https://access-analyzer.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://access-analyzer.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://access-analyzer.") diff --git a/service/accessanalyzer/endpoints_test.go b/service/accessanalyzer/endpoints_test.go index 71defd87b5f..ea6e0e092d0 100644 --- a/service/accessanalyzer/endpoints_test.go +++ b/service/accessanalyzer/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1574,12 +1574,32 @@ func TestEndpointCase39(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1633,32 @@ func TestEndpointCase40(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1692,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1691,12 +1751,32 @@ func TestEndpointCase42(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase46(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1731,11 +1811,11 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,10 +1851,10 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1810,11 +1890,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1831,11 +1911,11 @@ func TestEndpointCase46(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1850,3 +1930,19 @@ func TestEndpointCase47(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase52(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/acm/endpoints.go b/service/acm/endpoints.go index 5393b37d926..dd9d6b29f25 100644 --- a/service/acm/endpoints.go +++ b/service/acm/endpoints.go @@ -474,32 +474,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "us-gov-east-1" { - uriString := "https://acm.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://acm.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://acm.") diff --git a/service/acm/endpoints_test.go b/service/acm/endpoints_test.go index 081da875793..7089db6ee4d 100644 --- a/service/acm/endpoints_test.go +++ b/service/acm/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1535,12 +1535,32 @@ func TestEndpointCase38(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1574,12 +1594,32 @@ func TestEndpointCase39(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1653,32 @@ func TestEndpointCase40(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1712,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1692,11 +1772,11 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1732,10 +1812,10 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,11 +1851,11 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1792,11 +1872,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1811,3 +1891,19 @@ func TestEndpointCase46(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase51(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/amplify/endpoints_test.go b/service/amplify/endpoints_test.go index 1a496000ce9..d579c6af166 100644 --- a/service/amplify/endpoints_test.go +++ b/service/amplify/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1184,12 +1184,32 @@ func TestEndpointCase29(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1223,12 +1243,32 @@ func TestEndpointCase30(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1262,12 +1302,32 @@ func TestEndpointCase31(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1361,32 @@ func TestEndpointCase32(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1341,11 +1421,11 @@ func TestEndpointCase33(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1381,10 +1461,10 @@ func TestEndpointCase34(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1420,11 +1500,11 @@ func TestEndpointCase35(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1441,11 +1521,11 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1460,3 +1540,19 @@ func TestEndpointCase37(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/apigatewaymanagementapi/endpoints_test.go b/service/apigatewaymanagementapi/endpoints_test.go index 7e3a03a91e7..c44f7cd2d1a 100644 --- a/service/apigatewaymanagementapi/endpoints_test.go +++ b/service/apigatewaymanagementapi/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/appconfig/endpoints_test.go b/service/appconfig/endpoints_test.go index 9270309c5e3..0d8e0c91d80 100644 --- a/service/appconfig/endpoints_test.go +++ b/service/appconfig/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1496,12 +1496,32 @@ func TestEndpointCase37(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1535,12 +1555,32 @@ func TestEndpointCase38(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1574,12 +1614,32 @@ func TestEndpointCase39(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1673,32 @@ func TestEndpointCase40(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1654,10 +1734,10 @@ func TestEndpointCase41(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1693,11 +1773,11 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1714,11 +1794,11 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1733,3 +1813,19 @@ func TestEndpointCase44(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase49(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/appconfigdata/endpoints_test.go b/service/appconfigdata/endpoints_test.go index 3fd4e8ae8f2..f2d332d40ff 100644 --- a/service/appconfigdata/endpoints_test.go +++ b/service/appconfigdata/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1379,32 @@ func TestEndpointCase34(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1438,32 @@ func TestEndpointCase35(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1457,12 +1497,32 @@ func TestEndpointCase36(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1496,12 +1556,32 @@ func TestEndpointCase37(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1536,11 +1616,11 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1576,10 +1656,10 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1615,11 +1695,11 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1636,11 +1716,11 @@ func TestEndpointCase41(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1655,3 +1735,19 @@ func TestEndpointCase42(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase47(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/appfabric/endpoints_test.go b/service/appfabric/endpoints_test.go index d2c1e34233c..a51886d4138 100644 --- a/service/appfabric/endpoints_test.go +++ b/service/appfabric/endpoints_test.go @@ -14,11 +14,11 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://appfabric-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,11 +53,11 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://appfabric-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,11 +92,11 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://appfabric.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,11 +131,11 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://appfabric.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,8 +173,8 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -212,8 +212,8 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -251,8 +251,8 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -290,8 +290,8 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -326,11 +326,11 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), UseDualStack: ptr.Bool(true), } @@ -338,31 +338,11 @@ func TestEndpointCase8(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://appfabric-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,31 +365,11 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://appfabric-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,11 +404,11 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://appfabric.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,11 +443,11 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://appfabric.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,11 +482,11 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -534,11 +494,31 @@ func TestEndpointCase14(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric.us-east-1.api.aws") + uri, _ := url.Parse("https://appfabric-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,11 +541,31 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), UseDualStack: ptr.Bool(false), } @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://appfabric.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://appfabric.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,8 +603,8 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -623,8 +623,8 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -662,8 +662,8 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -682,8 +682,8 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -718,11 +718,11 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,11 +758,50 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,10 +819,10 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/appintegrations/endpoints_test.go b/service/appintegrations/endpoints_test.go index d474ec1fcbc..cdbde4f4958 100644 --- a/service/appintegrations/endpoints_test.go +++ b/service/appintegrations/endpoints_test.go @@ -833,8 +833,28 @@ func TestEndpointCase20(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -872,8 +892,28 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -911,8 +951,28 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -950,8 +1010,28 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -990,7 +1070,7 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1030,7 +1110,7 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1069,7 +1149,7 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1090,7 +1170,7 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1109,3 +1189,19 @@ func TestEndpointCase28(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/applicationcostprofiler/endpoints_test.go b/service/applicationcostprofiler/endpoints_test.go index 583bac53fa0..cac31023785 100644 --- a/service/applicationcostprofiler/endpoints_test.go +++ b/service/applicationcostprofiler/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/appmesh/endpoints_test.go b/service/appmesh/endpoints_test.go index be9c91f0162..bb1b4932ca9 100644 --- a/service/appmesh/endpoints_test.go +++ b/service/appmesh/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1578,8 +1578,8 @@ func TestEndpointCase39(t *testing.T) { func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1617,8 +1617,8 @@ func TestEndpointCase40(t *testing.T) { func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1656,8 +1656,8 @@ func TestEndpointCase41(t *testing.T) { func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1695,8 +1695,8 @@ func TestEndpointCase42(t *testing.T) { func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1734,8 +1734,8 @@ func TestEndpointCase43(t *testing.T) { func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1773,8 +1773,8 @@ func TestEndpointCase44(t *testing.T) { func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1812,8 +1812,8 @@ func TestEndpointCase45(t *testing.T) { func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1851,8 +1851,8 @@ func TestEndpointCase46(t *testing.T) { func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1890,8 +1890,8 @@ func TestEndpointCase47(t *testing.T) { func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1929,8 +1929,8 @@ func TestEndpointCase48(t *testing.T) { func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1968,8 +1968,8 @@ func TestEndpointCase49(t *testing.T) { func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2007,8 +2007,8 @@ func TestEndpointCase50(t *testing.T) { func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2042,12 +2042,32 @@ func TestEndpointCase51(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase52(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase53(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2081,12 +2101,32 @@ func TestEndpointCase52(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase54(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase53(t *testing.T) { +func TestEndpointCase55(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2120,12 +2160,32 @@ func TestEndpointCase53(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase56(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase54(t *testing.T) { +func TestEndpointCase57(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2159,12 +2219,32 @@ func TestEndpointCase54(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase58(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase55(t *testing.T) { +func TestEndpointCase59(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2199,11 +2279,11 @@ func TestEndpointCase55(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase56(t *testing.T) { +func TestEndpointCase60(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -2239,10 +2319,10 @@ func TestEndpointCase56(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase57(t *testing.T) { +func TestEndpointCase61(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -2278,11 +2358,11 @@ func TestEndpointCase57(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase58(t *testing.T) { +func TestEndpointCase62(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -2299,11 +2379,11 @@ func TestEndpointCase58(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase59(t *testing.T) { +func TestEndpointCase63(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -2318,3 +2398,19 @@ func TestEndpointCase59(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase64(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/arczonalshift/endpoints_test.go b/service/arczonalshift/endpoints_test.go index a59a68f5376..c2374ff008e 100644 --- a/service/arczonalshift/endpoints_test.go +++ b/service/arczonalshift/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://arc-zonal-shift-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://arc-zonal-shift-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://arc-zonal-shift.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://arc-zonal-shift.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://arc-zonal-shift-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://arc-zonal-shift-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://arc-zonal-shift.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://arc-zonal-shift.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift.us-east-1.api.aws") + uri, _ := url.Parse("https://arc-zonal-shift-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://arc-zonal-shift.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://arc-zonal-shift.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/autoscalingplans/endpoints_test.go b/service/autoscalingplans/endpoints_test.go index c5f4dc543a3..942ab3b2658 100644 --- a/service/autoscalingplans/endpoints_test.go +++ b/service/autoscalingplans/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1379,32 @@ func TestEndpointCase34(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1438,32 @@ func TestEndpointCase35(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1457,12 +1497,32 @@ func TestEndpointCase36(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1496,12 +1556,32 @@ func TestEndpointCase37(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1536,11 +1616,11 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1576,10 +1656,10 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1615,11 +1695,11 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1636,11 +1716,11 @@ func TestEndpointCase41(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1655,3 +1735,19 @@ func TestEndpointCase42(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase47(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/backupgateway/endpoints_test.go b/service/backupgateway/endpoints_test.go index d73cc8e9849..a98dfedc65e 100644 --- a/service/backupgateway/endpoints_test.go +++ b/service/backupgateway/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1301,32 @@ func TestEndpointCase32(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1360,32 @@ func TestEndpointCase33(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1419,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1478,32 @@ func TestEndpointCase35(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1458,11 +1538,11 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1498,10 +1578,10 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1537,11 +1617,11 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1558,11 +1638,11 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1577,3 +1657,19 @@ func TestEndpointCase40(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/backupstorage/endpoints_test.go b/service/backupstorage/endpoints_test.go index b8377542ca1..9a88f294c76 100644 --- a/service/backupstorage/endpoints_test.go +++ b/service/backupstorage/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/braket/endpoints_test.go b/service/braket/endpoints_test.go index a1dfb66daca..db36402c807 100644 --- a/service/braket/endpoints_test.go +++ b/service/braket/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +599,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +658,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase17(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +717,32 @@ func TestEndpointCase16(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +776,32 @@ func TestEndpointCase17(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -756,11 +836,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -796,10 +876,10 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -835,11 +915,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -856,11 +936,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -875,3 +955,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/chimesdkvoice/endpoints_test.go b/service/chimesdkvoice/endpoints_test.go index 14b24a4726e..942083e4298 100644 --- a/service/chimesdkvoice/endpoints_test.go +++ b/service/chimesdkvoice/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://voice-chime-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://voice-chime-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://voice-chime.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://voice-chime.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://voice-chime-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://voice-chime-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://voice-chime.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://voice-chime.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime.us-east-1.api.aws") + uri, _ := url.Parse("https://voice-chime-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://voice-chime.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://voice-chime.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/clouddirectory/endpoints_test.go b/service/clouddirectory/endpoints_test.go index ac3f8b7b1d0..0fc6c818f9b 100644 --- a/service/clouddirectory/endpoints_test.go +++ b/service/clouddirectory/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +872,32 @@ func TestEndpointCase21(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +931,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +990,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1049,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1029,11 +1109,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1069,10 +1149,10 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1108,11 +1188,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1129,11 +1209,11 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1148,3 +1228,19 @@ func TestEndpointCase29(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/cloudhsmv2/endpoints_test.go b/service/cloudhsmv2/endpoints_test.go index efc6e5d84f0..32017744129 100644 --- a/service/cloudhsmv2/endpoints_test.go +++ b/service/cloudhsmv2/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1301,32 @@ func TestEndpointCase32(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1360,32 @@ func TestEndpointCase33(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1419,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1478,32 @@ func TestEndpointCase35(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1458,11 +1538,11 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1498,10 +1578,10 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1537,11 +1617,11 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1558,11 +1638,11 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1577,3 +1657,19 @@ func TestEndpointCase40(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/cloudsearch/endpoints_test.go b/service/cloudsearch/endpoints_test.go index 612a897dd4b..eb3368896a3 100644 --- a/service/cloudsearch/endpoints_test.go +++ b/service/cloudsearch/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +833,32 @@ func TestEndpointCase20(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +892,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +951,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +1010,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -990,11 +1070,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1030,10 +1110,10 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1069,11 +1149,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1090,11 +1170,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1109,3 +1189,19 @@ func TestEndpointCase28(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/cloudsearchdomain/endpoints_test.go b/service/cloudsearchdomain/endpoints_test.go index 6bff54f37d9..4687d99990f 100644 --- a/service/cloudsearchdomain/endpoints_test.go +++ b/service/cloudsearchdomain/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/cloudtraildata/endpoints_test.go b/service/cloudtraildata/endpoints_test.go index b10743fa886..d5155a84f25 100644 --- a/service/cloudtraildata/endpoints_test.go +++ b/service/cloudtraildata/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://cloudtrail-data-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://cloudtrail-data-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://cloudtrail-data.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://cloudtrail-data.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://cloudtrail-data-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://cloudtrail-data-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://cloudtrail-data.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://cloudtrail-data.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data.us-east-1.api.aws") + uri, _ := url.Parse("https://cloudtrail-data-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cloudtrail-data.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://cloudtrail-data.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/codebuild/endpoints_test.go b/service/codebuild/endpoints_test.go index 2a06c9385a0..4991c46b2ef 100644 --- a/service/codebuild/endpoints_test.go +++ b/service/codebuild/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1535,12 +1535,32 @@ func TestEndpointCase38(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1574,12 +1594,32 @@ func TestEndpointCase39(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1653,32 @@ func TestEndpointCase40(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1712,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1692,11 +1772,11 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1732,10 +1812,10 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,11 +1851,11 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1792,11 +1872,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1811,3 +1891,19 @@ func TestEndpointCase46(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase51(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/codedeploy/endpoints_test.go b/service/codedeploy/endpoints_test.go index e08e0481f46..a71b941c034 100644 --- a/service/codedeploy/endpoints_test.go +++ b/service/codedeploy/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1578,8 +1578,8 @@ func TestEndpointCase39(t *testing.T) { func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1613,32 @@ func TestEndpointCase40(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1672,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1691,12 +1731,32 @@ func TestEndpointCase42(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1730,12 +1790,32 @@ func TestEndpointCase43(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase47(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,10 +1851,10 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1810,11 +1890,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1831,11 +1911,11 @@ func TestEndpointCase46(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1850,3 +1930,19 @@ func TestEndpointCase47(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase52(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/codeguruprofiler/endpoints_test.go b/service/codeguruprofiler/endpoints_test.go index 1ab1bf1de42..46660582c12 100644 --- a/service/codeguruprofiler/endpoints_test.go +++ b/service/codeguruprofiler/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/codegurureviewer/endpoints_test.go b/service/codegurureviewer/endpoints_test.go index 548b922e55f..3f6cfa9012f 100644 --- a/service/codegurureviewer/endpoints_test.go +++ b/service/codegurureviewer/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +833,32 @@ func TestEndpointCase20(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +892,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +951,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +1010,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -990,11 +1070,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1030,10 +1110,10 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1069,11 +1149,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1090,11 +1170,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1109,3 +1189,19 @@ func TestEndpointCase28(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/codegurusecurity/endpoints_test.go b/service/codegurusecurity/endpoints_test.go index 1b6fcb30230..426b010637d 100644 --- a/service/codegurusecurity/endpoints_test.go +++ b/service/codegurusecurity/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://codeguru-security-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://codeguru-security-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://codeguru-security.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://codeguru-security.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://codeguru-security-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://codeguru-security-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://codeguru-security.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://codeguru-security.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security.us-east-1.api.aws") + uri, _ := url.Parse("https://codeguru-security-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://codeguru-security.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://codeguru-security.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/codestar/endpoints_test.go b/service/codestar/endpoints_test.go index d27e5affa2c..34910bb7bed 100644 --- a/service/codestar/endpoints_test.go +++ b/service/codestar/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +950,32 @@ func TestEndpointCase23(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1009,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1028,12 +1068,32 @@ func TestEndpointCase25(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1067,12 +1127,32 @@ func TestEndpointCase26(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1107,11 +1187,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1147,10 +1227,10 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1186,11 +1266,11 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1207,11 +1287,11 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1226,3 +1306,19 @@ func TestEndpointCase31(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/codestarnotifications/endpoints_test.go b/service/codestarnotifications/endpoints_test.go index e67044f27ae..bb2f9d5f361 100644 --- a/service/codestarnotifications/endpoints_test.go +++ b/service/codestarnotifications/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/cognitoidentity/endpoints_test.go b/service/cognitoidentity/endpoints_test.go index 8bc8650f871..abeee6b5aac 100644 --- a/service/cognitoidentity/endpoints_test.go +++ b/service/cognitoidentity/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1262,12 +1262,32 @@ func TestEndpointCase31(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1321,32 @@ func TestEndpointCase32(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1380,32 @@ func TestEndpointCase33(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1439,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1419,11 +1499,11 @@ func TestEndpointCase35(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1459,10 +1539,10 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1498,11 +1578,11 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1519,11 +1599,11 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1538,3 +1618,19 @@ func TestEndpointCase39(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/cognitosync/api_op_ListDatasets.go b/service/cognitosync/api_op_ListDatasets.go index 9d98a64649b..7ce24bd346e 100644 --- a/service/cognitosync/api_op_ListDatasets.go +++ b/service/cognitosync/api_op_ListDatasets.go @@ -72,7 +72,7 @@ type ListDatasetsInput struct { IdentityPoolId *string // The maximum number of results to be returned. - MaxResults int32 + MaxResults *int32 // A pagination token for obtaining the next page of results. NextToken *string diff --git a/service/cognitosync/api_op_ListIdentityPoolUsage.go b/service/cognitosync/api_op_ListIdentityPoolUsage.go index ba2a528d5bf..fa386a26c88 100644 --- a/service/cognitosync/api_op_ListIdentityPoolUsage.go +++ b/service/cognitosync/api_op_ListIdentityPoolUsage.go @@ -59,7 +59,7 @@ func (c *Client) ListIdentityPoolUsage(ctx context.Context, params *ListIdentity type ListIdentityPoolUsageInput struct { // The maximum number of results to be returned. - MaxResults int32 + MaxResults *int32 // A pagination token for obtaining the next page of results. NextToken *string diff --git a/service/cognitosync/api_op_ListRecords.go b/service/cognitosync/api_op_ListRecords.go index 422b1cd670f..277f1ec05c1 100644 --- a/service/cognitosync/api_op_ListRecords.go +++ b/service/cognitosync/api_op_ListRecords.go @@ -82,7 +82,7 @@ type ListRecordsInput struct { LastSyncCount *int64 // The maximum number of results to be returned. - MaxResults int32 + MaxResults *int32 // A pagination token for obtaining the next page of results. NextToken *string diff --git a/service/cognitosync/endpoints_test.go b/service/cognitosync/endpoints_test.go index b612a3e4a70..b5ff231c78f 100644 --- a/service/cognitosync/endpoints_test.go +++ b/service/cognitosync/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +872,32 @@ func TestEndpointCase21(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +931,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +990,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1049,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1029,11 +1109,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1069,10 +1149,10 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1108,11 +1188,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1129,11 +1209,11 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1148,3 +1228,19 @@ func TestEndpointCase29(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/cognitosync/serializers.go b/service/cognitosync/serializers.go index 416d334354f..0d932e4c104 100644 --- a/service/cognitosync/serializers.go +++ b/service/cognitosync/serializers.go @@ -651,8 +651,8 @@ func awsRestjson1_serializeOpHttpBindingsListDatasetsInput(v *ListDatasetsInput, } } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -715,8 +715,8 @@ func awsRestjson1_serializeOpHttpBindingsListIdentityPoolUsageInput(v *ListIdent return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -810,8 +810,8 @@ func awsRestjson1_serializeOpHttpBindingsListRecordsInput(v *ListRecordsInput, e encoder.SetQuery("lastSyncCount").Long(*v.LastSyncCount) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { diff --git a/service/connectcases/endpoints_test.go b/service/connectcases/endpoints_test.go index 20144ee06fd..9238c872008 100644 --- a/service/connectcases/endpoints_test.go +++ b/service/connectcases/endpoints_test.go @@ -14,11 +14,11 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://cases-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,11 +53,11 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://cases-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,11 +92,11 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://cases.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,11 +131,11 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://cases.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,8 +173,8 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -212,8 +212,8 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -251,8 +251,8 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -290,8 +290,8 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -326,11 +326,11 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), UseDualStack: ptr.Bool(true), } @@ -338,31 +338,11 @@ func TestEndpointCase8(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://cases-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,31 +365,11 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://cases-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,11 +404,11 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://cases.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,11 +443,11 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://cases.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,11 +482,11 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -534,11 +494,31 @@ func TestEndpointCase14(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases.us-east-1.api.aws") + uri, _ := url.Parse("https://cases-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,11 +541,31 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), UseDualStack: ptr.Bool(false), } @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://cases.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://cases.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,8 +603,8 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -623,8 +623,8 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -662,8 +662,8 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -682,8 +682,8 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -718,11 +718,11 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,11 +758,50 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,10 +819,10 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/connectcontactlens/endpoints_test.go b/service/connectcontactlens/endpoints_test.go index 23a7f18e84b..36d8f6475d4 100644 --- a/service/connectcontactlens/endpoints_test.go +++ b/service/connectcontactlens/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +755,32 @@ func TestEndpointCase18(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +814,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +873,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +932,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -912,11 +992,11 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -952,10 +1032,10 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -991,11 +1071,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1012,11 +1092,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1031,3 +1111,19 @@ func TestEndpointCase26(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/controltower/endpoints_test.go b/service/controltower/endpoints_test.go index c914523735a..1703808decf 100644 --- a/service/controltower/endpoints_test.go +++ b/service/controltower/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1145,12 +1145,32 @@ func TestEndpointCase28(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1184,12 +1204,32 @@ func TestEndpointCase29(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1223,12 +1263,32 @@ func TestEndpointCase30(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1262,12 +1322,32 @@ func TestEndpointCase31(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1302,11 +1382,11 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1342,10 +1422,10 @@ func TestEndpointCase33(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1381,11 +1461,11 @@ func TestEndpointCase34(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1402,11 +1482,11 @@ func TestEndpointCase35(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1421,3 +1501,19 @@ func TestEndpointCase36(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/databrew/endpoints_test.go b/service/databrew/endpoints_test.go index fd0c362ad24..657680462ba 100644 --- a/service/databrew/endpoints_test.go +++ b/service/databrew/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1301,32 @@ func TestEndpointCase32(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1360,32 @@ func TestEndpointCase33(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1419,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1478,32 @@ func TestEndpointCase35(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1458,11 +1538,11 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1498,10 +1578,10 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1537,11 +1617,11 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1558,11 +1638,11 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1577,3 +1657,19 @@ func TestEndpointCase40(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/dataexchange/endpoints_test.go b/service/dataexchange/endpoints_test.go index 90c263522a4..c31115568a7 100644 --- a/service/dataexchange/endpoints_test.go +++ b/service/dataexchange/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -896,8 +896,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -935,8 +935,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -955,8 +955,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -994,8 +994,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1014,8 +1014,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1053,8 +1053,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1073,8 +1073,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1112,8 +1112,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1151,8 +1151,8 @@ func TestEndpointCase30(t *testing.T) { // For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1191,8 +1191,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1212,8 +1212,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } diff --git a/service/datapipeline/endpoints_test.go b/service/datapipeline/endpoints_test.go index 5c74fda5d30..e82d6dcb88a 100644 --- a/service/datapipeline/endpoints_test.go +++ b/service/datapipeline/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +677,32 @@ func TestEndpointCase16(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +736,52 @@ func TestEndpointCase17(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +815,32 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -795,11 +875,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -835,10 +915,10 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -874,11 +954,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -895,11 +975,11 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -914,3 +994,19 @@ func TestEndpointCase23(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/dax/endpoints_test.go b/service/dax/endpoints_test.go index a4350f8402b..a37f1429b43 100644 --- a/service/dax/endpoints_test.go +++ b/service/dax/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +989,32 @@ func TestEndpointCase24(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1028,12 +1048,32 @@ func TestEndpointCase25(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1067,12 +1107,32 @@ func TestEndpointCase26(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1106,12 +1166,32 @@ func TestEndpointCase27(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1146,11 +1226,11 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1186,10 +1266,10 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1225,11 +1305,11 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1246,11 +1326,11 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1265,3 +1345,19 @@ func TestEndpointCase32(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/devicefarm/endpoints_test.go b/service/devicefarm/endpoints_test.go index 450bd9a6506..1a2c2d1d9a8 100644 --- a/service/devicefarm/endpoints_test.go +++ b/service/devicefarm/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +521,32 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +580,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +639,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase17(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +698,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -678,11 +758,11 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,10 +798,10 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -757,11 +837,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -778,11 +858,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -797,3 +877,19 @@ func TestEndpointCase20(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/docdbelastic/endpoints_test.go b/service/docdbelastic/endpoints_test.go index 62de38cbd5d..7fd60e292a4 100644 --- a/service/docdbelastic/endpoints_test.go +++ b/service/docdbelastic/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://docdb-elastic-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://docdb-elastic-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://docdb-elastic.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://docdb-elastic.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://docdb-elastic-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://docdb-elastic-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://docdb-elastic.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://docdb-elastic.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic.us-east-1.api.aws") + uri, _ := url.Parse("https://docdb-elastic-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://docdb-elastic.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://docdb-elastic.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/ec2instanceconnect/endpoints_test.go b/service/ec2instanceconnect/endpoints_test.go index 80b80229b9e..8b829501bde 100644 --- a/service/ec2instanceconnect/endpoints_test.go +++ b/service/ec2instanceconnect/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/ecrpublic/endpoints_test.go b/service/ecrpublic/endpoints_test.go index 45e04623f30..5ee67c40adc 100644 --- a/service/ecrpublic/endpoints_test.go +++ b/service/ecrpublic/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -506,8 +506,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -545,8 +545,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -565,8 +565,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -604,8 +604,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -624,8 +624,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -663,8 +663,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -683,8 +683,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -722,8 +722,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -761,8 +761,8 @@ func TestEndpointCase20(t *testing.T) { // For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -801,8 +801,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -822,8 +822,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } diff --git a/service/elasticbeanstalk/endpoints.go b/service/elasticbeanstalk/endpoints.go index 3851baa1160..a76c816d1b3 100644 --- a/service/elasticbeanstalk/endpoints.go +++ b/service/elasticbeanstalk/endpoints.go @@ -474,32 +474,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "us-gov-east-1" { - uriString := "https://elasticbeanstalk.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://elasticbeanstalk.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://elasticbeanstalk.") diff --git a/service/elasticbeanstalk/endpoints_test.go b/service/elasticbeanstalk/endpoints_test.go index 2ec5506997c..22223d1ee9d 100644 --- a/service/elasticbeanstalk/endpoints_test.go +++ b/service/elasticbeanstalk/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1535,12 +1535,32 @@ func TestEndpointCase38(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1574,12 +1594,32 @@ func TestEndpointCase39(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1653,32 @@ func TestEndpointCase40(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1712,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1692,11 +1772,11 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1732,10 +1812,10 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,11 +1851,11 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1792,11 +1872,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1811,3 +1891,19 @@ func TestEndpointCase46(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase51(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go b/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go index 0778ff68804..66c42e6ca96 100644 --- a/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go +++ b/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go @@ -11,6 +11,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" "github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing/types" + smithy "github.com/aws/smithy-go" smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" @@ -318,6 +319,382 @@ func anyInstanceInServiceStateRetryable(ctx context.Context, input *DescribeInst return true, nil } +// InstanceDeregisteredWaiterOptions are waiter options for +// InstanceDeregisteredWaiter +type InstanceDeregisteredWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // InstanceDeregisteredWaiter will use default minimum delay of 15 seconds. Note + // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, InstanceDeregisteredWaiter will use default max delay of 120 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *DescribeInstanceHealthInput, *DescribeInstanceHealthOutput, error) (bool, error) +} + +// InstanceDeregisteredWaiter defines the waiters for InstanceDeregistered +type InstanceDeregisteredWaiter struct { + client DescribeInstanceHealthAPIClient + + options InstanceDeregisteredWaiterOptions +} + +// NewInstanceDeregisteredWaiter constructs a InstanceDeregisteredWaiter. +func NewInstanceDeregisteredWaiter(client DescribeInstanceHealthAPIClient, optFns ...func(*InstanceDeregisteredWaiterOptions)) *InstanceDeregisteredWaiter { + options := InstanceDeregisteredWaiterOptions{} + options.MinDelay = 15 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = instanceDeregisteredStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &InstanceDeregisteredWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for InstanceDeregistered waiter. The maxWaitDur +// is the maximum wait duration the waiter will wait. The maxWaitDur is required +// and must be greater than zero. +func (w *InstanceDeregisteredWaiter) Wait(ctx context.Context, params *DescribeInstanceHealthInput, maxWaitDur time.Duration, optFns ...func(*InstanceDeregisteredWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for InstanceDeregistered waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *InstanceDeregisteredWaiter) WaitForOutput(ctx context.Context, params *DescribeInstanceHealthInput, maxWaitDur time.Duration, optFns ...func(*InstanceDeregisteredWaiterOptions)) (*DescribeInstanceHealthOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.DescribeInstanceHealth(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for InstanceDeregistered waiter") +} + +func instanceDeregisteredStateRetryable(ctx context.Context, input *DescribeInstanceHealthInput, output *DescribeInstanceHealthOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("InstanceStates[].State", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "OutOfService" + var match = true + listOfValues, ok := pathValue.([]interface{}) + if !ok { + return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) + } + + if len(listOfValues) == 0 { + match = false + } + for _, v := range listOfValues { + value, ok := v.(*string) + if !ok { + return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + } + + if string(*value) != expectedValue { + match = false + } + } + + if match { + return false, nil + } + } + + if err != nil { + var apiErr smithy.APIError + ok := errors.As(err, &apiErr) + if !ok { + return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) + } + + if "InvalidInstance" == apiErr.ErrorCode() { + return false, nil + } + } + + return true, nil +} + +// InstanceInServiceWaiterOptions are waiter options for InstanceInServiceWaiter +type InstanceInServiceWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // InstanceInServiceWaiter will use default minimum delay of 15 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, InstanceInServiceWaiter will use default max delay of 120 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *DescribeInstanceHealthInput, *DescribeInstanceHealthOutput, error) (bool, error) +} + +// InstanceInServiceWaiter defines the waiters for InstanceInService +type InstanceInServiceWaiter struct { + client DescribeInstanceHealthAPIClient + + options InstanceInServiceWaiterOptions +} + +// NewInstanceInServiceWaiter constructs a InstanceInServiceWaiter. +func NewInstanceInServiceWaiter(client DescribeInstanceHealthAPIClient, optFns ...func(*InstanceInServiceWaiterOptions)) *InstanceInServiceWaiter { + options := InstanceInServiceWaiterOptions{} + options.MinDelay = 15 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = instanceInServiceStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &InstanceInServiceWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for InstanceInService waiter. The maxWaitDur is +// the maximum wait duration the waiter will wait. The maxWaitDur is required and +// must be greater than zero. +func (w *InstanceInServiceWaiter) Wait(ctx context.Context, params *DescribeInstanceHealthInput, maxWaitDur time.Duration, optFns ...func(*InstanceInServiceWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for InstanceInService waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *InstanceInServiceWaiter) WaitForOutput(ctx context.Context, params *DescribeInstanceHealthInput, maxWaitDur time.Duration, optFns ...func(*InstanceInServiceWaiterOptions)) (*DescribeInstanceHealthOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.DescribeInstanceHealth(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for InstanceInService waiter") +} + +func instanceInServiceStateRetryable(ctx context.Context, input *DescribeInstanceHealthInput, output *DescribeInstanceHealthOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("InstanceStates[].State", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "InService" + var match = true + listOfValues, ok := pathValue.([]interface{}) + if !ok { + return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) + } + + if len(listOfValues) == 0 { + match = false + } + for _, v := range listOfValues { + value, ok := v.(*string) + if !ok { + return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) + } + + if string(*value) != expectedValue { + match = false + } + } + + if match { + return false, nil + } + } + + if err != nil { + var apiErr smithy.APIError + ok := errors.As(err, &apiErr) + if !ok { + return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) + } + + if "InvalidInstance" == apiErr.ErrorCode() { + return true, nil + } + } + + return true, nil +} + func newServiceMetadataMiddleware_opDescribeInstanceHealth(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancing/endpoints_test.go b/service/elasticloadbalancing/endpoints_test.go index 243e78c77ba..69fa125da47 100644 --- a/service/elasticloadbalancing/endpoints_test.go +++ b/service/elasticloadbalancing/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1578,8 +1578,8 @@ func TestEndpointCase39(t *testing.T) { func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1613,32 @@ func TestEndpointCase40(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1672,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1691,12 +1731,32 @@ func TestEndpointCase42(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1730,12 +1790,32 @@ func TestEndpointCase43(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase47(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,10 +1851,10 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1810,11 +1890,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1831,11 +1911,11 @@ func TestEndpointCase46(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1850,3 +1930,19 @@ func TestEndpointCase47(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase52(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/elastictranscoder/endpoints_test.go b/service/elastictranscoder/endpoints_test.go index 57fecf84924..e6c24d4d787 100644 --- a/service/elastictranscoder/endpoints_test.go +++ b/service/elastictranscoder/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +755,32 @@ func TestEndpointCase18(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +814,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +873,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +932,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -912,11 +992,11 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -952,10 +1032,10 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -991,11 +1071,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1012,11 +1092,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1031,3 +1111,19 @@ func TestEndpointCase26(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/evidently/endpoints_test.go b/service/evidently/endpoints_test.go index a7a1dd8f723..359e2875ab1 100644 --- a/service/evidently/endpoints_test.go +++ b/service/evidently/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region eu-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region us-east-2 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -563,9 +563,9 @@ func TestEndpointCase13(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -602,9 +602,9 @@ func TestEndpointCase14(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -641,9 +641,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -680,9 +680,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -719,9 +719,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -758,9 +758,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +794,32 @@ func TestEndpointCase19(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +853,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +912,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +971,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -951,11 +1031,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -991,7 +1071,7 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1030,11 +1110,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1051,11 +1131,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1070,3 +1150,19 @@ func TestEndpointCase27(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/finspacedata/endpoints_test.go b/service/finspacedata/endpoints_test.go index cb1d24912ec..118ae9c4022 100644 --- a/service/finspacedata/endpoints_test.go +++ b/service/finspacedata/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +638,32 @@ func TestEndpointCase15(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase17(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +697,32 @@ func TestEndpointCase16(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +756,32 @@ func TestEndpointCase17(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +815,32 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -795,11 +875,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -835,10 +915,10 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -874,11 +954,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -895,11 +975,11 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -914,3 +994,19 @@ func TestEndpointCase23(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/fis/endpoints_test.go b/service/fis/endpoints_test.go index 9a9365ec7df..0fea28d5603 100644 --- a/service/fis/endpoints_test.go +++ b/service/fis/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +560,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +619,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +678,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +737,32 @@ func TestEndpointCase16(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -717,11 +797,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -757,10 +837,10 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -796,11 +876,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -817,11 +897,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -836,3 +916,19 @@ func TestEndpointCase21(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/forecast/endpoints_test.go b/service/forecast/endpoints_test.go index c553ef8f92d..0c0df22ed7d 100644 --- a/service/forecast/endpoints_test.go +++ b/service/forecast/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +911,32 @@ func TestEndpointCase22(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +970,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1029,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1028,12 +1088,32 @@ func TestEndpointCase25(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1068,11 +1148,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1108,10 +1188,10 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1147,11 +1227,11 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1168,11 +1248,11 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1187,3 +1267,19 @@ func TestEndpointCase30(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/forecastquery/endpoints_test.go b/service/forecastquery/endpoints_test.go index b4ffc65665e..d877198594f 100644 --- a/service/forecastquery/endpoints_test.go +++ b/service/forecastquery/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +911,32 @@ func TestEndpointCase22(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +970,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1029,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1028,12 +1088,32 @@ func TestEndpointCase25(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1068,11 +1148,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1108,10 +1188,10 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1147,11 +1227,11 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1168,11 +1248,11 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1187,3 +1267,19 @@ func TestEndpointCase30(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/gamesparks/endpoints_test.go b/service/gamesparks/endpoints_test.go index ae1c0ddaf17..dcbff0b64dc 100644 --- a/service/gamesparks/endpoints_test.go +++ b/service/gamesparks/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/glacier/endpoints.go b/service/glacier/endpoints.go index 6cdc5a27db3..c042a4344bf 100644 --- a/service/glacier/endpoints.go +++ b/service/glacier/endpoints.go @@ -474,32 +474,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "us-gov-east-1" { - uriString := "https://glacier.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://glacier.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://glacier.") diff --git a/service/glacier/endpoints_test.go b/service/glacier/endpoints_test.go index 040d1edf0d4..9404cb7d6fc 100644 --- a/service/glacier/endpoints_test.go +++ b/service/glacier/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1578,8 +1578,8 @@ func TestEndpointCase39(t *testing.T) { func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1617,8 +1617,8 @@ func TestEndpointCase40(t *testing.T) { func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1652,32 @@ func TestEndpointCase41(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1691,12 +1711,32 @@ func TestEndpointCase42(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1730,12 +1770,32 @@ func TestEndpointCase43(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase46(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1769,12 +1829,32 @@ func TestEndpointCase44(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase48(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1810,10 +1890,10 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1849,11 +1929,11 @@ func TestEndpointCase46(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1870,11 +1950,11 @@ func TestEndpointCase47(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase48(t *testing.T) { +func TestEndpointCase52(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1889,3 +1969,19 @@ func TestEndpointCase48(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase53(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/greengrass/endpoints.go b/service/greengrass/endpoints.go index 833d13c94b9..e4f340b153b 100644 --- a/service/greengrass/endpoints.go +++ b/service/greengrass/endpoints.go @@ -530,32 +530,6 @@ func (r *resolver) ResolveEndpoint( }(), }, nil } - if _Region == "us-gov-east-1" { - uriString := "https://greengrass.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://greengrass.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://greengrass.") diff --git a/service/greengrass/endpoints_test.go b/service/greengrass/endpoints_test.go index 036998b11b9..1c6e4637e3b 100644 --- a/service/greengrass/endpoints_test.go +++ b/service/greengrass/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("dataplane-us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -808,8 +808,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("dataplane-us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -857,8 +857,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -896,8 +896,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -935,8 +935,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -974,8 +974,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1013,8 +1013,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1052,8 +1052,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1087,12 +1087,32 @@ func TestEndpointCase26(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1126,12 +1146,32 @@ func TestEndpointCase27(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1165,12 +1205,32 @@ func TestEndpointCase28(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1204,12 +1264,32 @@ func TestEndpointCase29(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1244,11 +1324,11 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1284,10 +1364,10 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1323,11 +1403,11 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1344,11 +1424,11 @@ func TestEndpointCase33(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1363,3 +1443,19 @@ func TestEndpointCase34(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/greengrassv2/endpoints_test.go b/service/greengrassv2/endpoints_test.go index 955d9912ab3..fcd49b89218 100644 --- a/service/greengrassv2/endpoints_test.go +++ b/service/greengrassv2/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("dataplane-us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -808,8 +808,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("dataplane-us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -857,8 +857,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -896,8 +896,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -935,8 +935,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -974,8 +974,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1013,8 +1013,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1052,8 +1052,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1091,8 +1091,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1111,8 +1111,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1150,8 +1150,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1170,8 +1170,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1209,8 +1209,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1229,8 +1229,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1268,8 +1268,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1288,8 +1288,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1327,8 +1327,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1366,8 +1366,8 @@ func TestEndpointCase35(t *testing.T) { // For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1406,8 +1406,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1427,8 +1427,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } diff --git a/service/honeycode/endpoints_test.go b/service/honeycode/endpoints_test.go index 5f7f8068cce..b1678441f01 100644 --- a/service/honeycode/endpoints_test.go +++ b/service/honeycode/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +521,32 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +580,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +639,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase17(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +698,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -678,11 +758,11 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,10 +798,10 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -757,11 +837,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -778,11 +858,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -797,3 +877,19 @@ func TestEndpointCase20(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/inspector/endpoints_test.go b/service/inspector/endpoints_test.go index c3ea8e95fc2..2ce1792b3bb 100644 --- a/service/inspector/endpoints_test.go +++ b/service/inspector/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1106,12 +1106,32 @@ func TestEndpointCase27(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1145,12 +1165,32 @@ func TestEndpointCase28(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1184,12 +1224,32 @@ func TestEndpointCase29(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1223,12 +1283,32 @@ func TestEndpointCase30(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1263,11 +1343,11 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1303,10 +1383,10 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1342,11 +1422,11 @@ func TestEndpointCase33(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1363,11 +1443,11 @@ func TestEndpointCase34(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1382,3 +1462,19 @@ func TestEndpointCase35(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/iot1clickdevicesservice/endpoints_test.go b/service/iot1clickdevicesservice/endpoints_test.go index db7840677c3..2aaa4fec583 100644 --- a/service/iot1clickdevicesservice/endpoints_test.go +++ b/service/iot1clickdevicesservice/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/iot1clickprojects/endpoints_test.go b/service/iot1clickprojects/endpoints_test.go index 86ba186be0a..b5c1084a793 100644 --- a/service/iot1clickprojects/endpoints_test.go +++ b/service/iot1clickprojects/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +716,32 @@ func TestEndpointCase17(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +775,32 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +834,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +893,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -873,11 +953,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -913,10 +993,10 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -952,11 +1032,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -973,11 +1053,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -992,3 +1072,19 @@ func TestEndpointCase25(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/iotanalytics/endpoints_test.go b/service/iotanalytics/endpoints_test.go index bf276378f0b..2067f8a942b 100644 --- a/service/iotanalytics/endpoints_test.go +++ b/service/iotanalytics/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +755,32 @@ func TestEndpointCase18(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +814,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +873,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +932,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -912,11 +992,11 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -952,10 +1032,10 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -991,11 +1071,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1012,11 +1092,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1031,3 +1111,19 @@ func TestEndpointCase26(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/iotevents/endpoints_test.go b/service/iotevents/endpoints_test.go index d34157cc5aa..0edf23825f4 100644 --- a/service/iotevents/endpoints_test.go +++ b/service/iotevents/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +950,32 @@ func TestEndpointCase23(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1009,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1028,12 +1068,32 @@ func TestEndpointCase25(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1067,12 +1127,32 @@ func TestEndpointCase26(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1107,11 +1187,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1147,10 +1227,10 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1186,11 +1266,11 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1207,11 +1287,11 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1226,3 +1306,19 @@ func TestEndpointCase31(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/ioteventsdata/endpoints_test.go b/service/ioteventsdata/endpoints_test.go index e58f426869e..4e88ad37995 100644 --- a/service/ioteventsdata/endpoints_test.go +++ b/service/ioteventsdata/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/iotfleethub/endpoints_test.go b/service/iotfleethub/endpoints_test.go index 8c94948fe74..99dba8be7db 100644 --- a/service/iotfleethub/endpoints_test.go +++ b/service/iotfleethub/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1067,12 +1067,32 @@ func TestEndpointCase26(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1106,12 +1126,32 @@ func TestEndpointCase27(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1145,12 +1185,32 @@ func TestEndpointCase28(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1184,12 +1244,32 @@ func TestEndpointCase29(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1224,11 +1304,11 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1264,10 +1344,10 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1303,11 +1383,11 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1324,11 +1404,11 @@ func TestEndpointCase33(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1343,3 +1423,19 @@ func TestEndpointCase34(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/iotjobsdataplane/endpoints_test.go b/service/iotjobsdataplane/endpoints_test.go index 2945f51dd3d..db36884fdee 100644 --- a/service/iotjobsdataplane/endpoints_test.go +++ b/service/iotjobsdataplane/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1418,32 @@ func TestEndpointCase35(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1457,12 +1477,32 @@ func TestEndpointCase36(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1496,12 +1536,32 @@ func TestEndpointCase37(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1535,12 +1595,32 @@ func TestEndpointCase38(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1575,11 +1655,11 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1615,10 +1695,10 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1654,11 +1734,11 @@ func TestEndpointCase41(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1675,11 +1755,11 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1694,3 +1774,19 @@ func TestEndpointCase43(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase48(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/iotroborunner/endpoints_test.go b/service/iotroborunner/endpoints_test.go index 1f48fc2e7cf..9e7d15f4d2f 100644 --- a/service/iotroborunner/endpoints_test.go +++ b/service/iotroborunner/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://iotroborunner-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://iotroborunner-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://iotroborunner.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://iotroborunner.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://iotroborunner-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://iotroborunner-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://iotroborunner.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://iotroborunner.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner.us-east-1.api.aws") + uri, _ := url.Parse("https://iotroborunner-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://iotroborunner.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://iotroborunner.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/iotsecuretunneling/endpoints_test.go b/service/iotsecuretunneling/endpoints_test.go index 47b861ea45e..c55df2059df 100644 --- a/service/iotsecuretunneling/endpoints_test.go +++ b/service/iotsecuretunneling/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1418,32 @@ func TestEndpointCase35(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1457,12 +1477,32 @@ func TestEndpointCase36(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1496,12 +1536,32 @@ func TestEndpointCase37(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1535,12 +1595,32 @@ func TestEndpointCase38(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1575,11 +1655,11 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1615,10 +1695,10 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1654,11 +1734,11 @@ func TestEndpointCase41(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1675,11 +1755,11 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1694,3 +1774,19 @@ func TestEndpointCase43(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase48(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/iotthingsgraph/endpoints_test.go b/service/iotthingsgraph/endpoints_test.go index 9c823ed3965..bdbc483da6c 100644 --- a/service/iotthingsgraph/endpoints_test.go +++ b/service/iotthingsgraph/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +677,32 @@ func TestEndpointCase16(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +736,32 @@ func TestEndpointCase17(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +795,32 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +854,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -834,11 +914,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -874,10 +954,10 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -913,11 +993,11 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -934,11 +1014,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -953,3 +1033,19 @@ func TestEndpointCase24(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/ivschat/endpoints_test.go b/service/ivschat/endpoints_test.go index 6246be608fe..90d8a810cf8 100644 --- a/service/ivschat/endpoints_test.go +++ b/service/ivschat/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +560,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +619,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +678,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +737,32 @@ func TestEndpointCase16(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -717,11 +797,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -757,10 +837,10 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -796,11 +876,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -817,11 +897,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -836,3 +916,19 @@ func TestEndpointCase21(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/kendraranking/endpoints_test.go b/service/kendraranking/endpoints_test.go index a8759d13a7d..c489f7fcad5 100644 --- a/service/kendraranking/endpoints_test.go +++ b/service/kendraranking/endpoints_test.go @@ -338,3 +338,19 @@ func TestEndpointCase8(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase9(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/kinesis/endpoints.go b/service/kinesis/endpoints.go index ee3be0b8d9e..8e46c766ca1 100644 --- a/service/kinesis/endpoints.go +++ b/service/kinesis/endpoints.go @@ -847,32 +847,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "us-gov-east-1" { - uriString := "https://kinesis.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://kinesis.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://kinesis.") diff --git a/service/kinesis/endpoints_test.go b/service/kinesis/endpoints_test.go index 0f37efb163e..b93e24a202a 100644 --- a/service/kinesis/endpoints_test.go +++ b/service/kinesis/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1578,8 +1578,8 @@ func TestEndpointCase39(t *testing.T) { func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1613,32 @@ func TestEndpointCase40(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1672,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1691,12 +1731,32 @@ func TestEndpointCase42(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1730,12 +1790,32 @@ func TestEndpointCase43(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase47(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,10 +1851,10 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1810,11 +1890,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1831,11 +1911,11 @@ func TestEndpointCase46(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1851,8 +1931,24 @@ func TestEndpointCase47(t *testing.T) { } } +// Missing region +func TestEndpointCase52(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // Invalid ARN: Failed to parse ARN. -func TestEndpointCase48(t *testing.T) { +func TestEndpointCase53(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1873,7 +1969,7 @@ func TestEndpointCase48(t *testing.T) { } // Invalid ARN: partition missing from ARN. -func TestEndpointCase49(t *testing.T) { +func TestEndpointCase54(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1894,7 +1990,7 @@ func TestEndpointCase49(t *testing.T) { } // Invalid ARN: partitions mismatch. -func TestEndpointCase50(t *testing.T) { +func TestEndpointCase55(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), @@ -1915,7 +2011,7 @@ func TestEndpointCase50(t *testing.T) { } // Invalid ARN: Not Kinesis -func TestEndpointCase51(t *testing.T) { +func TestEndpointCase56(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1936,7 +2032,7 @@ func TestEndpointCase51(t *testing.T) { } // Invalid ARN: Region is missing in ARN -func TestEndpointCase52(t *testing.T) { +func TestEndpointCase57(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1957,7 +2053,7 @@ func TestEndpointCase52(t *testing.T) { } // Invalid ARN: Region is empty string in ARN -func TestEndpointCase53(t *testing.T) { +func TestEndpointCase58(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1978,7 +2074,7 @@ func TestEndpointCase53(t *testing.T) { } // Invalid ARN: Invalid account id -func TestEndpointCase54(t *testing.T) { +func TestEndpointCase59(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2000,7 +2096,7 @@ func TestEndpointCase54(t *testing.T) { } // Invalid ARN: Invalid account id -func TestEndpointCase55(t *testing.T) { +func TestEndpointCase60(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2022,7 +2118,7 @@ func TestEndpointCase55(t *testing.T) { } // Invalid ARN: Kinesis ARNs only support stream arn types -func TestEndpointCase56(t *testing.T) { +func TestEndpointCase61(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2043,7 +2139,7 @@ func TestEndpointCase56(t *testing.T) { } // Dual Stack not supported region. -func TestEndpointCase57(t *testing.T) { +func TestEndpointCase62(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), UseFIPS: ptr.Bool(true), @@ -2065,7 +2161,7 @@ func TestEndpointCase57(t *testing.T) { } // OperationType not set -func TestEndpointCase58(t *testing.T) { +func TestEndpointCase63(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2086,7 +2182,7 @@ func TestEndpointCase58(t *testing.T) { } // Custom Endpoint is specified -func TestEndpointCase59(t *testing.T) { +func TestEndpointCase64(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2128,7 +2224,7 @@ func TestEndpointCase59(t *testing.T) { } // Account endpoint targeting control operation type -func TestEndpointCase60(t *testing.T) { +func TestEndpointCase65(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2169,7 +2265,7 @@ func TestEndpointCase60(t *testing.T) { } // Account endpoint targeting data operation type -func TestEndpointCase61(t *testing.T) { +func TestEndpointCase66(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2210,7 +2306,7 @@ func TestEndpointCase61(t *testing.T) { } // Account endpoint with fips targeting data operation type -func TestEndpointCase62(t *testing.T) { +func TestEndpointCase67(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -2251,7 +2347,7 @@ func TestEndpointCase62(t *testing.T) { } // Account endpoint with fips targeting control operation type -func TestEndpointCase63(t *testing.T) { +func TestEndpointCase68(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -2292,7 +2388,7 @@ func TestEndpointCase63(t *testing.T) { } // Account endpoint with Dual Stack and FIPS enabled -func TestEndpointCase64(t *testing.T) { +func TestEndpointCase69(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -2333,7 +2429,7 @@ func TestEndpointCase64(t *testing.T) { } // Account endpoint with Dual Stack enabled -func TestEndpointCase65(t *testing.T) { +func TestEndpointCase70(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), @@ -2374,7 +2470,7 @@ func TestEndpointCase65(t *testing.T) { } // Account endpoint with FIPS and DualStack disabled -func TestEndpointCase66(t *testing.T) { +func TestEndpointCase71(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), @@ -2415,7 +2511,7 @@ func TestEndpointCase66(t *testing.T) { } // RegionMismatch: client region should be used for endpoint region -func TestEndpointCase67(t *testing.T) { +func TestEndpointCase72(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2456,7 +2552,7 @@ func TestEndpointCase67(t *testing.T) { } // Account endpoint with FIPS enabled -func TestEndpointCase68(t *testing.T) { +func TestEndpointCase73(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(true), @@ -2497,7 +2593,7 @@ func TestEndpointCase68(t *testing.T) { } // Account endpoint with FIPS and DualStack enabled for cn regions. -func TestEndpointCase69(t *testing.T) { +func TestEndpointCase74(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(true), @@ -2538,7 +2634,7 @@ func TestEndpointCase69(t *testing.T) { } // Account endpoint targeting control operation type in ADC regions -func TestEndpointCase70(t *testing.T) { +func TestEndpointCase75(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -2579,7 +2675,7 @@ func TestEndpointCase70(t *testing.T) { } // Account endpoint targeting control operation type in ADC regions -func TestEndpointCase71(t *testing.T) { +func TestEndpointCase76(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), UseFIPS: ptr.Bool(false), @@ -2620,7 +2716,7 @@ func TestEndpointCase71(t *testing.T) { } // Account endpoint targeting data operation type in ADC regions -func TestEndpointCase72(t *testing.T) { +func TestEndpointCase77(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -2661,7 +2757,7 @@ func TestEndpointCase72(t *testing.T) { } // Account endpoint with fips targeting control operation type in ADC regions -func TestEndpointCase73(t *testing.T) { +func TestEndpointCase78(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -2702,7 +2798,7 @@ func TestEndpointCase73(t *testing.T) { } // Account endpoint with fips targeting data operation type in ADC regions -func TestEndpointCase74(t *testing.T) { +func TestEndpointCase79(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -2743,7 +2839,7 @@ func TestEndpointCase74(t *testing.T) { } // Invalid ConsumerARN: Failed to parse ARN. -func TestEndpointCase75(t *testing.T) { +func TestEndpointCase80(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2764,7 +2860,7 @@ func TestEndpointCase75(t *testing.T) { } // Invalid ConsumerARN: partition missing from ARN. -func TestEndpointCase76(t *testing.T) { +func TestEndpointCase81(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2785,7 +2881,7 @@ func TestEndpointCase76(t *testing.T) { } // Invalid ARN: partitions mismatch. -func TestEndpointCase77(t *testing.T) { +func TestEndpointCase82(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), @@ -2806,7 +2902,7 @@ func TestEndpointCase77(t *testing.T) { } // Invalid ARN: Not Kinesis -func TestEndpointCase78(t *testing.T) { +func TestEndpointCase83(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2827,7 +2923,7 @@ func TestEndpointCase78(t *testing.T) { } // Invalid ARN: Region is missing in ARN -func TestEndpointCase79(t *testing.T) { +func TestEndpointCase84(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2848,7 +2944,7 @@ func TestEndpointCase79(t *testing.T) { } // Invalid ARN: Region is empty string in ARN -func TestEndpointCase80(t *testing.T) { +func TestEndpointCase85(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2869,7 +2965,7 @@ func TestEndpointCase80(t *testing.T) { } // Invalid ARN: Invalid account id -func TestEndpointCase81(t *testing.T) { +func TestEndpointCase86(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2891,7 +2987,7 @@ func TestEndpointCase81(t *testing.T) { } // Invalid ARN: Invalid account id -func TestEndpointCase82(t *testing.T) { +func TestEndpointCase87(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2913,7 +3009,7 @@ func TestEndpointCase82(t *testing.T) { } // Invalid ARN: Kinesis ARNs only support stream arn/consumer arn types -func TestEndpointCase83(t *testing.T) { +func TestEndpointCase88(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2934,7 +3030,7 @@ func TestEndpointCase83(t *testing.T) { } // Dual Stack not supported region. -func TestEndpointCase84(t *testing.T) { +func TestEndpointCase89(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), UseFIPS: ptr.Bool(true), @@ -2956,7 +3052,7 @@ func TestEndpointCase84(t *testing.T) { } // OperationType not set -func TestEndpointCase85(t *testing.T) { +func TestEndpointCase90(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -2977,7 +3073,7 @@ func TestEndpointCase85(t *testing.T) { } // Custom Endpoint is specified -func TestEndpointCase86(t *testing.T) { +func TestEndpointCase91(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -3019,7 +3115,7 @@ func TestEndpointCase86(t *testing.T) { } // Account endpoint targeting control operation type -func TestEndpointCase87(t *testing.T) { +func TestEndpointCase92(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -3060,7 +3156,7 @@ func TestEndpointCase87(t *testing.T) { } // Account endpoint targeting data operation type -func TestEndpointCase88(t *testing.T) { +func TestEndpointCase93(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -3101,7 +3197,7 @@ func TestEndpointCase88(t *testing.T) { } // Account endpoint with fips targeting data operation type -func TestEndpointCase89(t *testing.T) { +func TestEndpointCase94(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -3142,7 +3238,7 @@ func TestEndpointCase89(t *testing.T) { } // Account endpoint with fips targeting control operation type -func TestEndpointCase90(t *testing.T) { +func TestEndpointCase95(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -3183,7 +3279,7 @@ func TestEndpointCase90(t *testing.T) { } // Account endpoint with Dual Stack and FIPS enabled -func TestEndpointCase91(t *testing.T) { +func TestEndpointCase96(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -3224,7 +3320,7 @@ func TestEndpointCase91(t *testing.T) { } // Account endpoint with Dual Stack enabled -func TestEndpointCase92(t *testing.T) { +func TestEndpointCase97(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), @@ -3265,7 +3361,7 @@ func TestEndpointCase92(t *testing.T) { } // Account endpoint with FIPS and DualStack disabled -func TestEndpointCase93(t *testing.T) { +func TestEndpointCase98(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), @@ -3306,7 +3402,7 @@ func TestEndpointCase93(t *testing.T) { } // RegionMismatch: client region should be used for endpoint region -func TestEndpointCase94(t *testing.T) { +func TestEndpointCase99(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -3347,7 +3443,7 @@ func TestEndpointCase94(t *testing.T) { } // Account endpoint with FIPS enabled -func TestEndpointCase95(t *testing.T) { +func TestEndpointCase100(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(true), @@ -3388,7 +3484,7 @@ func TestEndpointCase95(t *testing.T) { } // Account endpoint with FIPS and DualStack enabled for cn regions. -func TestEndpointCase96(t *testing.T) { +func TestEndpointCase101(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(true), @@ -3429,7 +3525,7 @@ func TestEndpointCase96(t *testing.T) { } // Account endpoint targeting control operation type in ADC regions -func TestEndpointCase97(t *testing.T) { +func TestEndpointCase102(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -3470,7 +3566,7 @@ func TestEndpointCase97(t *testing.T) { } // Account endpoint targeting control operation type in ADC regions -func TestEndpointCase98(t *testing.T) { +func TestEndpointCase103(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), UseFIPS: ptr.Bool(false), @@ -3511,7 +3607,7 @@ func TestEndpointCase98(t *testing.T) { } // Account endpoint targeting data operation type in ADC regions -func TestEndpointCase99(t *testing.T) { +func TestEndpointCase104(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -3552,7 +3648,7 @@ func TestEndpointCase99(t *testing.T) { } // Account endpoint with fips targeting control operation type in ADC regions -func TestEndpointCase100(t *testing.T) { +func TestEndpointCase105(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -3593,7 +3689,7 @@ func TestEndpointCase100(t *testing.T) { } // Account endpoint with fips targeting data operation type in ADC regions -func TestEndpointCase101(t *testing.T) { +func TestEndpointCase106(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -3634,7 +3730,7 @@ func TestEndpointCase101(t *testing.T) { } // ConsumerARN targeting US-EAST-1 -func TestEndpointCase102(t *testing.T) { +func TestEndpointCase107(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -3675,7 +3771,7 @@ func TestEndpointCase102(t *testing.T) { } // Both StreamARN and ConsumerARN specified. StreamARN should take precedence -func TestEndpointCase103(t *testing.T) { +func TestEndpointCase108(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), diff --git a/service/kinesisanalytics/endpoints_test.go b/service/kinesisanalytics/endpoints_test.go index fbe845d1d33..29cdef3ed6c 100644 --- a/service/kinesisanalytics/endpoints_test.go +++ b/service/kinesisanalytics/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1340,32 @@ func TestEndpointCase33(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1399,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1458,32 @@ func TestEndpointCase35(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1457,12 +1517,32 @@ func TestEndpointCase36(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1497,11 +1577,11 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1537,10 +1617,10 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1576,11 +1656,11 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1597,11 +1677,11 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1616,3 +1696,19 @@ func TestEndpointCase41(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase46(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/kinesisvideoarchivedmedia/api_op_GetImages.go b/service/kinesisvideoarchivedmedia/api_op_GetImages.go index b4050967ba8..bf8e80289ef 100644 --- a/service/kinesisvideoarchivedmedia/api_op_GetImages.go +++ b/service/kinesisvideoarchivedmedia/api_op_GetImages.go @@ -204,6 +204,97 @@ func (c *Client) addOperationGetImagesMiddlewares(stack *middleware.Stack, optio return nil } +// GetImagesAPIClient is a client that implements the GetImages operation. +type GetImagesAPIClient interface { + GetImages(context.Context, *GetImagesInput, ...func(*Options)) (*GetImagesOutput, error) +} + +var _ GetImagesAPIClient = (*Client)(nil) + +// GetImagesPaginatorOptions is the paginator options for GetImages +type GetImagesPaginatorOptions struct { + // The maximum number of images to be returned by the API. The default limit is 25 + // images per API response. Providing a MaxResults greater than this value will + // result in a page size of 25. Any additional results will be paginated. + Limit int64 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetImagesPaginator is a paginator for GetImages +type GetImagesPaginator struct { + options GetImagesPaginatorOptions + client GetImagesAPIClient + params *GetImagesInput + nextToken *string + firstPage bool +} + +// NewGetImagesPaginator returns a new GetImagesPaginator +func NewGetImagesPaginator(client GetImagesAPIClient, params *GetImagesInput, optFns ...func(*GetImagesPaginatorOptions)) *GetImagesPaginator { + if params == nil { + params = &GetImagesInput{} + } + + options := GetImagesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetImagesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetImagesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetImages page. +func (p *GetImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetImagesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int64 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.GetImages(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opGetImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisvideoarchivedmedia/api_op_ListFragments.go b/service/kinesisvideoarchivedmedia/api_op_ListFragments.go index fb9bd2067cf..cf879133858 100644 --- a/service/kinesisvideoarchivedmedia/api_op_ListFragments.go +++ b/service/kinesisvideoarchivedmedia/api_op_ListFragments.go @@ -173,6 +173,98 @@ func (c *Client) addOperationListFragmentsMiddlewares(stack *middleware.Stack, o return nil } +// ListFragmentsAPIClient is a client that implements the ListFragments operation. +type ListFragmentsAPIClient interface { + ListFragments(context.Context, *ListFragmentsInput, ...func(*Options)) (*ListFragmentsOutput, error) +} + +var _ ListFragmentsAPIClient = (*Client)(nil) + +// ListFragmentsPaginatorOptions is the paginator options for ListFragments +type ListFragmentsPaginatorOptions struct { + // The total number of fragments to return. If the total number of fragments + // available is more than the value specified in max-results , then a + // ListFragmentsOutput$NextToken is provided in the output that you can use to + // resume pagination. + Limit int64 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListFragmentsPaginator is a paginator for ListFragments +type ListFragmentsPaginator struct { + options ListFragmentsPaginatorOptions + client ListFragmentsAPIClient + params *ListFragmentsInput + nextToken *string + firstPage bool +} + +// NewListFragmentsPaginator returns a new ListFragmentsPaginator +func NewListFragmentsPaginator(client ListFragmentsAPIClient, params *ListFragmentsInput, optFns ...func(*ListFragmentsPaginatorOptions)) *ListFragmentsPaginator { + if params == nil { + params = &ListFragmentsInput{} + } + + options := ListFragmentsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListFragmentsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListFragmentsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListFragments page. +func (p *ListFragmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFragmentsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int64 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListFragments(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + func newServiceMetadataMiddleware_opListFragments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisvideomedia/endpoints_test.go b/service/kinesisvideomedia/endpoints_test.go index 556ff5a63a4..e12908b3c98 100644 --- a/service/kinesisvideomedia/endpoints_test.go +++ b/service/kinesisvideomedia/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1067,12 +1067,32 @@ func TestEndpointCase26(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1106,12 +1126,32 @@ func TestEndpointCase27(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1145,12 +1185,32 @@ func TestEndpointCase28(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1184,12 +1244,32 @@ func TestEndpointCase29(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1224,11 +1304,11 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1264,10 +1344,10 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1303,11 +1383,11 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1324,11 +1404,11 @@ func TestEndpointCase33(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1343,3 +1423,19 @@ func TestEndpointCase34(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/kinesisvideosignaling/endpoints_test.go b/service/kinesisvideosignaling/endpoints_test.go index e904d8a046f..802a6671de9 100644 --- a/service/kinesisvideosignaling/endpoints_test.go +++ b/service/kinesisvideosignaling/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1067,12 +1067,32 @@ func TestEndpointCase26(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1106,12 +1126,32 @@ func TestEndpointCase27(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1145,12 +1185,32 @@ func TestEndpointCase28(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1184,12 +1244,32 @@ func TestEndpointCase29(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1224,11 +1304,11 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1264,10 +1344,10 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1303,11 +1383,11 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1324,11 +1404,11 @@ func TestEndpointCase33(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1343,3 +1423,19 @@ func TestEndpointCase34(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/kinesisvideowebrtcstorage/endpoints_test.go b/service/kinesisvideowebrtcstorage/endpoints_test.go index 492aab42153..3433355117b 100644 --- a/service/kinesisvideowebrtcstorage/endpoints_test.go +++ b/service/kinesisvideowebrtcstorage/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://kinesisvideo-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://kinesisvideo-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://kinesisvideo.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://kinesisvideo.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://kinesisvideo-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://kinesisvideo-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://kinesisvideo.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://kinesisvideo.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo.us-east-1.api.aws") + uri, _ := url.Parse("https://kinesisvideo-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://kinesisvideo.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://kinesisvideo.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/lexmodelbuildingservice/endpoints_test.go b/service/lexmodelbuildingservice/endpoints_test.go index 35c82a9c839..8bd11218011 100644 --- a/service/lexmodelbuildingservice/endpoints_test.go +++ b/service/lexmodelbuildingservice/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +872,32 @@ func TestEndpointCase21(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +931,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +990,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1049,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1029,11 +1109,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1069,10 +1149,10 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1108,11 +1188,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1129,11 +1209,11 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1148,3 +1228,19 @@ func TestEndpointCase29(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/lexruntimeservice/endpoints_test.go b/service/lexruntimeservice/endpoints_test.go index 5aeb53c715f..079944c99fe 100644 --- a/service/lexruntimeservice/endpoints_test.go +++ b/service/lexruntimeservice/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +872,32 @@ func TestEndpointCase21(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +931,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +990,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1049,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1029,11 +1109,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1069,10 +1149,10 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1108,11 +1188,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1129,11 +1209,11 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1148,3 +1228,19 @@ func TestEndpointCase29(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/lexruntimev2/endpoints.go b/service/lexruntimev2/endpoints.go index 54195e24bec..dc743d00be2 100644 --- a/service/lexruntimev2/endpoints.go +++ b/service/lexruntimev2/endpoints.go @@ -265,6 +265,9 @@ func (b *builtInResolver) ResolveBuiltIns(params *EndpointParameters) error { type EndpointParameters struct { // The AWS region used to dispatch the request. // + // Parameter is + // required. + // // AWS::Region Region *string @@ -298,10 +301,6 @@ type EndpointParameters struct { // ValidateRequired validates required parameters are set. func (p EndpointParameters) ValidateRequired() error { - if p.Region == nil { - return fmt.Errorf("parameter Region is required") - } - if p.UseDualStack == nil { return fmt.Errorf("parameter UseDualStack is required") } @@ -353,23 +352,117 @@ func (r *resolver) ResolveEndpoint( if err = params.ValidateRequired(); err != nil { return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) } - _Region := *params.Region _UseDualStack := *params.UseDualStack _UseFIPS := *params.UseFIPS - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if _UseFIPS == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + } + if _UseDualStack == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + } + uriString := _Endpoint + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://runtime-v2-lex-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") + } + } + if _UseFIPS == true { + if true == _PartitionResult.SupportsFIPS { + uriString := func() string { + var out strings.Builder + out.WriteString("https://runtime-v2-lex-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") } if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://runtime-v2-lex.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - uriString := _Endpoint + uriString := func() string { + var out strings.Builder + out.WriteString("https://runtime-v2-lex.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() uri, err := url.Parse(uriString) if err != nil { @@ -381,97 +474,7 @@ func (r *resolver) ResolveEndpoint( Headers: http.Header{}, }, nil } - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://runtime-v2-lex-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { - uriString := func() string { - var out strings.Builder - out.WriteString("https://runtime-v2-lex-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://runtime-v2-lex.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://runtime-v2-lex.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil + return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") } diff --git a/service/lexruntimev2/endpoints_test.go b/service/lexruntimev2/endpoints_test.go index f4bfbda4325..38c40342021 100644 --- a/service/lexruntimev2/endpoints_test.go +++ b/service/lexruntimev2/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region ca-central-1 with FIPS enabled and DualStack enabled +// For region af-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - Region: ptr.String("ca-central-1"), + Region: ptr.String("af-south-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.ca-central-1.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex.af-south-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region ca-central-1 with FIPS enabled and DualStack disabled +// For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("ap-northeast-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.ca-central-1.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex.ap-northeast-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region ca-central-1 with FIPS disabled and DualStack enabled +// For region ap-northeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-2"), UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - Region: ptr.String("ca-central-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.ca-central-1.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex.ap-northeast-2.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region ca-central-1 with FIPS disabled and DualStack disabled +// For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.ca-central-1.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex.ap-southeast-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -170,12 +170,12 @@ func TestEndpointCase3(t *testing.T) { } } -// For region eu-central-1 with FIPS enabled and DualStack enabled +// For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - Region: ptr.String("eu-central-1"), + Region: ptr.String("ap-southeast-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -186,7 +186,7 @@ func TestEndpointCase4(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.eu-central-1.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex.ap-southeast-2.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -209,12 +209,12 @@ func TestEndpointCase4(t *testing.T) { } } -// For region eu-central-1 with FIPS enabled and DualStack disabled +// For region ca-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("ca-central-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -225,7 +225,7 @@ func TestEndpointCase5(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.eu-central-1.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex.ca-central-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -248,12 +248,12 @@ func TestEndpointCase5(t *testing.T) { } } -// For region eu-central-1 with FIPS disabled and DualStack enabled +// For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), Region: ptr.String("eu-central-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -264,7 +264,7 @@ func TestEndpointCase6(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.eu-central-1.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex.eu-central-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -287,12 +287,12 @@ func TestEndpointCase6(t *testing.T) { } } -// For region eu-central-1 with FIPS disabled and DualStack disabled +// For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -303,7 +303,7 @@ func TestEndpointCase7(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.eu-central-1.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex.eu-west-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -326,12 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-west-2 with FIPS enabled and DualStack enabled +// For region eu-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-west-2"), + Region: ptr.String("eu-west-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -342,7 +342,7 @@ func TestEndpointCase8(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.us-west-2.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex.eu-west-2.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -365,12 +365,12 @@ func TestEndpointCase8(t *testing.T) { } } -// For region us-west-2 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -381,7 +381,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.us-west-2.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -404,12 +404,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-west-2 with FIPS disabled and DualStack enabled +// For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), Region: ptr.String("us-west-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -420,7 +420,7 @@ func TestEndpointCase10(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.us-west-2.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex.us-west-2.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -443,12 +443,12 @@ func TestEndpointCase10(t *testing.T) { } } -// For region us-west-2 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -459,7 +459,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.us-west-2.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -482,12 +482,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region af-south-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - Region: ptr.String("af-south-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -498,7 +498,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.af-south-1.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -521,12 +521,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region af-south-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - Region: ptr.String("af-south-1"), + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -537,7 +537,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.af-south-1.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -560,12 +560,12 @@ func TestEndpointCase13(t *testing.T) { } } -// For region af-south-1 with FIPS disabled and DualStack enabled +// For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), + Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("af-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -576,7 +576,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.af-south-1.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex-fips.cn-north-1.api.amazonwebservices.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -599,12 +599,12 @@ func TestEndpointCase14(t *testing.T) { } } -// For region af-south-1 with FIPS disabled and DualStack disabled +// For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), + Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("af-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -615,7 +615,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.af-south-1.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex-fips.cn-north-1.amazonaws.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -638,12 +638,12 @@ func TestEndpointCase15(t *testing.T) { } } -// For region eu-west-2 with FIPS enabled and DualStack enabled +// For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -654,7 +654,7 @@ func TestEndpointCase16(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.eu-west-2.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex.cn-north-1.api.amazonwebservices.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -677,12 +677,12 @@ func TestEndpointCase16(t *testing.T) { } } -// For region eu-west-2 with FIPS enabled and DualStack disabled +// For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -693,7 +693,7 @@ func TestEndpointCase17(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.eu-west-2.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex.cn-north-1.amazonaws.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -716,12 +716,12 @@ func TestEndpointCase17(t *testing.T) { } } -// For region eu-west-2 with FIPS disabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -732,7 +732,7 @@ func TestEndpointCase18(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.eu-west-2.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -755,12 +755,12 @@ func TestEndpointCase18(t *testing.T) { } } -// For region eu-west-2 with FIPS disabled and DualStack disabled +// For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -771,7 +771,7 @@ func TestEndpointCase19(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.eu-west-2.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -794,12 +794,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For region eu-west-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -810,7 +810,7 @@ func TestEndpointCase20(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.eu-west-1.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -833,12 +833,12 @@ func TestEndpointCase20(t *testing.T) { } } -// For region eu-west-1 with FIPS enabled and DualStack disabled +// For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -849,7 +849,7 @@ func TestEndpointCase21(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.eu-west-1.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -872,51 +872,32 @@ func TestEndpointCase21(t *testing.T) { } } -// For region eu-west-1 with FIPS disabled and DualStack enabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex.eu-west-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) + if err == nil { + t.Fatalf("expect error, got none") } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) } } -// For region eu-west-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -927,7 +908,7 @@ func TestEndpointCase23(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.eu-west-1.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -950,51 +931,32 @@ func TestEndpointCase23(t *testing.T) { } } -// For region ap-northeast-2 with FIPS enabled and DualStack enabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex-fips.ap-northeast-2.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) + if err == nil { + t.Fatalf("expect error, got none") } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) } } -// For region ap-northeast-2 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -1005,7 +967,7 @@ func TestEndpointCase25(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.ap-northeast-2.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1028,51 +990,32 @@ func TestEndpointCase25(t *testing.T) { } } -// For region ap-northeast-2 with FIPS disabled and DualStack enabled +// For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex.ap-northeast-2.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) + if err == nil { + t.Fatalf("expect error, got none") } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) } } -// For region ap-northeast-2 with FIPS disabled and DualStack disabled +// For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -1083,7 +1026,7 @@ func TestEndpointCase27(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.ap-northeast-2.amazonaws.com") + uri, _ := url.Parse("https://runtime-v2-lex-fips.us-isob-east-1.sc2s.sgov.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1106,12 +1049,32 @@ func TestEndpointCase27(t *testing.T) { } } -// For region ap-northeast-1 with FIPS enabled and DualStack enabled +// For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("ap-northeast-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-isob-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1122,7 +1085,7 @@ func TestEndpointCase28(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.ap-northeast-1.api.aws") + uri, _ := url.Parse("https://runtime-v2-lex.us-isob-east-1.sc2s.sgov.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1145,12 +1108,13 @@ func TestEndpointCase28(t *testing.T) { } } -// For region ap-northeast-1 with FIPS enabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +// For custom endpoint with region set and fips disabled and dualstack disabled +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), + Endpoint: ptr.String("https://example.com"), } resolver := NewDefaultEndpointResolverV2() @@ -1161,7 +1125,7 @@ func TestEndpointCase29(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex-fips.ap-northeast-1.amazonaws.com") + uri, _ := url.Parse("https://example.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1184,12 +1148,12 @@ func TestEndpointCase29(t *testing.T) { } } -// For region ap-northeast-1 with FIPS disabled and DualStack enabled -func TestEndpointCase30(t *testing.T) { +// For custom endpoint with region not set and fips disabled and dualstack disabled +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - Region: ptr.String("ap-northeast-1"), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), } resolver := NewDefaultEndpointResolverV2() @@ -1200,7 +1164,7 @@ func TestEndpointCase30(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://runtime-v2-lex.ap-northeast-1.api.aws") + uri, _ := url.Parse("https://example.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1223,519 +1187,12 @@ func TestEndpointCase30(t *testing.T) { } } -// For region ap-northeast-1 with FIPS disabled and DualStack disabled -func TestEndpointCase31(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex.ap-northeast-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region ap-southeast-1 with FIPS enabled and DualStack enabled -func TestEndpointCase32(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - Region: ptr.String("ap-southeast-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex-fips.ap-southeast-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region ap-southeast-1 with FIPS enabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex-fips.ap-southeast-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region ap-southeast-1 with FIPS disabled and DualStack enabled -func TestEndpointCase34(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - Region: ptr.String("ap-southeast-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex.ap-southeast-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region ap-southeast-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex.ap-southeast-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region ap-southeast-2 with FIPS enabled and DualStack enabled -func TestEndpointCase36(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - Region: ptr.String("ap-southeast-2"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex-fips.ap-southeast-2.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region ap-southeast-2 with FIPS enabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex-fips.ap-southeast-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region ap-southeast-2 with FIPS disabled and DualStack enabled -func TestEndpointCase38(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - Region: ptr.String("ap-southeast-2"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex.ap-southeast-2.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region ap-southeast-2 with FIPS disabled and DualStack disabled -func TestEndpointCase39(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex.ap-southeast-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase40(t *testing.T) { +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), Region: ptr.String("us-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex-fips.us-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase41(t *testing.T) { - var params = EndpointParameters{ UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex-fips.us-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase42(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex.us-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For region us-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase43(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://runtime-v2-lex.us-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) - } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) - } -} - -// For custom endpoint with fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1743,39 +1200,20 @@ func TestEndpointCase44(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://example.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { - t.Errorf("expect headers to match\n%s", diff) + if err == nil { + t.Fatalf("expect error, got none") } - - if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, - cmp.AllowUnexported(smithy.Properties{}), - ); diff != "" { - t.Errorf("expect properties to match\n%s", diff) + if e, a := "Invalid Configuration: FIPS and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) } } -// For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +// For custom endpoint with fips disabled and dualstack enabled +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1786,19 +1224,14 @@ func TestEndpointCase45(t *testing.T) { if err == nil { t.Fatalf("expect error, got none") } - if e, a := "Invalid Configuration: FIPS and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + if e, a := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { t.Errorf("expect %v error in %v", e, a) } } -// For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase46(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), - Endpoint: ptr.String("https://example.com"), - } +// Missing region +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{} resolver := NewDefaultEndpointResolverV2() result, err := resolver.ResolveEndpoint(context.Background(), params) @@ -1807,7 +1240,7 @@ func TestEndpointCase46(t *testing.T) { if err == nil { t.Fatalf("expect error, got none") } - if e, a := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { t.Errorf("expect %v error in %v", e, a) } } diff --git a/service/licensemanager/endpoints_test.go b/service/licensemanager/endpoints_test.go index 0ee70bd444b..3beac70edd0 100644 --- a/service/licensemanager/endpoints_test.go +++ b/service/licensemanager/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region af-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("af-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("af-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region ap-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region ap-northeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region ap-northeast-3 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-3"), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region ap-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region ap-southeast-3 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-3"), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region ca-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ca-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region eu-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region eu-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -563,9 +563,9 @@ func TestEndpointCase13(t *testing.T) { // For region eu-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -602,9 +602,9 @@ func TestEndpointCase14(t *testing.T) { // For region eu-west-3 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-3"), } resolver := NewDefaultEndpointResolverV2() @@ -641,9 +641,9 @@ func TestEndpointCase15(t *testing.T) { // For region me-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("me-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("me-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -680,9 +680,9 @@ func TestEndpointCase16(t *testing.T) { // For region sa-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("sa-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("sa-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -719,9 +719,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -758,9 +758,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -797,9 +797,9 @@ func TestEndpointCase19(t *testing.T) { // For region us-east-2 with FIPS disabled and DualStack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -836,9 +836,9 @@ func TestEndpointCase20(t *testing.T) { // For region us-east-2 with FIPS enabled and DualStack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -875,9 +875,9 @@ func TestEndpointCase21(t *testing.T) { // For region us-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -914,9 +914,9 @@ func TestEndpointCase22(t *testing.T) { // For region us-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -953,9 +953,9 @@ func TestEndpointCase23(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -992,9 +992,9 @@ func TestEndpointCase24(t *testing.T) { // For region us-west-2 with FIPS enabled and DualStack disabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -1031,9 +1031,9 @@ func TestEndpointCase25(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1070,9 +1070,9 @@ func TestEndpointCase26(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1109,9 +1109,9 @@ func TestEndpointCase27(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1148,9 +1148,9 @@ func TestEndpointCase28(t *testing.T) { // For region cn-northwest-1 with FIPS disabled and DualStack disabled func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-northwest-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1187,9 +1187,9 @@ func TestEndpointCase29(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1226,9 +1226,9 @@ func TestEndpointCase30(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1265,9 +1265,9 @@ func TestEndpointCase31(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1304,9 +1304,9 @@ func TestEndpointCase32(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1343,9 +1343,9 @@ func TestEndpointCase33(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1382,9 +1382,9 @@ func TestEndpointCase34(t *testing.T) { // For region us-gov-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1421,9 +1421,9 @@ func TestEndpointCase35(t *testing.T) { // For region us-gov-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1460,9 +1460,9 @@ func TestEndpointCase36(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1499,9 +1499,9 @@ func TestEndpointCase37(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1538,9 +1538,9 @@ func TestEndpointCase38(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1577,9 +1577,9 @@ func TestEndpointCase39(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1597,9 +1597,9 @@ func TestEndpointCase40(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1636,9 +1636,9 @@ func TestEndpointCase41(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1656,9 +1656,9 @@ func TestEndpointCase42(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1695,9 +1695,9 @@ func TestEndpointCase43(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1715,9 +1715,9 @@ func TestEndpointCase44(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1754,9 +1754,9 @@ func TestEndpointCase45(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1774,9 +1774,9 @@ func TestEndpointCase46(t *testing.T) { // For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1853,9 +1853,9 @@ func TestEndpointCase48(t *testing.T) { // For custom endpoint with fips enabled and dualstack disabled func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1874,9 +1874,9 @@ func TestEndpointCase49(t *testing.T) { // For custom endpoint with fips disabled and dualstack enabled func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } diff --git a/service/licensemanagerlinuxsubscriptions/endpoints_test.go b/service/licensemanagerlinuxsubscriptions/endpoints_test.go index f657c83d8b2..b6f2c127fa2 100644 --- a/service/licensemanagerlinuxsubscriptions/endpoints_test.go +++ b/service/licensemanagerlinuxsubscriptions/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-east-1.api.aws") + uri, _ := url.Parse("https://license-manager-linux-subscriptions-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://license-manager-linux-subscriptions.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/licensemanagerusersubscriptions/endpoints_test.go b/service/licensemanagerusersubscriptions/endpoints_test.go index ae27b5a2dcf..0dd46c6b30c 100644 --- a/service/licensemanagerusersubscriptions/endpoints_test.go +++ b/service/licensemanagerusersubscriptions/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/lookoutmetrics/endpoints_test.go b/service/lookoutmetrics/endpoints_test.go index fe15350988e..0a620a73dca 100644 --- a/service/lookoutmetrics/endpoints_test.go +++ b/service/lookoutmetrics/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +794,32 @@ func TestEndpointCase19(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +853,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +912,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +971,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -951,11 +1031,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -991,10 +1071,10 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1030,11 +1110,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1051,11 +1131,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1070,3 +1150,19 @@ func TestEndpointCase27(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/lookoutvision/api_op_DeleteModel.go b/service/lookoutvision/api_op_DeleteModel.go index 86831bb0976..2c6e15fc1a7 100644 --- a/service/lookoutvision/api_op_DeleteModel.go +++ b/service/lookoutvision/api_op_DeleteModel.go @@ -56,10 +56,8 @@ type DeleteModelInput struct { // value for you. This prevents retries after a network error from making multiple // model deletion requests. You'll need to provide your own value for other use // cases. An error occurs if the other input parameters are not the same as in the - // first request. Using a different - // - // value for ClientToken is considered a new call to DeleteModel . An idempotency - // token is active for 8 hours. + // first request. Using a different value for ClientToken is considered a new call + // to DeleteModel . An idempotency token is active for 8 hours. ClientToken *string noSmithyDocumentSerde diff --git a/service/lookoutvision/api_op_StartModel.go b/service/lookoutvision/api_op_StartModel.go index 0206b245f85..7900b3dae4c 100644 --- a/service/lookoutvision/api_op_StartModel.go +++ b/service/lookoutvision/api_op_StartModel.go @@ -66,10 +66,8 @@ type StartModelInput struct { // you. This prevents retries after a network error from making multiple start // requests. You'll need to provide your own value for other use cases. An error // occurs if the other input parameters are not the same as in the first request. - // Using a different - // - // value for ClientToken is considered a new call to StartModel . An idempotency - // token is active for 8 hours. + // Using a different value for ClientToken is considered a new call to StartModel . + // An idempotency token is active for 8 hours. ClientToken *string // The maximum number of inference units to use for auto-scaling the model. If you diff --git a/service/lookoutvision/endpoints_test.go b/service/lookoutvision/endpoints_test.go index 610ae38d101..521c90c33a3 100644 --- a/service/lookoutvision/endpoints_test.go +++ b/service/lookoutvision/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +716,32 @@ func TestEndpointCase17(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +775,32 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +834,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +893,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -873,11 +953,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -913,10 +993,10 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -952,11 +1032,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -973,11 +1053,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -992,3 +1072,19 @@ func TestEndpointCase25(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/machinelearning/endpoints_test.go b/service/machinelearning/endpoints_test.go index e35e678775f..446acf7dd2f 100644 --- a/service/machinelearning/endpoints_test.go +++ b/service/machinelearning/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +521,32 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +580,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +639,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase17(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +698,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -678,11 +758,11 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,10 +798,10 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -757,11 +837,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -778,11 +858,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -797,3 +877,19 @@ func TestEndpointCase20(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/macie/endpoints_test.go b/service/macie/endpoints_test.go index dc1a83dabd4..62143d6d63c 100644 --- a/service/macie/endpoints_test.go +++ b/service/macie/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +560,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +619,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +678,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +737,32 @@ func TestEndpointCase16(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -717,11 +797,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -757,10 +837,10 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -796,11 +876,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -817,11 +897,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -836,3 +916,19 @@ func TestEndpointCase21(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/marketplacecommerceanalytics/endpoints_test.go b/service/marketplacecommerceanalytics/endpoints_test.go index b2ad5778d4d..17a5dd77115 100644 --- a/service/marketplacecommerceanalytics/endpoints_test.go +++ b/service/marketplacecommerceanalytics/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/marketplaceentitlementservice/endpoints_test.go b/service/marketplaceentitlementservice/endpoints_test.go index d492241ed3d..4066e3784f3 100644 --- a/service/marketplaceentitlementservice/endpoints_test.go +++ b/service/marketplaceentitlementservice/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/marketplacemetering/endpoints_test.go b/service/marketplacemetering/endpoints_test.go index e75fda5403a..f01bae30dfb 100644 --- a/service/marketplacemetering/endpoints_test.go +++ b/service/marketplacemetering/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1340,32 @@ func TestEndpointCase33(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1399,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1458,32 @@ func TestEndpointCase35(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1457,12 +1517,32 @@ func TestEndpointCase36(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1497,11 +1577,11 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1537,10 +1617,10 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1576,11 +1656,11 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1597,11 +1677,11 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1616,3 +1696,19 @@ func TestEndpointCase41(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase46(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/mediapackagev2/endpoints_test.go b/service/mediapackagev2/endpoints_test.go index c35ab9cd55e..ccc94ff617d 100644 --- a/service/mediapackagev2/endpoints_test.go +++ b/service/mediapackagev2/endpoints_test.go @@ -14,11 +14,11 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://mediapackagev2-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,11 +53,11 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://mediapackagev2-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,11 +92,11 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://mediapackagev2.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,11 +131,11 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://mediapackagev2.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,8 +173,8 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -212,8 +212,8 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -251,8 +251,8 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -290,8 +290,8 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -326,11 +326,11 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), UseDualStack: ptr.Bool(true), } @@ -338,31 +338,11 @@ func TestEndpointCase8(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://mediapackagev2-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,31 +365,11 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://mediapackagev2-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,11 +404,11 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://mediapackagev2.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,11 +443,11 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://mediapackagev2.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,11 +482,11 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -534,11 +494,31 @@ func TestEndpointCase14(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2.us-east-1.api.aws") + uri, _ := url.Parse("https://mediapackagev2-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,11 +541,31 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), UseDualStack: ptr.Bool(false), } @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://mediapackagev2.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://mediapackagev2.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,8 +603,8 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -623,8 +623,8 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -662,8 +662,8 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -682,8 +682,8 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -718,11 +718,11 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,11 +758,50 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,10 +819,10 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/mediapackagevod/endpoints_test.go b/service/mediapackagevod/endpoints_test.go index 66094b9838f..3168079c90e 100644 --- a/service/mediapackagevod/endpoints_test.go +++ b/service/mediapackagevod/endpoints_test.go @@ -1028,8 +1028,28 @@ func TestEndpointCase25(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1067,8 +1087,28 @@ func TestEndpointCase26(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -1106,8 +1146,28 @@ func TestEndpointCase27(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1145,8 +1205,28 @@ func TestEndpointCase28(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1185,7 +1265,7 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1225,7 +1305,7 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1264,7 +1344,7 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1285,7 +1365,7 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1304,3 +1384,19 @@ func TestEndpointCase33(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/mediastore/endpoints_test.go b/service/mediastore/endpoints_test.go index f609ec745db..61544c90bca 100644 --- a/service/mediastore/endpoints_test.go +++ b/service/mediastore/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +794,32 @@ func TestEndpointCase19(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +853,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +912,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +971,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -951,11 +1031,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -991,10 +1071,10 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1030,11 +1110,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1051,11 +1131,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1070,3 +1150,19 @@ func TestEndpointCase27(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/mediastoredata/endpoints_test.go b/service/mediastoredata/endpoints_test.go index 8d2abdb30b2..7f5045c30ce 100644 --- a/service/mediastoredata/endpoints_test.go +++ b/service/mediastoredata/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +794,32 @@ func TestEndpointCase19(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +853,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +912,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +971,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -951,11 +1031,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -991,10 +1071,10 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1030,11 +1110,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1051,11 +1131,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1070,3 +1150,19 @@ func TestEndpointCase27(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/medicalimaging/endpoints_test.go b/service/medicalimaging/endpoints_test.go index 851fe1f41ce..3cb2580261f 100644 --- a/service/medicalimaging/endpoints_test.go +++ b/service/medicalimaging/endpoints_test.go @@ -14,10 +14,10 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://medical-imaging-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,10 +53,10 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://medical-imaging-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,10 +92,10 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://medical-imaging.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,10 +131,10 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://medical-imaging.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -326,10 +326,10 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -338,31 +338,11 @@ func TestEndpointCase8(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://medical-imaging-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,31 +365,11 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://medical-imaging-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,11 +404,11 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://medical-imaging.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,11 +443,11 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://medical-imaging.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,11 +482,11 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -534,11 +494,31 @@ func TestEndpointCase14(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging.us-east-1.api.aws") + uri, _ := url.Parse("https://medical-imaging-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,10 +541,30 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://medical-imaging.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://medical-imaging.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -718,7 +718,7 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), @@ -758,8 +758,47 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -780,7 +819,7 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/migrationhub/endpoints_test.go b/service/migrationhub/endpoints_test.go index 4cbfb37cae6..66402b1d9c2 100644 --- a/service/migrationhub/endpoints_test.go +++ b/service/migrationhub/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +716,32 @@ func TestEndpointCase17(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +775,32 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +834,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +893,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -873,11 +953,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -913,10 +993,10 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -952,11 +1032,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -973,11 +1053,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -992,3 +1072,19 @@ func TestEndpointCase25(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/migrationhubconfig/endpoints_test.go b/service/migrationhubconfig/endpoints_test.go index 30ccd510195..d03d9335069 100644 --- a/service/migrationhubconfig/endpoints_test.go +++ b/service/migrationhubconfig/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/migrationhuborchestrator/endpoints_test.go b/service/migrationhuborchestrator/endpoints_test.go index bc3e1ccba20..0eab88be8e8 100644 --- a/service/migrationhuborchestrator/endpoints_test.go +++ b/service/migrationhuborchestrator/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://migrationhub-orchestrator.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://migrationhub-orchestrator.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://migrationhub-orchestrator.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://migrationhub-orchestrator.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator.us-east-1.api.aws") + uri, _ := url.Parse("https://migrationhub-orchestrator-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://migrationhub-orchestrator.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://migrationhub-orchestrator.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/migrationhubstrategy/endpoints_test.go b/service/migrationhubstrategy/endpoints_test.go index 14aa060b567..1147b02a659 100644 --- a/service/migrationhubstrategy/endpoints_test.go +++ b/service/migrationhubstrategy/endpoints_test.go @@ -716,8 +716,28 @@ func TestEndpointCase17(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -755,8 +775,28 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -794,8 +834,28 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -833,8 +893,28 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -873,7 +953,7 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -913,7 +993,7 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -952,7 +1032,7 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -973,7 +1053,7 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -992,3 +1072,19 @@ func TestEndpointCase25(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/mobile/endpoints_test.go b/service/mobile/endpoints_test.go index 140da320782..bd8706e1def 100644 --- a/service/mobile/endpoints_test.go +++ b/service/mobile/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/mturk/endpoints_test.go b/service/mturk/endpoints_test.go index dc9b97aadfd..87e6b83c432 100644 --- a/service/mturk/endpoints_test.go +++ b/service/mturk/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sandbox"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +521,32 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +580,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +639,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase17(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +698,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -678,11 +758,11 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,10 +798,10 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -757,11 +837,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -778,11 +858,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -797,3 +877,19 @@ func TestEndpointCase20(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/neptune/endpoints_test.go b/service/neptune/endpoints_test.go index a5b5e5823da..2ce83a8e7c6 100644 --- a/service/neptune/endpoints_test.go +++ b/service/neptune/endpoints_test.go @@ -1652,8 +1652,28 @@ func TestEndpointCase41(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1691,8 +1711,28 @@ func TestEndpointCase42(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1730,8 +1770,28 @@ func TestEndpointCase43(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase46(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1769,8 +1829,28 @@ func TestEndpointCase44(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase48(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1810,7 +1890,7 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1849,7 +1929,7 @@ func TestEndpointCase46(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1870,7 +1950,7 @@ func TestEndpointCase47(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase48(t *testing.T) { +func TestEndpointCase52(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1889,3 +1969,19 @@ func TestEndpointCase48(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase53(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/networkmanager/endpoints.go b/service/networkmanager/endpoints.go index bd8243d6ba6..3fa0f7a9576 100644 --- a/service/networkmanager/endpoints.go +++ b/service/networkmanager/endpoints.go @@ -384,41 +384,9 @@ func (r *resolver) ResolveEndpoint( _PartitionResult := *exprVal _ = _PartitionResult if _PartitionResult.Name == "aws" { - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://networkmanager-fips.") - out.WriteString(_Region) - out.WriteString(".api.aws") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { - uriString := func() string { - var out strings.Builder - out.WriteString("https://networkmanager-fips.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://networkmanager.us-west-2.amazonaws.com" uri, err := url.Parse(uriString) if err != nil { @@ -428,91 +396,25 @@ func (r *resolver) ResolveEndpoint( return smithyendpoints.Endpoint{ URI: *uri, Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("authSchemes", []interface{}{ + map[string]interface{}{ + "name": "sigv4", + "signingName": "networkmanager", + "signingRegion": "us-west-2", + }, + }) + return out + }(), }, nil } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://networkmanager.") - out.WriteString(_Region) - out.WriteString(".api.aws") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := "https://networkmanager.us-west-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "networkmanager", - "signingRegion": "us-west-2", - }, - }) - return out - }(), - }, nil } if _PartitionResult.Name == "aws-us-gov" { - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://networkmanager-fips.") - out.WriteString(_Region) - out.WriteString(".api.aws") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { - uriString := func() string { - var out strings.Builder - out.WriteString("https://networkmanager-fips.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://networkmanager.us-gov-west-1.amazonaws.com" uri, err := url.Parse(uriString) if err != nil { @@ -522,54 +424,20 @@ func (r *resolver) ResolveEndpoint( return smithyendpoints.Endpoint{ URI: *uri, Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("authSchemes", []interface{}{ + map[string]interface{}{ + "name": "sigv4", + "signingName": "networkmanager", + "signingRegion": "us-gov-west-1", + }, + }) + return out + }(), }, nil } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://networkmanager.") - out.WriteString(_Region) - out.WriteString(".api.aws") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := "https://networkmanager.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "networkmanager", - "signingRegion": "us-gov-west-1", - }, - }) - return out - }(), - }, nil } if _UseFIPS == true { if _UseDualStack == true { @@ -644,54 +512,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "aws-global" { - uriString := "https://networkmanager.us-west-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "networkmanager", - "signingRegion": "us-west-2", - }, - }) - return out - }(), - }, nil - } - if _Region == "aws-us-gov-global" { - uriString := "https://networkmanager.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "networkmanager", - "signingRegion": "us-gov-west-1", - }, - }) - return out - }(), - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://networkmanager.") diff --git a/service/networkmanager/endpoints_test.go b/service/networkmanager/endpoints_test.go index e1f4950f357..2299c68bdb5 100644 --- a/service/networkmanager/endpoints_test.go +++ b/service/networkmanager/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region aws-global with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("aws-global"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("aws-global"), } resolver := NewDefaultEndpointResolverV2() @@ -66,9 +66,9 @@ func TestEndpointCase0(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -105,9 +105,9 @@ func TestEndpointCase1(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -144,9 +144,9 @@ func TestEndpointCase2(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -183,9 +183,9 @@ func TestEndpointCase3(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -232,9 +232,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -271,9 +271,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -310,9 +310,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -349,9 +349,9 @@ func TestEndpointCase7(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -388,9 +388,9 @@ func TestEndpointCase8(t *testing.T) { // For region aws-us-gov-global with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("aws-us-gov-global"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("aws-us-gov-global"), } resolver := NewDefaultEndpointResolverV2() @@ -437,9 +437,9 @@ func TestEndpointCase9(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -476,9 +476,9 @@ func TestEndpointCase10(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -515,9 +515,9 @@ func TestEndpointCase11(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -554,9 +554,9 @@ func TestEndpointCase12(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -600,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -678,12 +718,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -717,12 +777,32 @@ func TestEndpointCase16(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -757,11 +837,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -797,7 +877,7 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -836,11 +916,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -857,11 +937,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -876,3 +956,19 @@ func TestEndpointCase21(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/nimble/endpoints_test.go b/service/nimble/endpoints_test.go index aa789a56dc2..35aa117d63e 100644 --- a/service/nimble/endpoints_test.go +++ b/service/nimble/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +677,32 @@ func TestEndpointCase16(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +736,32 @@ func TestEndpointCase17(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +795,32 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +854,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -834,11 +914,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -874,10 +954,10 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -913,11 +993,11 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -934,11 +1014,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -953,3 +1033,19 @@ func TestEndpointCase24(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/oam/endpoints_test.go b/service/oam/endpoints_test.go index ede521566bb..f227254bee3 100644 --- a/service/oam/endpoints_test.go +++ b/service/oam/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://oam-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://oam-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://oam.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://oam.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://oam-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://oam-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://oam.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://oam.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam.us-east-1.api.aws") + uri, _ := url.Parse("https://oam-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://oam.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://oam.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/opensearchserverless/endpoints_test.go b/service/opensearchserverless/endpoints_test.go index 9216ef537c0..04ec41d865d 100644 --- a/service/opensearchserverless/endpoints_test.go +++ b/service/opensearchserverless/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://aoss-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://aoss-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://aoss.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://aoss.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://aoss-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://aoss-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://aoss.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://aoss.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss.us-east-1.api.aws") + uri, _ := url.Parse("https://aoss-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://aoss.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://aoss.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/opsworks/endpoints_test.go b/service/opsworks/endpoints_test.go index 787f3b5f5c1..283c857525d 100644 --- a/service/opsworks/endpoints_test.go +++ b/service/opsworks/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1028,12 +1028,32 @@ func TestEndpointCase25(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1067,12 +1087,32 @@ func TestEndpointCase26(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1106,12 +1146,32 @@ func TestEndpointCase27(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1145,12 +1205,32 @@ func TestEndpointCase28(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1185,11 +1265,11 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1225,10 +1305,10 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1264,11 +1344,11 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1285,11 +1365,11 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1304,3 +1384,19 @@ func TestEndpointCase33(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/opsworkscm/endpoints_test.go b/service/opsworkscm/endpoints_test.go index 09336257fc0..9caab4d8f1a 100644 --- a/service/opsworkscm/endpoints_test.go +++ b/service/opsworkscm/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +794,32 @@ func TestEndpointCase19(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +853,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +912,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +971,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -951,11 +1031,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -991,10 +1071,10 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1030,11 +1110,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1051,11 +1131,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1070,3 +1150,19 @@ func TestEndpointCase27(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/osis/endpoints_test.go b/service/osis/endpoints_test.go index 77e26ca4fa2..7a2fecd3f59 100644 --- a/service/osis/endpoints_test.go +++ b/service/osis/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://osis-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://osis-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://osis.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://osis.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://osis-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://osis-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://osis.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://osis.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis.us-east-1.api.aws") + uri, _ := url.Parse("https://osis-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://osis.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://osis.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/panorama/endpoints_test.go b/service/panorama/endpoints_test.go index 9affee7a53f..2b66c883553 100644 --- a/service/panorama/endpoints_test.go +++ b/service/panorama/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/paymentcryptography/endpoints_test.go b/service/paymentcryptography/endpoints_test.go index 660ee5c4d01..57ad2c619b9 100644 --- a/service/paymentcryptography/endpoints_test.go +++ b/service/paymentcryptography/endpoints_test.go @@ -14,11 +14,11 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,11 +53,11 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,11 +92,11 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://controlplane.payment-cryptography.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,11 +131,11 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://controlplane.payment-cryptography.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,8 +173,8 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -212,8 +212,8 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -251,8 +251,8 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -290,8 +290,8 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -326,11 +326,11 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), UseDualStack: ptr.Bool(true), } @@ -338,31 +338,11 @@ func TestEndpointCase8(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,31 +365,11 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,11 +404,11 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://controlplane.payment-cryptography.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,11 +443,11 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://controlplane.payment-cryptography.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,11 +482,11 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -534,11 +494,31 @@ func TestEndpointCase14(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography.us-east-1.api.aws") + uri, _ := url.Parse("https://controlplane.payment-cryptography-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,11 +541,31 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), UseDualStack: ptr.Bool(false), } @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://controlplane.payment-cryptography.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://controlplane.payment-cryptography.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,8 +603,8 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -623,8 +623,8 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -662,8 +662,8 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -682,8 +682,8 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -718,11 +718,11 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,11 +758,50 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,10 +819,10 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/personalizeevents/endpoints_test.go b/service/personalizeevents/endpoints_test.go index c0f4d2dbd01..a4850817afc 100644 --- a/service/personalizeevents/endpoints_test.go +++ b/service/personalizeevents/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/personalizeruntime/endpoints_test.go b/service/personalizeruntime/endpoints_test.go index c7c3d9f2c29..4a509c7a57b 100644 --- a/service/personalizeruntime/endpoints_test.go +++ b/service/personalizeruntime/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/pinpointemail/endpoints_test.go b/service/pinpointemail/endpoints_test.go index 5e56f362d41..6188393cc40 100644 --- a/service/pinpointemail/endpoints_test.go +++ b/service/pinpointemail/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1340,32 @@ func TestEndpointCase33(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1399,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1458,32 @@ func TestEndpointCase35(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1457,12 +1517,32 @@ func TestEndpointCase36(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1497,11 +1577,11 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1537,10 +1617,10 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1576,11 +1656,11 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1597,11 +1677,11 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1616,3 +1696,19 @@ func TestEndpointCase41(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase46(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/pinpointsmsvoice/endpoints_test.go b/service/pinpointsmsvoice/endpoints_test.go index 55e36e379b3..98fd34fd98c 100644 --- a/service/pinpointsmsvoice/endpoints_test.go +++ b/service/pinpointsmsvoice/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://sms-voice.pinpoint.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://sms-voice.pinpoint.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://sms-voice.pinpoint.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://sms-voice.pinpoint.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint.us-east-1.api.aws") + uri, _ := url.Parse("https://sms-voice.pinpoint-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sms-voice.pinpoint.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://sms-voice.pinpoint.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/pinpointsmsvoicev2/endpoints_test.go b/service/pinpointsmsvoicev2/endpoints_test.go index 2cf14afce81..33f7eed5b64 100644 --- a/service/pinpointsmsvoicev2/endpoints_test.go +++ b/service/pinpointsmsvoicev2/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +872,32 @@ func TestEndpointCase21(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +931,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +990,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1049,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1029,11 +1109,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1069,10 +1149,10 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1108,11 +1188,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1129,11 +1209,11 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1148,3 +1228,19 @@ func TestEndpointCase29(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/pipes/endpoints_test.go b/service/pipes/endpoints_test.go index 1c36aeb57ab..3a310c6fc84 100644 --- a/service/pipes/endpoints_test.go +++ b/service/pipes/endpoints_test.go @@ -14,11 +14,11 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://pipes-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,11 +53,11 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://pipes-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,11 +92,11 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://pipes.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,11 +131,11 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://pipes.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,8 +173,8 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -212,8 +212,8 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -251,8 +251,8 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -290,8 +290,8 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -326,11 +326,11 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), UseDualStack: ptr.Bool(true), } @@ -338,31 +338,11 @@ func TestEndpointCase8(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://pipes-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,31 +365,11 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://pipes-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,11 +404,11 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://pipes.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,11 +443,11 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://pipes.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,11 +482,11 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -534,11 +494,31 @@ func TestEndpointCase14(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes.us-east-1.api.aws") + uri, _ := url.Parse("https://pipes-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,11 +541,31 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), UseDualStack: ptr.Bool(false), } @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://pipes.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://pipes.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,8 +603,8 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -623,8 +623,8 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -662,8 +662,8 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -682,8 +682,8 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -718,11 +718,11 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,11 +758,50 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,10 +819,10 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/qldbsession/endpoints_test.go b/service/qldbsession/endpoints_test.go index 1fcbe0d803f..a487a04eda6 100644 --- a/service/qldbsession/endpoints_test.go +++ b/service/qldbsession/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +950,32 @@ func TestEndpointCase23(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1009,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1028,12 +1068,32 @@ func TestEndpointCase25(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1067,12 +1127,32 @@ func TestEndpointCase26(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1107,11 +1187,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1147,10 +1227,10 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1186,11 +1266,11 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1207,11 +1287,11 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1226,3 +1306,19 @@ func TestEndpointCase31(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/rbin/endpoints_test.go b/service/rbin/endpoints_test.go index ffaa3254b32..50cc351a2c1 100644 --- a/service/rbin/endpoints_test.go +++ b/service/rbin/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1262,12 +1262,32 @@ func TestEndpointCase31(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1321,32 @@ func TestEndpointCase32(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1380,32 @@ func TestEndpointCase33(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1439,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1419,11 +1499,11 @@ func TestEndpointCase35(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1459,10 +1539,10 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1498,11 +1578,11 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1519,11 +1599,11 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1538,3 +1618,19 @@ func TestEndpointCase39(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/rdsdata/endpoints_test.go b/service/rdsdata/endpoints_test.go index 7f47e6e68ae..9d36f45f5ce 100644 --- a/service/rdsdata/endpoints_test.go +++ b/service/rdsdata/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/redshiftserverless/endpoints_test.go b/service/redshiftserverless/endpoints_test.go index b3cbc9b0d5e..4bf748d4fe0 100644 --- a/service/redshiftserverless/endpoints_test.go +++ b/service/redshiftserverless/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +872,32 @@ func TestEndpointCase21(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +931,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +990,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +1049,32 @@ func TestEndpointCase24(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1029,11 +1109,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1069,10 +1149,10 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1108,11 +1188,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1129,11 +1209,11 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1148,3 +1228,19 @@ func TestEndpointCase29(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/resourceexplorer2/endpoints_test.go b/service/resourceexplorer2/endpoints_test.go index 88b2543eaeb..a34dacce179 100644 --- a/service/resourceexplorer2/endpoints_test.go +++ b/service/resourceexplorer2/endpoints_test.go @@ -338,3 +338,19 @@ func TestEndpointCase8(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase9(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/resourcegroups/endpoints_test.go b/service/resourcegroups/endpoints_test.go index 91d1a8366d5..e55aa2113b0 100644 --- a/service/resourcegroups/endpoints_test.go +++ b/service/resourcegroups/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1535,12 +1535,32 @@ func TestEndpointCase38(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1574,12 +1594,32 @@ func TestEndpointCase39(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1653,32 @@ func TestEndpointCase40(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1712,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1692,11 +1772,11 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1732,10 +1812,10 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,11 +1851,11 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1792,11 +1872,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1811,3 +1891,19 @@ func TestEndpointCase46(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase51(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/resourcegroupstaggingapi/endpoints_test.go b/service/resourcegroupstaggingapi/endpoints_test.go index 6a762825687..a946756b713 100644 --- a/service/resourcegroupstaggingapi/endpoints_test.go +++ b/service/resourcegroupstaggingapi/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1418,12 +1418,32 @@ func TestEndpointCase35(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1457,12 +1477,32 @@ func TestEndpointCase36(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1496,12 +1536,32 @@ func TestEndpointCase37(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1535,12 +1595,32 @@ func TestEndpointCase38(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1576,10 +1656,10 @@ func TestEndpointCase39(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1615,11 +1695,11 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1636,11 +1716,11 @@ func TestEndpointCase41(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1655,3 +1735,19 @@ func TestEndpointCase42(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase47(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/robomaker/endpoints_test.go b/service/robomaker/endpoints_test.go index 1b230d2eb13..4e9cf87d496 100644 --- a/service/robomaker/endpoints_test.go +++ b/service/robomaker/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +755,32 @@ func TestEndpointCase18(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +814,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +873,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +932,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -912,11 +992,11 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -952,10 +1032,10 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -991,11 +1071,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1012,11 +1092,11 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1031,3 +1111,19 @@ func TestEndpointCase26(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/route53recoverycluster/endpoints_test.go b/service/route53recoverycluster/endpoints_test.go index d7e14682a51..7d68294e136 100644 --- a/service/route53recoverycluster/endpoints_test.go +++ b/service/route53recoverycluster/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/route53recoverycontrolconfig/endpoints_test.go b/service/route53recoverycontrolconfig/endpoints_test.go index 0b37c408366..8d7487a51dd 100644 --- a/service/route53recoverycontrolconfig/endpoints_test.go +++ b/service/route53recoverycontrolconfig/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -67,8 +67,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -106,8 +106,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -145,8 +145,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -184,8 +184,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -223,8 +223,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -262,8 +262,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -301,8 +301,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -340,8 +340,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -379,8 +379,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -418,8 +418,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -457,8 +457,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -496,8 +496,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -531,12 +531,32 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -570,12 +590,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -609,12 +649,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase17(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -648,12 +708,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -688,11 +768,11 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -728,10 +808,10 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -767,11 +847,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -788,11 +868,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -807,3 +887,19 @@ func TestEndpointCase20(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/route53recoveryreadiness/endpoints_test.go b/service/route53recoveryreadiness/endpoints_test.go index 5b4d66031f2..5375b300193 100644 --- a/service/route53recoveryreadiness/endpoints_test.go +++ b/service/route53recoveryreadiness/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/route53resolver/endpoints.go b/service/route53resolver/endpoints.go index f83e7230386..27aeb62a817 100644 --- a/service/route53resolver/endpoints.go +++ b/service/route53resolver/endpoints.go @@ -411,6 +411,32 @@ func (r *resolver) ResolveEndpoint( } if _UseFIPS == true { if true == _PartitionResult.SupportsFIPS { + if _Region == "us-gov-east-1" { + uriString := "https://route53resolver.us-gov-east-1.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if _Region == "us-gov-west-1" { + uriString := "https://route53resolver.us-gov-west-1.amazonaws.com" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } uriString := func() string { var out strings.Builder out.WriteString("https://route53resolver-fips.") diff --git a/service/route53resolver/endpoints_test.go b/service/route53resolver/endpoints_test.go index 5bb28da44a5..158bf5df8ed 100644 --- a/service/route53resolver/endpoints_test.go +++ b/service/route53resolver/endpoints_test.go @@ -1223,8 +1223,47 @@ func TestEndpointCase30(t *testing.T) { } } -// For region us-gov-west-1 with FIPS disabled and DualStack disabled +// For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase31(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://route53resolver.us-gov-east-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For region us-gov-west-1 with FIPS disabled and DualStack disabled +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), @@ -1262,12 +1301,12 @@ func TestEndpointCase31(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase32(t *testing.T) { +// For region us-gov-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1278,7 +1317,7 @@ func TestEndpointCase32(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://route53resolver-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://route53resolver.us-gov-west-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1301,12 +1340,12 @@ func TestEndpointCase32(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1317,7 +1356,7 @@ func TestEndpointCase33(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://route53resolver-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://route53resolver-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1341,7 +1380,7 @@ func TestEndpointCase33(t *testing.T) { } // For region us-gov-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), @@ -1380,7 +1419,7 @@ func TestEndpointCase34(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -1419,7 +1458,7 @@ func TestEndpointCase35(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1439,7 +1478,7 @@ func TestEndpointCase36(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1478,7 +1517,7 @@ func TestEndpointCase37(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -1498,7 +1537,7 @@ func TestEndpointCase38(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1518,7 +1557,7 @@ func TestEndpointCase39(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1557,7 +1596,7 @@ func TestEndpointCase40(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1577,7 +1616,7 @@ func TestEndpointCase41(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1616,7 +1655,7 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1656,7 +1695,7 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1695,7 +1734,7 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1716,7 +1755,7 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1737,7 +1776,7 @@ func TestEndpointCase46(t *testing.T) { } // Missing region -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{} resolver := NewDefaultEndpointResolverV2() diff --git a/service/rum/endpoints_test.go b/service/rum/endpoints_test.go index 82b166e7966..118f380b5e1 100644 --- a/service/rum/endpoints_test.go +++ b/service/rum/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +833,32 @@ func TestEndpointCase20(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -872,12 +892,32 @@ func TestEndpointCase21(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -911,12 +951,32 @@ func TestEndpointCase22(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase25(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -950,12 +1010,32 @@ func TestEndpointCase23(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -990,11 +1070,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1030,10 +1110,10 @@ func TestEndpointCase25(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1069,11 +1149,11 @@ func TestEndpointCase26(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1090,11 +1170,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1109,3 +1189,19 @@ func TestEndpointCase28(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/s3outposts/endpoints_test.go b/service/s3outposts/endpoints_test.go index 1184a723fac..dc60982acfc 100644 --- a/service/s3outposts/endpoints_test.go +++ b/service/s3outposts/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region af-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("af-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("af-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region ap-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region ap-northeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region ap-northeast-3 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-3"), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region ap-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region ca-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ca-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region eu-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region eu-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region eu-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -563,9 +563,9 @@ func TestEndpointCase13(t *testing.T) { // For region eu-west-3 with FIPS disabled and DualStack disabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-3"), } resolver := NewDefaultEndpointResolverV2() @@ -602,9 +602,9 @@ func TestEndpointCase14(t *testing.T) { // For region me-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("me-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("me-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -641,9 +641,9 @@ func TestEndpointCase15(t *testing.T) { // For region sa-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("sa-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("sa-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -680,9 +680,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -719,9 +719,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-east-2 with FIPS disabled and DualStack disabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -758,9 +758,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -797,9 +797,9 @@ func TestEndpointCase19(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -836,9 +836,9 @@ func TestEndpointCase20(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -875,9 +875,9 @@ func TestEndpointCase21(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -914,9 +914,9 @@ func TestEndpointCase22(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -953,9 +953,9 @@ func TestEndpointCase23(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -992,9 +992,9 @@ func TestEndpointCase24(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1031,9 +1031,9 @@ func TestEndpointCase25(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1070,9 +1070,9 @@ func TestEndpointCase26(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1109,9 +1109,9 @@ func TestEndpointCase27(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1148,9 +1148,9 @@ func TestEndpointCase28(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1187,9 +1187,9 @@ func TestEndpointCase29(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1226,9 +1226,9 @@ func TestEndpointCase30(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1262,12 +1262,32 @@ func TestEndpointCase31(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1321,32 @@ func TestEndpointCase32(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1380,32 @@ func TestEndpointCase33(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1439,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1419,11 +1499,11 @@ func TestEndpointCase35(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1459,7 +1539,7 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1498,11 +1578,11 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1519,11 +1599,11 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1538,3 +1618,19 @@ func TestEndpointCase39(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/sagemakera2iruntime/endpoints_test.go b/service/sagemakera2iruntime/endpoints_test.go index a65d5442bfc..8fb4c579862 100644 --- a/service/sagemakera2iruntime/endpoints_test.go +++ b/service/sagemakera2iruntime/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/sagemakeredge/endpoints_test.go b/service/sagemakeredge/endpoints_test.go index 744686419b9..dca4da875ee 100644 --- a/service/sagemakeredge/endpoints_test.go +++ b/service/sagemakeredge/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +677,32 @@ func TestEndpointCase16(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +736,32 @@ func TestEndpointCase17(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +795,32 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +854,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase23(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -834,11 +914,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -874,10 +954,10 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -913,11 +993,11 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -934,11 +1014,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -953,3 +1033,19 @@ func TestEndpointCase24(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/sagemakergeospatial/endpoints_test.go b/service/sagemakergeospatial/endpoints_test.go index 18d553cc97d..7b927c326e6 100644 --- a/service/sagemakergeospatial/endpoints_test.go +++ b/service/sagemakergeospatial/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://sagemaker-geospatial.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://sagemaker-geospatial.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://sagemaker-geospatial.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://sagemaker-geospatial.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial.us-east-1.api.aws") + uri, _ := url.Parse("https://sagemaker-geospatial-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://sagemaker-geospatial.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://sagemaker-geospatial.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -604,8 +604,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -624,8 +624,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -663,8 +663,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -683,8 +683,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,51 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with region not set and fips disabled and dualstack disabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -759,11 +798,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/sagemakermetrics/endpoints_test.go b/service/sagemakermetrics/endpoints_test.go index 1d750ecb053..3a64ebf78e7 100644 --- a/service/sagemakermetrics/endpoints_test.go +++ b/service/sagemakermetrics/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://metrics.sagemaker-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://metrics.sagemaker-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://metrics.sagemaker.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://metrics.sagemaker.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://metrics.sagemaker-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://metrics.sagemaker-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://metrics.sagemaker.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://metrics.sagemaker.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker.us-east-1.api.aws") + uri, _ := url.Parse("https://metrics.sagemaker-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://metrics.sagemaker.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://metrics.sagemaker.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,9 +603,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -623,9 +623,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -662,9 +662,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -682,9 +682,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,12 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,12 +758,51 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/scheduler/endpoints_test.go b/service/scheduler/endpoints_test.go index b0e6e9ff3bb..fcedfd11942 100644 --- a/service/scheduler/endpoints_test.go +++ b/service/scheduler/endpoints_test.go @@ -14,12 +14,12 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://scheduler-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,12 +53,12 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://scheduler-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,12 +92,12 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://scheduler.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,12 +131,12 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://scheduler.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -326,32 +326,12 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -362,7 +342,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://scheduler-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,32 +365,12 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://scheduler-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,12 +404,12 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://scheduler.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,12 +443,12 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://scheduler.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,12 +482,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -538,7 +518,7 @@ func TestEndpointCase14(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler.us-east-1.api.aws") + uri, _ := url.Parse("https://scheduler-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,12 +541,32 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://scheduler.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://scheduler.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -604,8 +604,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -624,8 +624,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -663,8 +663,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -683,8 +683,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -718,12 +718,51 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with region not set and fips disabled and dualstack disabled +func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -759,11 +798,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,11 +819,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/schemas/endpoints_test.go b/service/schemas/endpoints_test.go index 96fea372209..f29f787585d 100644 --- a/service/schemas/endpoints_test.go +++ b/service/schemas/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1106,12 +1106,32 @@ func TestEndpointCase27(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1145,12 +1165,32 @@ func TestEndpointCase28(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1184,12 +1224,32 @@ func TestEndpointCase29(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1223,12 +1283,32 @@ func TestEndpointCase30(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1263,11 +1343,11 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1303,10 +1383,10 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1342,11 +1422,11 @@ func TestEndpointCase33(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1363,11 +1443,11 @@ func TestEndpointCase34(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1382,3 +1462,19 @@ func TestEndpointCase35(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase40(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/serverlessapplicationrepository/endpoints.go b/service/serverlessapplicationrepository/endpoints.go index 677aaab17a8..f32e14920f1 100644 --- a/service/serverlessapplicationrepository/endpoints.go +++ b/service/serverlessapplicationrepository/endpoints.go @@ -474,32 +474,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "us-gov-east-1" { - uriString := "https://serverlessrepo.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://serverlessrepo.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://serverlessrepo.") diff --git a/service/serverlessapplicationrepository/endpoints_test.go b/service/serverlessapplicationrepository/endpoints_test.go index d0d528a33d5..cb9610ea2d1 100644 --- a/service/serverlessapplicationrepository/endpoints_test.go +++ b/service/serverlessapplicationrepository/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1262,12 +1262,32 @@ func TestEndpointCase31(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1321,32 @@ func TestEndpointCase32(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1380,32 @@ func TestEndpointCase33(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1379,12 +1439,32 @@ func TestEndpointCase34(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1419,11 +1499,11 @@ func TestEndpointCase35(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1459,10 +1539,10 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1498,11 +1578,11 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1519,11 +1599,11 @@ func TestEndpointCase38(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1538,3 +1618,19 @@ func TestEndpointCase39(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/servicecatalogappregistry/endpoints_test.go b/service/servicecatalogappregistry/endpoints_test.go index 50c2a0331c6..c0a0a2d4af4 100644 --- a/service/servicecatalogappregistry/endpoints_test.go +++ b/service/servicecatalogappregistry/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region af-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("af-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("af-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region ap-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region ap-northeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region ap-northeast-3 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-3"), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region ap-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region ap-southeast-3 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-3"), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region ca-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ca-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region ca-central-1 with FIPS enabled and DualStack disabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ca-central-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region eu-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region eu-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -563,9 +563,9 @@ func TestEndpointCase13(t *testing.T) { // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -602,9 +602,9 @@ func TestEndpointCase14(t *testing.T) { // For region eu-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -641,9 +641,9 @@ func TestEndpointCase15(t *testing.T) { // For region eu-west-3 with FIPS disabled and DualStack disabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-3"), } resolver := NewDefaultEndpointResolverV2() @@ -680,9 +680,9 @@ func TestEndpointCase16(t *testing.T) { // For region me-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("me-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("me-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -719,9 +719,9 @@ func TestEndpointCase17(t *testing.T) { // For region sa-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("sa-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("sa-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -758,9 +758,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -797,9 +797,9 @@ func TestEndpointCase19(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -836,9 +836,9 @@ func TestEndpointCase20(t *testing.T) { // For region us-east-2 with FIPS disabled and DualStack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -875,9 +875,9 @@ func TestEndpointCase21(t *testing.T) { // For region us-east-2 with FIPS enabled and DualStack disabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -914,9 +914,9 @@ func TestEndpointCase22(t *testing.T) { // For region us-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -953,9 +953,9 @@ func TestEndpointCase23(t *testing.T) { // For region us-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -992,9 +992,9 @@ func TestEndpointCase24(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -1031,9 +1031,9 @@ func TestEndpointCase25(t *testing.T) { // For region us-west-2 with FIPS enabled and DualStack disabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -1070,9 +1070,9 @@ func TestEndpointCase26(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1109,9 +1109,9 @@ func TestEndpointCase27(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1148,9 +1148,9 @@ func TestEndpointCase28(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1187,9 +1187,9 @@ func TestEndpointCase29(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1226,9 +1226,9 @@ func TestEndpointCase30(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1265,9 +1265,9 @@ func TestEndpointCase31(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1304,9 +1304,9 @@ func TestEndpointCase32(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1343,9 +1343,9 @@ func TestEndpointCase33(t *testing.T) { // For region us-gov-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1382,9 +1382,9 @@ func TestEndpointCase34(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1421,9 +1421,9 @@ func TestEndpointCase35(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1460,9 +1460,9 @@ func TestEndpointCase36(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1499,9 +1499,9 @@ func TestEndpointCase37(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1519,9 +1519,9 @@ func TestEndpointCase38(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1558,9 +1558,9 @@ func TestEndpointCase39(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1578,9 +1578,9 @@ func TestEndpointCase40(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1617,9 +1617,9 @@ func TestEndpointCase41(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1637,9 +1637,9 @@ func TestEndpointCase42(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1676,9 +1676,9 @@ func TestEndpointCase43(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1696,9 +1696,9 @@ func TestEndpointCase44(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1735,9 +1735,9 @@ func TestEndpointCase45(t *testing.T) { // For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1814,9 +1814,9 @@ func TestEndpointCase47(t *testing.T) { // For custom endpoint with fips enabled and dualstack disabled func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1835,9 +1835,9 @@ func TestEndpointCase48(t *testing.T) { // For custom endpoint with fips disabled and dualstack enabled func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } diff --git a/service/servicediscovery/endpoints.go b/service/servicediscovery/endpoints.go index d88e2772d94..4b8499f7225 100644 --- a/service/servicediscovery/endpoints.go +++ b/service/servicediscovery/endpoints.go @@ -434,6 +434,63 @@ func (r *resolver) ResolveEndpoint( } if _UseDualStack == true { if true == _PartitionResult.SupportsDualStack { + if "aws" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://servicediscovery.") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if "aws-cn" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://servicediscovery.") + out.WriteString(_Region) + out.WriteString(".amazonaws.com.cn") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } + if "aws-us-gov" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://servicediscovery.") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } uriString := func() string { var out strings.Builder out.WriteString("https://servicediscovery.") diff --git a/service/servicediscovery/endpoints_test.go b/service/servicediscovery/endpoints_test.go index ad9f165b364..4f1f20608bb 100644 --- a/service/servicediscovery/endpoints_test.go +++ b/service/servicediscovery/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region af-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("af-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("af-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region ap-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region ap-northeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region ap-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region ca-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ca-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region ca-central-1 with FIPS enabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ca-central-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region eu-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region eu-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region eu-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -563,9 +563,9 @@ func TestEndpointCase13(t *testing.T) { // For region eu-west-3 with FIPS disabled and DualStack disabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-3"), } resolver := NewDefaultEndpointResolverV2() @@ -602,9 +602,9 @@ func TestEndpointCase14(t *testing.T) { // For region me-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("me-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("me-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -641,9 +641,9 @@ func TestEndpointCase15(t *testing.T) { // For region sa-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("sa-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("sa-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -680,9 +680,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -719,9 +719,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -758,9 +758,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-east-2 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -797,9 +797,9 @@ func TestEndpointCase19(t *testing.T) { // For region us-east-2 with FIPS enabled and DualStack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -836,9 +836,9 @@ func TestEndpointCase20(t *testing.T) { // For region us-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -875,9 +875,9 @@ func TestEndpointCase21(t *testing.T) { // For region us-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -914,9 +914,9 @@ func TestEndpointCase22(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -953,9 +953,9 @@ func TestEndpointCase23(t *testing.T) { // For region us-west-2 with FIPS enabled and DualStack disabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -992,9 +992,9 @@ func TestEndpointCase24(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1031,9 +1031,9 @@ func TestEndpointCase25(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1044,7 +1044,7 @@ func TestEndpointCase26(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://servicediscovery.us-east-1.api.aws") + uri, _ := url.Parse("https://servicediscovery.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1070,9 +1070,9 @@ func TestEndpointCase26(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1109,9 +1109,9 @@ func TestEndpointCase27(t *testing.T) { // For region cn-northwest-1 with FIPS disabled and DualStack disabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-northwest-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1148,9 +1148,9 @@ func TestEndpointCase28(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1187,9 +1187,9 @@ func TestEndpointCase29(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1226,9 +1226,9 @@ func TestEndpointCase30(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1239,7 +1239,7 @@ func TestEndpointCase31(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://servicediscovery.cn-north-1.api.amazonwebservices.com.cn") + uri, _ := url.Parse("https://servicediscovery.cn-north-1.amazonaws.com.cn") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1265,9 +1265,9 @@ func TestEndpointCase31(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1304,9 +1304,9 @@ func TestEndpointCase32(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1343,9 +1343,9 @@ func TestEndpointCase33(t *testing.T) { // For region us-gov-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1382,9 +1382,9 @@ func TestEndpointCase34(t *testing.T) { // For region us-gov-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1421,9 +1421,9 @@ func TestEndpointCase35(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1460,9 +1460,9 @@ func TestEndpointCase36(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1473,7 +1473,7 @@ func TestEndpointCase37(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://servicediscovery.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://servicediscovery.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -1499,9 +1499,9 @@ func TestEndpointCase37(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1519,9 +1519,9 @@ func TestEndpointCase38(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1558,9 +1558,9 @@ func TestEndpointCase39(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1578,9 +1578,9 @@ func TestEndpointCase40(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1617,9 +1617,9 @@ func TestEndpointCase41(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1637,9 +1637,9 @@ func TestEndpointCase42(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1676,9 +1676,9 @@ func TestEndpointCase43(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1696,9 +1696,9 @@ func TestEndpointCase44(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1735,9 +1735,9 @@ func TestEndpointCase45(t *testing.T) { // For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1814,9 +1814,9 @@ func TestEndpointCase47(t *testing.T) { // For custom endpoint with fips enabled and dualstack disabled func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1835,9 +1835,9 @@ func TestEndpointCase48(t *testing.T) { // For custom endpoint with fips disabled and dualstack enabled func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } diff --git a/service/shield/endpoints.go b/service/shield/endpoints.go index 9a5ebe3042f..8838bc7c12e 100644 --- a/service/shield/endpoints.go +++ b/service/shield/endpoints.go @@ -384,35 +384,9 @@ func (r *resolver) ResolveEndpoint( _PartitionResult := *exprVal _ = _PartitionResult if _PartitionResult.Name == "aws" { - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://shield-fips.") - out.WriteString(_Region) - out.WriteString(".api.aws") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { - uriString := "https://shield-fips.us-east-1.amazonaws.com" + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://shield.us-east-1.amazonaws.com" uri, err := url.Parse(uriString) if err != nil { @@ -435,17 +409,12 @@ func (r *resolver) ResolveEndpoint( }(), }, nil } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://shield.") - out.WriteString(_Region) - out.WriteString(".api.aws") - return out.String() - }() + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := "https://shield-fips.us-east-1.amazonaws.com" uri, err := url.Parse(uriString) if err != nil { @@ -455,32 +424,20 @@ func (r *resolver) ResolveEndpoint( return smithyendpoints.Endpoint{ URI: *uri, Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("authSchemes", []interface{}{ + map[string]interface{}{ + "name": "sigv4", + "signingName": "shield", + "signingRegion": "us-east-1", + }, + }) + return out + }(), }, nil } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - uriString := "https://shield.us-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "shield", - "signingRegion": "us-east-1", - }, - }) - return out - }(), - }, nil } if _UseFIPS == true { if _UseDualStack == true { @@ -511,30 +468,6 @@ func (r *resolver) ResolveEndpoint( } if _UseFIPS == true { if true == _PartitionResult.SupportsFIPS { - if _Region == "aws-global" { - uriString := "https://shield-fips.us-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "shield", - "signingRegion": "us-east-1", - }, - }) - return out - }(), - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://shield-fips.") @@ -579,30 +512,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "aws-global" { - uriString := "https://shield.us-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "shield", - "signingRegion": "us-east-1", - }, - }) - return out - }(), - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://shield.") diff --git a/service/shield/endpoints_test.go b/service/shield/endpoints_test.go index 226c268426e..6e5ea6f9d7a 100644 --- a/service/shield/endpoints_test.go +++ b/service/shield/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -67,8 +67,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -116,8 +116,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -155,8 +155,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -204,8 +204,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -243,8 +243,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -292,8 +292,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -331,8 +331,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -370,8 +370,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -409,8 +409,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -448,8 +448,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -487,8 +487,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -526,8 +526,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -565,8 +565,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -600,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -678,12 +718,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -717,12 +777,32 @@ func TestEndpointCase16(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -757,11 +837,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -797,10 +877,10 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -836,11 +916,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -857,11 +937,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -876,3 +956,19 @@ func TestEndpointCase21(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/sms/endpoints_test.go b/service/sms/endpoints_test.go index 34efdabe6ef..5945fc6f2b6 100644 --- a/service/sms/endpoints_test.go +++ b/service/sms/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region af-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("af-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("af-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region ap-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region ap-northeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region ap-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region ca-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ca-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region eu-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region eu-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region eu-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region eu-west-3 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-3"), } resolver := NewDefaultEndpointResolverV2() @@ -563,9 +563,9 @@ func TestEndpointCase13(t *testing.T) { // For region me-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("me-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("me-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -602,9 +602,9 @@ func TestEndpointCase14(t *testing.T) { // For region sa-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("sa-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("sa-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -641,9 +641,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -680,9 +680,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -719,9 +719,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-east-2 with FIPS disabled and DualStack disabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -758,9 +758,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-east-2 with FIPS enabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -797,9 +797,9 @@ func TestEndpointCase19(t *testing.T) { // For region us-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -836,9 +836,9 @@ func TestEndpointCase20(t *testing.T) { // For region us-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -875,9 +875,9 @@ func TestEndpointCase21(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -914,9 +914,9 @@ func TestEndpointCase22(t *testing.T) { // For region us-west-2 with FIPS enabled and DualStack disabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -953,9 +953,9 @@ func TestEndpointCase23(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -992,9 +992,9 @@ func TestEndpointCase24(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1031,9 +1031,9 @@ func TestEndpointCase25(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1070,9 +1070,9 @@ func TestEndpointCase26(t *testing.T) { // For region cn-northwest-1 with FIPS disabled and DualStack disabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-northwest-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-northwest-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1109,9 +1109,9 @@ func TestEndpointCase27(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1148,9 +1148,9 @@ func TestEndpointCase28(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1187,9 +1187,9 @@ func TestEndpointCase29(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1226,9 +1226,9 @@ func TestEndpointCase30(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1265,9 +1265,9 @@ func TestEndpointCase31(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1304,9 +1304,9 @@ func TestEndpointCase32(t *testing.T) { // For region us-gov-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1343,9 +1343,9 @@ func TestEndpointCase33(t *testing.T) { // For region us-gov-west-1 with FIPS enabled and DualStack disabled func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1382,9 +1382,9 @@ func TestEndpointCase34(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1421,9 +1421,9 @@ func TestEndpointCase35(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1457,12 +1457,32 @@ func TestEndpointCase36(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1496,12 +1516,32 @@ func TestEndpointCase37(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase39(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1535,12 +1575,32 @@ func TestEndpointCase38(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase39(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1574,12 +1634,32 @@ func TestEndpointCase39(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase40(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1614,11 +1694,11 @@ func TestEndpointCase40(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1654,7 +1734,7 @@ func TestEndpointCase41(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1693,11 +1773,11 @@ func TestEndpointCase42(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1714,11 +1794,11 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1733,3 +1813,19 @@ func TestEndpointCase44(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase49(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/snowdevicemanagement/endpoints_test.go b/service/snowdevicemanagement/endpoints_test.go index ebdc851e2a6..06acce79c98 100644 --- a/service/snowdevicemanagement/endpoints_test.go +++ b/service/snowdevicemanagement/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/sns/endpoints_test.go b/service/sns/endpoints_test.go index 0c892d76a63..f2f02b363e5 100644 --- a/service/sns/endpoints_test.go +++ b/service/sns/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1578,8 +1578,8 @@ func TestEndpointCase39(t *testing.T) { func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1613,32 @@ func TestEndpointCase40(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1672,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1691,12 +1731,32 @@ func TestEndpointCase42(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase45(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1730,12 +1790,32 @@ func TestEndpointCase43(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase47(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,10 +1851,10 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1810,11 +1890,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1831,11 +1911,11 @@ func TestEndpointCase46(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1850,3 +1930,19 @@ func TestEndpointCase47(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase52(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/ssmcontacts/endpoints_test.go b/service/ssmcontacts/endpoints_test.go index 25cb11c16d2..f0597367af9 100644 --- a/service/ssmcontacts/endpoints_test.go +++ b/service/ssmcontacts/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/ssmincidents/endpoints_test.go b/service/ssmincidents/endpoints_test.go index 377f71aa99f..4b1abf89ffb 100644 --- a/service/ssmincidents/endpoints_test.go +++ b/service/ssmincidents/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region ap-northeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region ap-south-1 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-south-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-south-1"), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region ca-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ca-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ca-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-central-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-central-1"), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region eu-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region eu-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region eu-west-3 with FIPS disabled and DualStack disabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-3"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-3"), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region sa-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("sa-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("sa-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region us-east-2 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-2"), } resolver := NewDefaultEndpointResolverV2() @@ -563,9 +563,9 @@ func TestEndpointCase13(t *testing.T) { // For region us-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -602,9 +602,9 @@ func TestEndpointCase14(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -641,9 +641,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -680,9 +680,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -719,9 +719,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -758,9 +758,9 @@ func TestEndpointCase18(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -797,9 +797,9 @@ func TestEndpointCase19(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -836,9 +836,9 @@ func TestEndpointCase20(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -875,9 +875,9 @@ func TestEndpointCase21(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -914,9 +914,9 @@ func TestEndpointCase22(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -953,9 +953,9 @@ func TestEndpointCase23(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -992,9 +992,9 @@ func TestEndpointCase24(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1031,9 +1031,9 @@ func TestEndpointCase25(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1070,9 +1070,9 @@ func TestEndpointCase26(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1090,9 +1090,9 @@ func TestEndpointCase27(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1129,9 +1129,9 @@ func TestEndpointCase28(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1149,9 +1149,9 @@ func TestEndpointCase29(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1188,9 +1188,9 @@ func TestEndpointCase30(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1208,9 +1208,9 @@ func TestEndpointCase31(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1247,9 +1247,9 @@ func TestEndpointCase32(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1267,9 +1267,9 @@ func TestEndpointCase33(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -1306,9 +1306,9 @@ func TestEndpointCase34(t *testing.T) { // For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1385,9 +1385,9 @@ func TestEndpointCase36(t *testing.T) { // For custom endpoint with fips enabled and dualstack disabled func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -1406,9 +1406,9 @@ func TestEndpointCase37(t *testing.T) { // For custom endpoint with fips disabled and dualstack enabled func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } diff --git a/service/ssmsap/endpoints_test.go b/service/ssmsap/endpoints_test.go index c582e785dc4..8871f6b85e2 100644 --- a/service/ssmsap/endpoints_test.go +++ b/service/ssmsap/endpoints_test.go @@ -14,10 +14,10 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://ssm-sap-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,10 +53,10 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://ssm-sap-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,10 +92,10 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://ssm-sap.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,10 +131,10 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://ssm-sap.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -326,10 +326,10 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -338,31 +338,11 @@ func TestEndpointCase8(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://ssm-sap-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,31 +365,11 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://ssm-sap-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,11 +404,11 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://ssm-sap.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,11 +443,11 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://ssm-sap.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,11 +482,11 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -534,11 +494,31 @@ func TestEndpointCase14(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap.us-east-1.api.aws") + uri, _ := url.Parse("https://ssm-sap-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,10 +541,30 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ssm-sap.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://ssm-sap.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -718,7 +718,7 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), @@ -758,8 +758,47 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { + var params = EndpointParameters{ + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -780,7 +819,7 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/sso/endpoints.go b/service/sso/endpoints.go index 9395e91e24b..9b11d0007ab 100644 --- a/service/sso/endpoints.go +++ b/service/sso/endpoints.go @@ -455,279 +455,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "ap-east-1" { - uriString := "https://portal.sso.ap-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-northeast-1" { - uriString := "https://portal.sso.ap-northeast-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-northeast-2" { - uriString := "https://portal.sso.ap-northeast-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-northeast-3" { - uriString := "https://portal.sso.ap-northeast-3.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-south-1" { - uriString := "https://portal.sso.ap-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-southeast-1" { - uriString := "https://portal.sso.ap-southeast-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-southeast-2" { - uriString := "https://portal.sso.ap-southeast-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ca-central-1" { - uriString := "https://portal.sso.ca-central-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-central-1" { - uriString := "https://portal.sso.eu-central-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-north-1" { - uriString := "https://portal.sso.eu-north-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-south-1" { - uriString := "https://portal.sso.eu-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-west-1" { - uriString := "https://portal.sso.eu-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-west-2" { - uriString := "https://portal.sso.eu-west-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-west-3" { - uriString := "https://portal.sso.eu-west-3.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "me-south-1" { - uriString := "https://portal.sso.me-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "sa-east-1" { - uriString := "https://portal.sso.sa-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-east-1" { - uriString := "https://portal.sso.us-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-east-2" { - uriString := "https://portal.sso.us-east-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-west-2" { - uriString := "https://portal.sso.us-west-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-east-1" { - uriString := "https://portal.sso.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://portal.sso.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://portal.sso.") diff --git a/service/sso/endpoints_test.go b/service/sso/endpoints_test.go index a6001cfe53e..3cc41b8b1b8 100644 --- a/service/sso/endpoints_test.go +++ b/service/sso/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1223,12 +1223,32 @@ func TestEndpointCase30(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1262,12 +1282,32 @@ func TestEndpointCase31(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1341,32 @@ func TestEndpointCase32(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1400,32 @@ func TestEndpointCase33(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1380,11 +1460,11 @@ func TestEndpointCase34(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1420,10 +1500,10 @@ func TestEndpointCase35(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1459,11 +1539,11 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1480,11 +1560,11 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1499,3 +1579,19 @@ func TestEndpointCase38(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/ssooidc/endpoints.go b/service/ssooidc/endpoints.go index 282d078b5cb..53dd2d5ae09 100644 --- a/service/ssooidc/endpoints.go +++ b/service/ssooidc/endpoints.go @@ -455,279 +455,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "ap-east-1" { - uriString := "https://oidc.ap-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-northeast-1" { - uriString := "https://oidc.ap-northeast-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-northeast-2" { - uriString := "https://oidc.ap-northeast-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-northeast-3" { - uriString := "https://oidc.ap-northeast-3.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-south-1" { - uriString := "https://oidc.ap-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-southeast-1" { - uriString := "https://oidc.ap-southeast-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-southeast-2" { - uriString := "https://oidc.ap-southeast-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ca-central-1" { - uriString := "https://oidc.ca-central-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-central-1" { - uriString := "https://oidc.eu-central-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-north-1" { - uriString := "https://oidc.eu-north-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-south-1" { - uriString := "https://oidc.eu-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-west-1" { - uriString := "https://oidc.eu-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-west-2" { - uriString := "https://oidc.eu-west-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-west-3" { - uriString := "https://oidc.eu-west-3.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "me-south-1" { - uriString := "https://oidc.me-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "sa-east-1" { - uriString := "https://oidc.sa-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-east-1" { - uriString := "https://oidc.us-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-east-2" { - uriString := "https://oidc.us-east-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-west-2" { - uriString := "https://oidc.us-west-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-east-1" { - uriString := "https://oidc.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://oidc.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://oidc.") diff --git a/service/ssooidc/endpoints_test.go b/service/ssooidc/endpoints_test.go index fcd654acf1b..570b2670bd4 100644 --- a/service/ssooidc/endpoints_test.go +++ b/service/ssooidc/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1223,12 +1223,32 @@ func TestEndpointCase30(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1262,12 +1282,32 @@ func TestEndpointCase31(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase33(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1301,12 +1341,32 @@ func TestEndpointCase32(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase35(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1340,12 +1400,32 @@ func TestEndpointCase33(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase37(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1380,11 +1460,11 @@ func TestEndpointCase34(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1420,10 +1500,10 @@ func TestEndpointCase35(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1459,11 +1539,11 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1480,11 +1560,11 @@ func TestEndpointCase37(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase38(t *testing.T) { +func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1499,3 +1579,19 @@ func TestEndpointCase38(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase43(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/storagegateway/api_op_CreateNFSFileShare.go b/service/storagegateway/api_op_CreateNFSFileShare.go index 3d9ba5e491e..ccb28893467 100644 --- a/service/storagegateway/api_op_CreateNFSFileShare.go +++ b/service/storagegateway/api_op_CreateNFSFileShare.go @@ -130,7 +130,7 @@ type CreateNFSFileShareInput struct { // period. SettlingTimeInSeconds has no effect on the timing of the object // uploading to Amazon S3, only the timing of the notification. The following // example sets NotificationPolicy on with SettlingTimeInSeconds set to 60. - // {"Upload": {"SettlingTimeInSeconds": 60}} The following example sets + // {\"Upload\": {\"SettlingTimeInSeconds\": 60}} The following example sets // NotificationPolicy off. {} NotificationPolicy *string diff --git a/service/storagegateway/api_op_CreateSMBFileShare.go b/service/storagegateway/api_op_CreateSMBFileShare.go index 7f878312a82..6c88ae397a6 100644 --- a/service/storagegateway/api_op_CreateSMBFileShare.go +++ b/service/storagegateway/api_op_CreateSMBFileShare.go @@ -149,7 +149,7 @@ type CreateSMBFileShareInput struct { // period. SettlingTimeInSeconds has no effect on the timing of the object // uploading to Amazon S3, only the timing of the notification. The following // example sets NotificationPolicy on with SettlingTimeInSeconds set to 60. - // {"Upload": {"SettlingTimeInSeconds": 60}} The following example sets + // {\"Upload\": {\"SettlingTimeInSeconds\": 60}} The following example sets // NotificationPolicy off. {} NotificationPolicy *string diff --git a/service/storagegateway/api_op_CreateTapeWithBarcode.go b/service/storagegateway/api_op_CreateTapeWithBarcode.go index e9dde2d9507..7e80ab06b99 100644 --- a/service/storagegateway/api_op_CreateTapeWithBarcode.go +++ b/service/storagegateway/api_op_CreateTapeWithBarcode.go @@ -54,7 +54,7 @@ type CreateTapeWithBarcodeInput struct { TapeBarcode *string // The size, in bytes, of the virtual tape that you want to create. The size must - // be aligned by gigabyte (102410241024 bytes). + // be aligned by gigabyte (1024*1024*1024 bytes). // // This member is required. TapeSizeInBytes *int64 diff --git a/service/storagegateway/api_op_CreateTapes.go b/service/storagegateway/api_op_CreateTapes.go index 3911b0cbcda..979a70427ac 100644 --- a/service/storagegateway/api_op_CreateTapes.go +++ b/service/storagegateway/api_op_CreateTapes.go @@ -65,7 +65,7 @@ type CreateTapesInput struct { TapeBarcodePrefix *string // The size, in bytes, of the virtual tapes that you want to create. The size must - // be aligned by gigabyte (102410241024 bytes). + // be aligned by gigabyte (1024*1024*1024 bytes). // // This member is required. TapeSizeInBytes *int64 diff --git a/service/storagegateway/api_op_UpdateNFSFileShare.go b/service/storagegateway/api_op_UpdateNFSFileShare.go index 026cb93bead..5a680e50d11 100644 --- a/service/storagegateway/api_op_UpdateNFSFileShare.go +++ b/service/storagegateway/api_op_UpdateNFSFileShare.go @@ -91,7 +91,7 @@ type UpdateNFSFileShareInput struct { // period. SettlingTimeInSeconds has no effect on the timing of the object // uploading to Amazon S3, only the timing of the notification. The following // example sets NotificationPolicy on with SettlingTimeInSeconds set to 60. - // {"Upload": {"SettlingTimeInSeconds": 60}} The following example sets + // {\"Upload\": {\"SettlingTimeInSeconds\": 60}} The following example sets // NotificationPolicy off. {} NotificationPolicy *string diff --git a/service/storagegateway/api_op_UpdateSMBFileShare.go b/service/storagegateway/api_op_UpdateSMBFileShare.go index c945defbb1a..60cb17b0789 100644 --- a/service/storagegateway/api_op_UpdateSMBFileShare.go +++ b/service/storagegateway/api_op_UpdateSMBFileShare.go @@ -108,7 +108,7 @@ type UpdateSMBFileShareInput struct { // period. SettlingTimeInSeconds has no effect on the timing of the object // uploading to Amazon S3, only the timing of the notification. The following // example sets NotificationPolicy on with SettlingTimeInSeconds set to 60. - // {"Upload": {"SettlingTimeInSeconds": 60}} The following example sets + // {\"Upload\": {\"SettlingTimeInSeconds\": 60}} The following example sets // NotificationPolicy off. {} NotificationPolicy *string diff --git a/service/storagegateway/endpoints_test.go b/service/storagegateway/endpoints_test.go index c6b67c0e7ba..7faef9fa217 100644 --- a/service/storagegateway/endpoints_test.go +++ b/service/storagegateway/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1574,12 +1574,32 @@ func TestEndpointCase39(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1633,32 @@ func TestEndpointCase40(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1692,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1691,12 +1751,32 @@ func TestEndpointCase42(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase46(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1731,11 +1811,11 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,10 +1851,10 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1810,11 +1890,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1831,11 +1911,11 @@ func TestEndpointCase46(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase47(t *testing.T) { +func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1850,3 +1930,19 @@ func TestEndpointCase47(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase52(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/storagegateway/types/types.go b/service/storagegateway/types/types.go index a03357c1326..60414570f5d 100644 --- a/service/storagegateway/types/types.go +++ b/service/storagegateway/types/types.go @@ -550,7 +550,7 @@ type NFSFileShareInfo struct { // period. SettlingTimeInSeconds has no effect on the timing of the object // uploading to Amazon S3, only the timing of the notification. The following // example sets NotificationPolicy on with SettlingTimeInSeconds set to 60. - // {"Upload": {"SettlingTimeInSeconds": 60}} The following example sets + // {\"Upload\": {\"SettlingTimeInSeconds\": 60}} The following example sets // NotificationPolicy off. {} NotificationPolicy *string @@ -734,7 +734,7 @@ type SMBFileShareInfo struct { // period. SettlingTimeInSeconds has no effect on the timing of the object // uploading to Amazon S3, only the timing of the notification. The following // example sets NotificationPolicy on with SettlingTimeInSeconds set to 60. - // {"Upload": {"SettlingTimeInSeconds": 60}} The following example sets + // {\"Upload\": {\"SettlingTimeInSeconds\": 60}} The following example sets // NotificationPolicy off. {} NotificationPolicy *string diff --git a/service/sts/endpoints_test.go b/service/sts/endpoints_test.go index 190db8a66cc..d661de561a1 100644 --- a/service/sts/endpoints_test.go +++ b/service/sts/endpoints_test.go @@ -1999,10 +1999,10 @@ func TestEndpointCase53(t *testing.T) { // UseGlobalEndpoint with legacy region `ap-northeast-1` func TestEndpointCase54(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("ap-northeast-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2022,9 +2022,9 @@ func TestEndpointCase54(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2049,10 +2049,10 @@ func TestEndpointCase54(t *testing.T) { // UseGlobalEndpoint with legacy region `ap-south-1` func TestEndpointCase55(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("ap-south-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2072,9 +2072,9 @@ func TestEndpointCase55(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2099,10 +2099,10 @@ func TestEndpointCase55(t *testing.T) { // UseGlobalEndpoint with legacy region `ap-southeast-1` func TestEndpointCase56(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("ap-southeast-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2122,9 +2122,9 @@ func TestEndpointCase56(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2149,10 +2149,10 @@ func TestEndpointCase56(t *testing.T) { // UseGlobalEndpoint with legacy region `ap-southeast-2` func TestEndpointCase57(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("ap-southeast-2"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2172,9 +2172,9 @@ func TestEndpointCase57(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2199,10 +2199,10 @@ func TestEndpointCase57(t *testing.T) { // UseGlobalEndpoint with legacy region `aws-global` func TestEndpointCase58(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("aws-global"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2222,9 +2222,9 @@ func TestEndpointCase58(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2249,10 +2249,10 @@ func TestEndpointCase58(t *testing.T) { // UseGlobalEndpoint with legacy region `ca-central-1` func TestEndpointCase59(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("ca-central-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2272,9 +2272,9 @@ func TestEndpointCase59(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2299,10 +2299,10 @@ func TestEndpointCase59(t *testing.T) { // UseGlobalEndpoint with legacy region `eu-central-1` func TestEndpointCase60(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("eu-central-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2322,9 +2322,9 @@ func TestEndpointCase60(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2349,10 +2349,10 @@ func TestEndpointCase60(t *testing.T) { // UseGlobalEndpoint with legacy region `eu-north-1` func TestEndpointCase61(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("eu-north-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2372,9 +2372,9 @@ func TestEndpointCase61(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2399,10 +2399,10 @@ func TestEndpointCase61(t *testing.T) { // UseGlobalEndpoint with legacy region `eu-west-1` func TestEndpointCase62(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("eu-west-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2422,9 +2422,9 @@ func TestEndpointCase62(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2449,10 +2449,10 @@ func TestEndpointCase62(t *testing.T) { // UseGlobalEndpoint with legacy region `eu-west-2` func TestEndpointCase63(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("eu-west-2"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2472,9 +2472,9 @@ func TestEndpointCase63(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2499,10 +2499,10 @@ func TestEndpointCase63(t *testing.T) { // UseGlobalEndpoint with legacy region `eu-west-3` func TestEndpointCase64(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("eu-west-3"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2522,9 +2522,9 @@ func TestEndpointCase64(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2549,10 +2549,10 @@ func TestEndpointCase64(t *testing.T) { // UseGlobalEndpoint with legacy region `sa-east-1` func TestEndpointCase65(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("sa-east-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2572,9 +2572,9 @@ func TestEndpointCase65(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2599,10 +2599,10 @@ func TestEndpointCase65(t *testing.T) { // UseGlobalEndpoint with legacy region `us-east-1` func TestEndpointCase66(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2622,9 +2622,9 @@ func TestEndpointCase66(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2649,10 +2649,10 @@ func TestEndpointCase66(t *testing.T) { // UseGlobalEndpoint with legacy region `us-east-2` func TestEndpointCase67(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-2"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2672,9 +2672,9 @@ func TestEndpointCase67(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2699,10 +2699,10 @@ func TestEndpointCase67(t *testing.T) { // UseGlobalEndpoint with legacy region `us-west-1` func TestEndpointCase68(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("us-west-1"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2722,9 +2722,9 @@ func TestEndpointCase68(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2749,10 +2749,10 @@ func TestEndpointCase68(t *testing.T) { // UseGlobalEndpoint with legacy region `us-west-2` func TestEndpointCase69(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("us-west-2"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2772,9 +2772,9 @@ func TestEndpointCase69(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-1", + "signingName": "sts", }, }) return properties @@ -2799,10 +2799,10 @@ func TestEndpointCase69(t *testing.T) { // UseGlobalEndpoint with Non-legacy region `us-east-3` func TestEndpointCase70(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-3"), + UseGlobalEndpoint: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2822,9 +2822,9 @@ func TestEndpointCase70(t *testing.T) { var properties smithy.Properties properties.Set("authSchemes", []interface{}{ map[string]interface{}{ - "signingName": "sts", "name": "sigv4", "signingRegion": "us-east-3", + "signingName": "sts", }, }) return properties @@ -2849,10 +2849,10 @@ func TestEndpointCase70(t *testing.T) { // UseGlobalEndpoint with legacy region and custom endpoint func TestEndpointCase71(t *testing.T) { var params = EndpointParameters{ - UseGlobalEndpoint: ptr.Bool(true), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), Region: ptr.String("us-west-1"), + UseGlobalEndpoint: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -2890,10 +2890,10 @@ func TestEndpointCase71(t *testing.T) { // UseGlobalEndpoint with unset region and custom endpoint func TestEndpointCase72(t *testing.T) { var params = EndpointParameters{ - Endpoint: ptr.String("https://example.com"), - UseGlobalEndpoint: ptr.Bool(false), UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + UseGlobalEndpoint: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() diff --git a/service/supportapp/endpoints_test.go b/service/supportapp/endpoints_test.go index c945823c807..793dc8e39b3 100644 --- a/service/supportapp/endpoints_test.go +++ b/service/supportapp/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/synthetics/endpoints_test.go b/service/synthetics/endpoints_test.go index 5593b4f833c..58de6382021 100644 --- a/service/synthetics/endpoints_test.go +++ b/service/synthetics/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1574,12 +1574,32 @@ func TestEndpointCase39(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase41(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1613,12 +1633,32 @@ func TestEndpointCase40(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase41(t *testing.T) { +func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1652,12 +1692,32 @@ func TestEndpointCase41(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase44(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase42(t *testing.T) { +func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1691,12 +1751,32 @@ func TestEndpointCase42(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase46(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase43(t *testing.T) { +func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1732,10 +1812,10 @@ func TestEndpointCase43(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase44(t *testing.T) { +func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1771,11 +1851,11 @@ func TestEndpointCase44(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase45(t *testing.T) { +func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1792,11 +1872,11 @@ func TestEndpointCase45(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase46(t *testing.T) { +func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1811,3 +1891,19 @@ func TestEndpointCase46(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase51(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/textract/endpoints_test.go b/service/textract/endpoints_test.go index 3e811de9b1a..d217e0a5978 100644 --- a/service/textract/endpoints_test.go +++ b/service/textract/endpoints_test.go @@ -1184,8 +1184,28 @@ func TestEndpointCase29(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1223,8 +1243,28 @@ func TestEndpointCase30(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -1262,8 +1302,28 @@ func TestEndpointCase31(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase34(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1301,8 +1361,28 @@ func TestEndpointCase32(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1341,7 +1421,7 @@ func TestEndpointCase33(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase34(t *testing.T) { +func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1381,7 +1461,7 @@ func TestEndpointCase34(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase35(t *testing.T) { +func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1420,7 +1500,7 @@ func TestEndpointCase35(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase36(t *testing.T) { +func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1441,7 +1521,7 @@ func TestEndpointCase36(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase37(t *testing.T) { +func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1460,3 +1540,19 @@ func TestEndpointCase37(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase42(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/timestreamquery/endpoints_test.go b/service/timestreamquery/endpoints_test.go index b4588dcf4e9..fe5b8624838 100644 --- a/service/timestreamquery/endpoints_test.go +++ b/service/timestreamquery/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/timestreamwrite/endpoints.go b/service/timestreamwrite/endpoints.go index 08a31db39a1..20ac3ff1610 100644 --- a/service/timestreamwrite/endpoints.go +++ b/service/timestreamwrite/endpoints.go @@ -411,6 +411,25 @@ func (r *resolver) ResolveEndpoint( } if _UseFIPS == true { if true == _PartitionResult.SupportsFIPS { + if "aws-us-gov" == _PartitionResult.Name { + uriString := func() string { + var out strings.Builder + out.WriteString("https://ingest.timestream.") + out.WriteString(_Region) + out.WriteString(".amazonaws.com") + return out.String() + }() + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + }, nil + } uriString := func() string { var out strings.Builder out.WriteString("https://ingest.timestream-fips.") diff --git a/service/timestreamwrite/endpoints_test.go b/service/timestreamwrite/endpoints_test.go index 12254883214..f90ec174296 100644 --- a/service/timestreamwrite/endpoints_test.go +++ b/service/timestreamwrite/endpoints_test.go @@ -326,8 +326,86 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase8(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://ingest.timestream.us-gov-west-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For region us-gov-west-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-gov-west-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://ingest.timestream.us-gov-west-1.amazonaws.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For region us-gov-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), @@ -366,7 +444,7 @@ func TestEndpointCase8(t *testing.T) { } // For region us-gov-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), @@ -381,7 +459,7 @@ func TestEndpointCase9(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://ingest.timestream-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://ingest.timestream.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -405,7 +483,7 @@ func TestEndpointCase9(t *testing.T) { } // For region us-gov-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), @@ -444,7 +522,7 @@ func TestEndpointCase10(t *testing.T) { } // For region us-gov-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), @@ -483,7 +561,7 @@ func TestEndpointCase11(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -503,7 +581,7 @@ func TestEndpointCase12(t *testing.T) { } // For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -542,7 +620,7 @@ func TestEndpointCase13(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -562,7 +640,7 @@ func TestEndpointCase14(t *testing.T) { } // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), @@ -601,7 +679,7 @@ func TestEndpointCase15(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -621,7 +699,7 @@ func TestEndpointCase16(t *testing.T) { } // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -660,7 +738,7 @@ func TestEndpointCase17(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -680,7 +758,7 @@ func TestEndpointCase18(t *testing.T) { } // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -719,7 +797,7 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -759,7 +837,7 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -798,7 +876,7 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -819,7 +897,7 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -840,7 +918,7 @@ func TestEndpointCase23(t *testing.T) { } // Missing region -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{} resolver := NewDefaultEndpointResolverV2() diff --git a/service/tnb/endpoints_test.go b/service/tnb/endpoints_test.go index 9fd61f97548..f5fbf0d4696 100644 --- a/service/tnb/endpoints_test.go +++ b/service/tnb/endpoints_test.go @@ -14,11 +14,11 @@ import ( "testing" ) -// For region us-gov-east-1 with FIPS enabled and DualStack enabled +// For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -30,7 +30,7 @@ func TestEndpointCase0(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb-fips.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://tnb-fips.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -53,11 +53,11 @@ func TestEndpointCase0(t *testing.T) { } } -// For region us-gov-east-1 with FIPS enabled and DualStack disabled +// For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -69,7 +69,7 @@ func TestEndpointCase1(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb-fips.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://tnb-fips.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -92,11 +92,11 @@ func TestEndpointCase1(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack enabled +// For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(true), } @@ -108,7 +108,7 @@ func TestEndpointCase2(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb.us-gov-east-1.api.aws") + uri, _ := url.Parse("https://tnb.us-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -131,11 +131,11 @@ func TestEndpointCase2(t *testing.T) { } } -// For region us-gov-east-1 with FIPS disabled and DualStack disabled +// For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), UseDualStack: ptr.Bool(false), } @@ -147,7 +147,7 @@ func TestEndpointCase3(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb.us-gov-east-1.amazonaws.com") + uri, _ := url.Parse("https://tnb.us-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -173,8 +173,8 @@ func TestEndpointCase3(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -212,8 +212,8 @@ func TestEndpointCase4(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -251,8 +251,8 @@ func TestEndpointCase5(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -290,8 +290,8 @@ func TestEndpointCase6(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -326,11 +326,11 @@ func TestEndpointCase7(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack enabled +// For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), UseDualStack: ptr.Bool(true), } @@ -338,31 +338,11 @@ func TestEndpointCase8(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb-fips.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://tnb-fips.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -385,31 +365,11 @@ func TestEndpointCase9(t *testing.T) { } } -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { +// For region us-gov-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -421,7 +381,7 @@ func TestEndpointCase11(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb.us-iso-east-1.c2s.ic.gov") + uri, _ := url.Parse("https://tnb-fips.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -444,11 +404,11 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase12(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -460,7 +420,7 @@ func TestEndpointCase12(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb-fips.us-east-1.api.aws") + uri, _ := url.Parse("https://tnb.us-gov-east-1.api.aws") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -483,11 +443,11 @@ func TestEndpointCase12(t *testing.T) { } } -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +// For region us-gov-east-1 with FIPS disabled and DualStack disabled +func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -499,7 +459,7 @@ func TestEndpointCase13(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb-fips.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://tnb.us-gov-east-1.amazonaws.com") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -522,11 +482,11 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase14(t *testing.T) { +// For region us-iso-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -534,11 +494,31 @@ func TestEndpointCase14(t *testing.T) { result, err := resolver.ResolveEndpoint(context.Background(), params) _, _ = result, err + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + if err != nil { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb.us-east-1.api.aws") + uri, _ := url.Parse("https://tnb-fips.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -561,11 +541,31 @@ func TestEndpointCase14(t *testing.T) { } } -// For region us-east-1 with FIPS disabled and DualStack disabled +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), - Region: ptr.String("us-east-1"), UseDualStack: ptr.Bool(false), } @@ -577,7 +577,7 @@ func TestEndpointCase15(t *testing.T) { t.Fatalf("expect no error, got %v", err) } - uri, _ := url.Parse("https://tnb.us-east-1.amazonaws.com") + uri, _ := url.Parse("https://tnb.us-iso-east-1.c2s.ic.gov") expectEndpoint := smithyendpoints.Endpoint{ URI: *uri, @@ -603,8 +603,8 @@ func TestEndpointCase15(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), } @@ -623,8 +623,8 @@ func TestEndpointCase16(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), } @@ -662,8 +662,8 @@ func TestEndpointCase17(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), } @@ -682,8 +682,8 @@ func TestEndpointCase18(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), } @@ -718,11 +718,11 @@ func TestEndpointCase19(t *testing.T) { } } -// For custom endpoint with fips disabled and dualstack disabled +// For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -758,11 +758,50 @@ func TestEndpointCase20(t *testing.T) { } } -// For custom endpoint with fips enabled and dualstack disabled +// For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(true), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), + Endpoint: ptr.String("https://example.com"), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + + uri, _ := url.Parse("https://example.com") + + expectEndpoint := smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: smithy.Properties{}, + } + + if e, a := expectEndpoint.URI, result.URI; e != a { + t.Errorf("expect %v URI, got %v", e, a) + } + + if diff := cmp.Diff(expectEndpoint.Headers, result.Headers); diff != "" { + t.Errorf("expect headers to match\n%s", diff) + } + + if diff := cmp.Diff(expectEndpoint.Properties, result.Properties, + cmp.AllowUnexported(smithy.Properties{}), + ); diff != "" { + t.Errorf("expect properties to match\n%s", diff) + } +} + +// For custom endpoint with fips enabled and dualstack disabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -780,10 +819,10 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -799,3 +838,19 @@ func TestEndpointCase22(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/transcribestreaming/endpoints_test.go b/service/transcribestreaming/endpoints_test.go index 2a1aa3c36b3..6adba2bce19 100644 --- a/service/transcribestreaming/endpoints_test.go +++ b/service/transcribestreaming/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -989,12 +989,32 @@ func TestEndpointCase24(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1028,12 +1048,52 @@ func TestEndpointCase25(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase28(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase26(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1067,12 +1127,32 @@ func TestEndpointCase26(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase27(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1107,11 +1187,11 @@ func TestEndpointCase27(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1147,10 +1227,10 @@ func TestEndpointCase28(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1186,11 +1266,11 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1207,11 +1287,11 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -1226,3 +1306,19 @@ func TestEndpointCase31(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase36(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/voiceid/endpoints_test.go b/service/voiceid/endpoints_test.go index faa7b2a193b..32903fd25bb 100644 --- a/service/voiceid/endpoints_test.go +++ b/service/voiceid/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-northeast-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-southeast-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("ap-southeast-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region eu-central-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("eu-central-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region eu-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("eu-west-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-west-2"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("cn-north-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -563,9 +563,9 @@ func TestEndpointCase13(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -602,9 +602,9 @@ func TestEndpointCase14(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -641,9 +641,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -680,9 +680,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-gov-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -719,9 +719,9 @@ func TestEndpointCase17(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -739,9 +739,9 @@ func TestEndpointCase18(t *testing.T) { // For region us-iso-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -778,9 +778,9 @@ func TestEndpointCase19(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -798,9 +798,9 @@ func TestEndpointCase20(t *testing.T) { // For region us-iso-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,9 +837,9 @@ func TestEndpointCase21(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -857,9 +857,9 @@ func TestEndpointCase22(t *testing.T) { // For region us-isob-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -896,9 +896,9 @@ func TestEndpointCase23(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -916,9 +916,9 @@ func TestEndpointCase24(t *testing.T) { // For region us-isob-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -955,9 +955,9 @@ func TestEndpointCase25(t *testing.T) { // For custom endpoint with region set and fips disabled and dualstack disabled func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -995,8 +995,8 @@ func TestEndpointCase26(t *testing.T) { // For custom endpoint with region not set and fips disabled and dualstack disabled func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1034,9 +1034,9 @@ func TestEndpointCase27(t *testing.T) { // For custom endpoint with fips enabled and dualstack disabled func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), - UseFIPS: ptr.Bool(true), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -1055,9 +1055,9 @@ func TestEndpointCase28(t *testing.T) { // For custom endpoint with fips disabled and dualstack enabled func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(true), - UseFIPS: ptr.Bool(false), Region: ptr.String("us-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } diff --git a/service/waf/endpoints.go b/service/waf/endpoints.go index 12d4b269a6d..e5124f34ef9 100644 --- a/service/waf/endpoints.go +++ b/service/waf/endpoints.go @@ -384,35 +384,9 @@ func (r *resolver) ResolveEndpoint( _PartitionResult := *exprVal _ = _PartitionResult if _PartitionResult.Name == "aws" { - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://waf-fips.") - out.WriteString(_Region) - out.WriteString(".api.aws") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { - uriString := "https://waf-fips.amazonaws.com" + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://waf.amazonaws.com" uri, err := url.Parse(uriString) if err != nil { @@ -435,17 +409,12 @@ func (r *resolver) ResolveEndpoint( }(), }, nil } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://waf.") - out.WriteString(_Region) - out.WriteString(".api.aws") - return out.String() - }() + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == false { + uriString := "https://waf-fips.amazonaws.com" uri, err := url.Parse(uriString) if err != nil { @@ -455,32 +424,20 @@ func (r *resolver) ResolveEndpoint( return smithyendpoints.Endpoint{ URI: *uri, Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("authSchemes", []interface{}{ + map[string]interface{}{ + "name": "sigv4", + "signingName": "waf", + "signingRegion": "us-east-1", + }, + }) + return out + }(), }, nil } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - uriString := "https://waf.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "waf", - "signingRegion": "us-east-1", - }, - }) - return out - }(), - }, nil } if _UseFIPS == true { if _UseDualStack == true { @@ -511,30 +468,6 @@ func (r *resolver) ResolveEndpoint( } if _UseFIPS == true { if true == _PartitionResult.SupportsFIPS { - if _Region == "aws-global" { - uriString := "https://waf-fips.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "waf", - "signingRegion": "us-east-1", - }, - }) - return out - }(), - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://waf-fips.") @@ -579,30 +512,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "aws-global" { - uriString := "https://waf.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - out.Set("authSchemes", []interface{}{ - map[string]interface{}{ - "name": "sigv4", - "signingName": "waf", - "signingRegion": "us-east-1", - }, - }) - return out - }(), - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://waf.") diff --git a/service/waf/endpoints_test.go b/service/waf/endpoints_test.go index 66660ecf2ce..e226dcf1dbb 100644 --- a/service/waf/endpoints_test.go +++ b/service/waf/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -67,8 +67,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("aws-global"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -116,8 +116,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -155,8 +155,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -204,8 +204,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -243,8 +243,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -292,8 +292,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -331,8 +331,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -370,8 +370,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -409,8 +409,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -448,8 +448,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -487,8 +487,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -526,8 +526,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -565,8 +565,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -600,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -678,12 +718,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -717,12 +777,32 @@ func TestEndpointCase16(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -757,11 +837,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -797,10 +877,10 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -836,11 +916,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -857,11 +937,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -876,3 +956,19 @@ func TestEndpointCase21(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/wafregional/endpoints.go b/service/wafregional/endpoints.go index 88cdfe65163..884d0b0c1b0 100644 --- a/service/wafregional/endpoints.go +++ b/service/wafregional/endpoints.go @@ -455,344 +455,6 @@ func (r *resolver) ResolveEndpoint( } return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") } - if _Region == "af-south-1" { - uriString := "https://waf-regional.af-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-east-1" { - uriString := "https://waf-regional.ap-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-northeast-1" { - uriString := "https://waf-regional.ap-northeast-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-northeast-2" { - uriString := "https://waf-regional.ap-northeast-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-northeast-3" { - uriString := "https://waf-regional.ap-northeast-3.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-south-1" { - uriString := "https://waf-regional.ap-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-southeast-1" { - uriString := "https://waf-regional.ap-southeast-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-southeast-2" { - uriString := "https://waf-regional.ap-southeast-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ap-southeast-3" { - uriString := "https://waf-regional.ap-southeast-3.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "ca-central-1" { - uriString := "https://waf-regional.ca-central-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-central-1" { - uriString := "https://waf-regional.eu-central-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-north-1" { - uriString := "https://waf-regional.eu-north-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-south-1" { - uriString := "https://waf-regional.eu-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-west-1" { - uriString := "https://waf-regional.eu-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-west-2" { - uriString := "https://waf-regional.eu-west-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "eu-west-3" { - uriString := "https://waf-regional.eu-west-3.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "me-south-1" { - uriString := "https://waf-regional.me-south-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "sa-east-1" { - uriString := "https://waf-regional.sa-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-east-1" { - uriString := "https://waf-regional.us-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-east-2" { - uriString := "https://waf-regional.us-east-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-west-1" { - uriString := "https://waf-regional.us-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-west-2" { - uriString := "https://waf-regional.us-west-2.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "cn-north-1" { - uriString := "https://waf-regional.cn-north-1.amazonaws.com.cn" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "cn-northwest-1" { - uriString := "https://waf-regional.cn-northwest-1.amazonaws.com.cn" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-east-1" { - uriString := "https://waf-regional.us-gov-east-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if _Region == "us-gov-west-1" { - uriString := "https://waf-regional.us-gov-west-1.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } uriString := func() string { var out strings.Builder out.WriteString("https://waf-regional.") diff --git a/service/wafregional/endpoints_test.go b/service/wafregional/endpoints_test.go index e74e3d3263a..ff9d861e952 100644 --- a/service/wafregional/endpoints_test.go +++ b/service/wafregional/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("af-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-northeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -564,8 +564,8 @@ func TestEndpointCase13(t *testing.T) { func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -603,8 +603,8 @@ func TestEndpointCase14(t *testing.T) { func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -642,8 +642,8 @@ func TestEndpointCase15(t *testing.T) { func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -681,8 +681,8 @@ func TestEndpointCase16(t *testing.T) { func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ap-southeast-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -720,8 +720,8 @@ func TestEndpointCase17(t *testing.T) { func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -759,8 +759,8 @@ func TestEndpointCase18(t *testing.T) { func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("ca-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -798,8 +798,8 @@ func TestEndpointCase19(t *testing.T) { func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -837,8 +837,8 @@ func TestEndpointCase20(t *testing.T) { func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-central-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -876,8 +876,8 @@ func TestEndpointCase21(t *testing.T) { func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -915,8 +915,8 @@ func TestEndpointCase22(t *testing.T) { func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -954,8 +954,8 @@ func TestEndpointCase23(t *testing.T) { func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -993,8 +993,8 @@ func TestEndpointCase24(t *testing.T) { func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1032,8 +1032,8 @@ func TestEndpointCase25(t *testing.T) { func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1071,8 +1071,8 @@ func TestEndpointCase26(t *testing.T) { func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1110,8 +1110,8 @@ func TestEndpointCase27(t *testing.T) { func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1149,8 +1149,8 @@ func TestEndpointCase28(t *testing.T) { func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1188,8 +1188,8 @@ func TestEndpointCase29(t *testing.T) { func TestEndpointCase30(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1227,8 +1227,8 @@ func TestEndpointCase30(t *testing.T) { func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-3"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1266,8 +1266,8 @@ func TestEndpointCase31(t *testing.T) { func TestEndpointCase32(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1305,8 +1305,8 @@ func TestEndpointCase32(t *testing.T) { func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("me-south-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1344,8 +1344,8 @@ func TestEndpointCase33(t *testing.T) { func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1383,8 +1383,8 @@ func TestEndpointCase34(t *testing.T) { func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("sa-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1422,8 +1422,8 @@ func TestEndpointCase35(t *testing.T) { func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1461,8 +1461,8 @@ func TestEndpointCase36(t *testing.T) { func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1500,8 +1500,8 @@ func TestEndpointCase37(t *testing.T) { func TestEndpointCase38(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1539,8 +1539,8 @@ func TestEndpointCase38(t *testing.T) { func TestEndpointCase39(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1578,8 +1578,8 @@ func TestEndpointCase39(t *testing.T) { func TestEndpointCase40(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1617,8 +1617,8 @@ func TestEndpointCase40(t *testing.T) { func TestEndpointCase41(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1656,8 +1656,8 @@ func TestEndpointCase41(t *testing.T) { func TestEndpointCase42(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1695,8 +1695,8 @@ func TestEndpointCase42(t *testing.T) { func TestEndpointCase43(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1734,8 +1734,8 @@ func TestEndpointCase43(t *testing.T) { func TestEndpointCase44(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1773,8 +1773,8 @@ func TestEndpointCase44(t *testing.T) { func TestEndpointCase45(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -1812,8 +1812,8 @@ func TestEndpointCase45(t *testing.T) { func TestEndpointCase46(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1851,8 +1851,8 @@ func TestEndpointCase46(t *testing.T) { func TestEndpointCase47(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1890,8 +1890,8 @@ func TestEndpointCase47(t *testing.T) { func TestEndpointCase48(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1929,8 +1929,8 @@ func TestEndpointCase48(t *testing.T) { func TestEndpointCase49(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-northwest-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -1968,8 +1968,8 @@ func TestEndpointCase49(t *testing.T) { func TestEndpointCase50(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2007,8 +2007,8 @@ func TestEndpointCase50(t *testing.T) { func TestEndpointCase51(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2046,8 +2046,8 @@ func TestEndpointCase51(t *testing.T) { func TestEndpointCase52(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2085,8 +2085,8 @@ func TestEndpointCase52(t *testing.T) { func TestEndpointCase53(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2124,8 +2124,8 @@ func TestEndpointCase53(t *testing.T) { func TestEndpointCase54(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2163,8 +2163,8 @@ func TestEndpointCase54(t *testing.T) { func TestEndpointCase55(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2202,8 +2202,8 @@ func TestEndpointCase55(t *testing.T) { func TestEndpointCase56(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2241,8 +2241,8 @@ func TestEndpointCase56(t *testing.T) { func TestEndpointCase57(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -2276,12 +2276,32 @@ func TestEndpointCase57(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase58(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase59(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2315,12 +2335,32 @@ func TestEndpointCase58(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase60(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase59(t *testing.T) { +func TestEndpointCase61(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2354,12 +2394,32 @@ func TestEndpointCase59(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase62(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase60(t *testing.T) { +func TestEndpointCase63(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2393,12 +2453,32 @@ func TestEndpointCase60(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase64(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase61(t *testing.T) { +func TestEndpointCase65(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -2433,11 +2513,11 @@ func TestEndpointCase61(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase62(t *testing.T) { +func TestEndpointCase66(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -2473,10 +2553,10 @@ func TestEndpointCase62(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase63(t *testing.T) { +func TestEndpointCase67(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -2512,11 +2592,11 @@ func TestEndpointCase63(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase64(t *testing.T) { +func TestEndpointCase68(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -2533,11 +2613,11 @@ func TestEndpointCase64(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase65(t *testing.T) { +func TestEndpointCase69(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -2552,3 +2632,19 @@ func TestEndpointCase65(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase70(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/workdocs/endpoints_test.go b/service/workdocs/endpoints_test.go index 6bc39dcbb99..5216c82c782 100644 --- a/service/workdocs/endpoints_test.go +++ b/service/workdocs/endpoints_test.go @@ -17,9 +17,9 @@ import ( // For region ap-northeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-northeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-northeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -56,9 +56,9 @@ func TestEndpointCase0(t *testing.T) { // For region ap-southeast-1 with FIPS disabled and DualStack disabled func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-1"), } resolver := NewDefaultEndpointResolverV2() @@ -95,9 +95,9 @@ func TestEndpointCase1(t *testing.T) { // For region ap-southeast-2 with FIPS disabled and DualStack disabled func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("ap-southeast-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("ap-southeast-2"), } resolver := NewDefaultEndpointResolverV2() @@ -134,9 +134,9 @@ func TestEndpointCase2(t *testing.T) { // For region eu-west-1 with FIPS disabled and DualStack disabled func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("eu-west-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("eu-west-1"), } resolver := NewDefaultEndpointResolverV2() @@ -173,9 +173,9 @@ func TestEndpointCase3(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -212,9 +212,9 @@ func TestEndpointCase4(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -251,9 +251,9 @@ func TestEndpointCase5(t *testing.T) { // For region us-west-2 with FIPS disabled and DualStack disabled func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -290,9 +290,9 @@ func TestEndpointCase6(t *testing.T) { // For region us-west-2 with FIPS enabled and DualStack disabled func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-west-2"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-west-2"), } resolver := NewDefaultEndpointResolverV2() @@ -329,9 +329,9 @@ func TestEndpointCase7(t *testing.T) { // For region us-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -368,9 +368,9 @@ func TestEndpointCase8(t *testing.T) { // For region us-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -407,9 +407,9 @@ func TestEndpointCase9(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack enabled func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -446,9 +446,9 @@ func TestEndpointCase10(t *testing.T) { // For region cn-north-1 with FIPS enabled and DualStack disabled func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -485,9 +485,9 @@ func TestEndpointCase11(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -524,9 +524,9 @@ func TestEndpointCase12(t *testing.T) { // For region cn-north-1 with FIPS disabled and DualStack disabled func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("cn-north-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("cn-north-1"), } resolver := NewDefaultEndpointResolverV2() @@ -563,9 +563,9 @@ func TestEndpointCase13(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -602,9 +602,9 @@ func TestEndpointCase14(t *testing.T) { // For region us-gov-east-1 with FIPS enabled and DualStack disabled func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -641,9 +641,9 @@ func TestEndpointCase15(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack enabled func TestEndpointCase16(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -680,9 +680,9 @@ func TestEndpointCase16(t *testing.T) { // For region us-gov-east-1 with FIPS disabled and DualStack disabled func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-gov-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-gov-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -716,12 +716,32 @@ func TestEndpointCase17(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase18(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase19(t *testing.T) { + var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -755,12 +775,32 @@ func TestEndpointCase18(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-iso-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -794,12 +834,32 @@ func TestEndpointCase19(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase22(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -833,12 +893,32 @@ func TestEndpointCase20(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-isob-east-1"), } resolver := NewDefaultEndpointResolverV2() @@ -873,11 +953,11 @@ func TestEndpointCase21(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase22(t *testing.T) { +func TestEndpointCase26(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -913,7 +993,7 @@ func TestEndpointCase22(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase23(t *testing.T) { +func TestEndpointCase27(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -952,11 +1032,11 @@ func TestEndpointCase23(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase24(t *testing.T) { +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), UseDualStack: ptr.Bool(false), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -973,11 +1053,11 @@ func TestEndpointCase24(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase25(t *testing.T) { +func TestEndpointCase29(t *testing.T) { var params = EndpointParameters{ + Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(true), - Region: ptr.String("us-east-1"), Endpoint: ptr.String("https://example.com"), } @@ -992,3 +1072,19 @@ func TestEndpointCase25(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/worklink/endpoints_test.go b/service/worklink/endpoints_test.go index 47016511964..d00b01eae2e 100644 --- a/service/worklink/endpoints_test.go +++ b/service/worklink/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/workmail/endpoints_test.go b/service/workmail/endpoints_test.go index 1230eb9bb99..a5e7127e7cd 100644 --- a/service/workmail/endpoints_test.go +++ b/service/workmail/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("eu-west-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-west-2"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -486,8 +486,8 @@ func TestEndpointCase11(t *testing.T) { func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -525,8 +525,8 @@ func TestEndpointCase12(t *testing.T) { func TestEndpointCase13(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +560,32 @@ func TestEndpointCase13(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase14(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase15(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +619,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -638,12 +678,32 @@ func TestEndpointCase15(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -677,12 +737,32 @@ func TestEndpointCase16(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase20(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -717,11 +797,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -757,10 +837,10 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -796,11 +876,11 @@ func TestEndpointCase19(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase20(t *testing.T) { +func TestEndpointCase24(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -817,11 +897,11 @@ func TestEndpointCase20(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase21(t *testing.T) { +func TestEndpointCase25(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -836,3 +916,19 @@ func TestEndpointCase21(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase26(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/workmailmessageflow/endpoints_test.go b/service/workmailmessageflow/endpoints_test.go index 2b826bef912..2e2bb400bc0 100644 --- a/service/workmailmessageflow/endpoints_test.go +++ b/service/workmailmessageflow/endpoints_test.go @@ -18,8 +18,8 @@ import ( func TestEndpointCase0(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -57,8 +57,8 @@ func TestEndpointCase0(t *testing.T) { func TestEndpointCase1(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -96,8 +96,8 @@ func TestEndpointCase1(t *testing.T) { func TestEndpointCase2(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -135,8 +135,8 @@ func TestEndpointCase2(t *testing.T) { func TestEndpointCase3(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -174,8 +174,8 @@ func TestEndpointCase3(t *testing.T) { func TestEndpointCase4(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -213,8 +213,8 @@ func TestEndpointCase4(t *testing.T) { func TestEndpointCase5(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -252,8 +252,8 @@ func TestEndpointCase5(t *testing.T) { func TestEndpointCase6(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -291,8 +291,8 @@ func TestEndpointCase6(t *testing.T) { func TestEndpointCase7(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("cn-north-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -330,8 +330,8 @@ func TestEndpointCase7(t *testing.T) { func TestEndpointCase8(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -369,8 +369,8 @@ func TestEndpointCase8(t *testing.T) { func TestEndpointCase9(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -408,8 +408,8 @@ func TestEndpointCase9(t *testing.T) { func TestEndpointCase10(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), } resolver := NewDefaultEndpointResolverV2() @@ -447,8 +447,8 @@ func TestEndpointCase10(t *testing.T) { func TestEndpointCase11(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-gov-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -482,12 +482,32 @@ func TestEndpointCase11(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase12(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase13(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -521,12 +541,32 @@ func TestEndpointCase12(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase14(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase13(t *testing.T) { +func TestEndpointCase15(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -560,12 +600,32 @@ func TestEndpointCase13(t *testing.T) { } } +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase16(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { +func TestEndpointCase17(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -599,12 +659,32 @@ func TestEndpointCase14(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase18(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase15(t *testing.T) { +func TestEndpointCase19(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), } resolver := NewDefaultEndpointResolverV2() @@ -639,11 +719,11 @@ func TestEndpointCase15(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase16(t *testing.T) { +func TestEndpointCase20(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -679,10 +759,10 @@ func TestEndpointCase16(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase17(t *testing.T) { +func TestEndpointCase21(t *testing.T) { var params = EndpointParameters{ - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -718,11 +798,11 @@ func TestEndpointCase17(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase18(t *testing.T) { +func TestEndpointCase22(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(false), UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(false), Endpoint: ptr.String("https://example.com"), } @@ -739,11 +819,11 @@ func TestEndpointCase18(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase19(t *testing.T) { +func TestEndpointCase23(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), - UseDualStack: ptr.Bool(true), UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), Endpoint: ptr.String("https://example.com"), } @@ -758,3 +838,19 @@ func TestEndpointCase19(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase24(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +}